• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# DAL.Common类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中JumboTCMS.DAL.Common的典型用法代码示例。如果您正苦于以下问题:C# Common类的具体用法?C# Common怎么用?C# Common使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Common类属于JumboTCMS.DAL命名空间,在下文中一共展示了Common类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetTopList

        /// <summary>
        /// 得到评论列表
        /// </summary>
        /// <param name="_thispage">当前页码</param>
        /// <param name="_pagesize">每页记录条数</param>
        /// <param name="_channelid">频道ID</param>
        /// <param name="_contentid">内容ID</param>
        public string GetTopList(int _thispage, int _pagesize, string _channelid, string _contentid)
        {
            using (DbOperHandler _doh = new Common().Doh())
            {
                string sqlStr = "";
                int countNum = 0;
                string whereStr = "[IsPass]=1 AND [ParentId]=0";
                if (_channelid != "0") whereStr += " AND [ChannelId]=" + _channelid;
                if (_contentid != "0") whereStr += " AND [ContentId]=" + _contentid;
                _doh.Reset();
                _doh.ConditionExpress = whereStr;
                countNum = _doh.Count("jcms_normal_review");

                sqlStr = JumboTCMS.Utils.SqlHelp.GetSql("Id,ChannelId,ContentId,IP,UserName,AddDate,Content", "jcms_normal_review", "id", _pagesize, _thispage, "desc", whereStr);
                _doh.Reset();
                _doh.SqlCmd = sqlStr;
                DataTable dt = _doh.GetDataTable();
                string ResponseStr = "";
                for (int j = 0; j < dt.Rows.Count; j++)
                {
                    ResponseStr += "<li><a href=\"" + site.Dir + "review/default.aspx?ccid=" + dt.Rows[j]["ChannelId"].ToString() + "&id=" + dt.Rows[j]["ContentId"].ToString() + "#c" + dt.Rows[j]["Id"].ToString() + "\" target=\"_blank\">" + dt.Rows[j]["Content"].ToString() + "</a></li>";
                }
                dt.Clear();
                dt.Dispose();
                return ResponseStr;
            }
        }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:34,代码来源:ReviewDAL.cs


示例2: BatchOper

 /// <summary>
 /// 批量操作插件
 /// </summary>
 /// <param name="_act">行为</param>
 /// <param name="_ids">id,以,隔开</param>
 public bool BatchOper(string _act, string _ids)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         string[] idValue;
         idValue = _ids.Split(',');
         if (_act == "pass")
         {
             for (int i = 0; i < idValue.Length; i++)
             {
                 _doh.Reset();
                 _doh.ConditionExpress = "[email protected]";
                 _doh.AddConditionParameter("@id", idValue[i]);
                 _doh.AddFieldItem("Enabled", 1);
                 _doh.Update("jcms_normal_user_oauth");
             }
         }
         else if (_act == "nopass")
         {
             for (int i = 0; i < idValue.Length; i++)
             {
                 _doh.Reset();
                 _doh.ConditionExpress = "[email protected]";
                 _doh.AddConditionParameter("@id", idValue[i]);
                 _doh.AddFieldItem("Enabled", 0);
                 _doh.Update("jcms_normal_user_oauth");
             }
         }
     }
     return true;
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:36,代码来源:UserOAuthDAL.cs


示例3: PlacardList

 /// <summary>
 /// 得到列表
 /// </summary>
 public List<Extends_Placard> PlacardList()
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         List<Extends_Placard> placards;
         placards = new List<Extends_Placard>();
         _doh.Reset();
         _doh.SqlCmd = "SELECT TOP 10 [Id],[Title],[AddTime] FROM [jcms_extends_placard] WHERE [State]=1 ORDER BY Id Desc";
         DataTable dtPlacard = _doh.GetDataTable();
         if (dtPlacard.Rows.Count > 0)
         {
             for (int i = 0; i < dtPlacard.Rows.Count; i++)
             {
                 placards.Add(new Extends_Placard(dtPlacard.Rows[i]["Id"].ToString(),
                     dtPlacard.Rows[i]["Title"].ToString(),
                     "",
                     Convert.ToDateTime(dtPlacard.Rows[i]["AddTime"].ToString()),
                     1
                     ));
             }
         }
         dtPlacard.Clear();
         dtPlacard.Dispose();
         return placards;
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:29,代码来源:PlacardDAL.cs


示例4: CreateContent

 public override void CreateContent(string _ChannelId, string _ContentId, int _CurrentPage)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.SqlCmd = "SELECT [PhotoUrl],[FirstPage] FROM [jcms_module_photo] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
         DataTable dtContent = _doh.GetDataTable();
         //图片地址分割处理
         string PhotoUrl = dtContent.Rows[0]["PhotoUrl"].ToString().Replace("\r\n", "\r");
         string ContentFirstPage = dtContent.Rows[0]["FirstPage"].ToString();
         dtContent.Clear();
         dtContent.Dispose();
         if (PhotoUrl != "")
         {
             string[] PhotoUrlArr = PhotoUrl.Split(new string[] { "\r" }, StringSplitOptions.RemoveEmptyEntries);
             int pageCount = PhotoUrlArr.Length;
             if (ContentFirstPage.Length == 0)
             {
                 _doh.Reset();
                 _doh.SqlCmd = "UPDATE [jcms_module_photo] SET [FirstPage]='" + Go2View(1, true, _ChannelId, _ContentId, false) + "' WHERE  [ChannelId]=" + _ChannelId + " and [IsPass]=1 and [Id]=" + _ContentId;
                 _doh.ExecuteSqlNonQuery();
             }
             for (int j = 1; j < (pageCount + 1); j++)
             {
                 JumboTCMS.Utils.DirFile.SaveFile(GetContent(_ChannelId, _ContentId, j), Go2View(j, true, _ChannelId, _ContentId, true));
             }
         }
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:29,代码来源:PhotoDAL.cs


示例5: GetContent

        public override string GetContent(string _ChannelId, string _ContentId, int _CurrentPage)
        {
            using (DbOperHandler _doh = new Common().Doh())
            {
                JumboTCMS.Entity.Normal_Channel _Channel = new JumboTCMS.DAL.Normal_ChannelDAL().GetEntity(_ChannelId);
                if (_Channel.Enabled == false)
                {
                    return "频道错误";
                }
                _doh.Reset();
                _doh.SqlCmd = "SELECT [ClassId] FROM [jcms_module_photo] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
                DataTable dtSearch = _doh.GetDataTable();
                if (dtSearch.Rows.Count == 0)
                {
                    dtSearch.Clear();
                    dtSearch.Dispose();
                    return "内容错误";
                }
                string ClassId = dtSearch.Rows[0]["ClassId"].ToString();
                dtSearch.Clear();
                dtSearch.Dispose();
                TemplateEngineDAL te = new TemplateEngineDAL(_ChannelId);
                _doh.Reset();
                _doh.SqlCmd = "SELECT Id FROM [jcms_normal_class] WHERE [IsOut]=0 AND [ChannelId]=" + _ChannelId + " and [Id]=" + ClassId;
                if (_doh.GetDataTable().Rows.Count == 0)
                {
                    return "栏目错误";
                }
                string PageStr = string.Empty;
                _doh.Reset();
                _doh.SqlCmd = "SELECT * FROM [jcms_module_photo] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
                DataTable dtContent = _doh.GetDataTable();
                string _FirstPage = dtContent.Rows[0]["FirstPage"].ToString();
                System.Collections.ArrayList ContentList = new System.Collections.ArrayList();
                p__GetChannel_Photo(te, dtContent, ref PageStr, ref ContentList, 0);
                te.ReplaceContentTag(ref PageStr, _ContentId);
                te.ReplaceContentLoopTag(ref PageStr);//主要解决通过tags关联
                te.ExcuteLastHTML(ref PageStr);
                ContentList.Add(PageStr);
                p__replaceSinglePhoto(dtContent, ref _CurrentPage, ref PageStr, ref ContentList);
                int _TotalPage = Convert.ToInt16(ContentList[1].ToString());//总页数
                dtContent.Clear();
                dtContent.Dispose();

                string _PrevLink = _CurrentPage == 1 ? "#" : Go2View(_CurrentPage - 1, (_Channel.IsHtml), _ChannelId, _ContentId, false);
                string _NextLink = _CurrentPage == _TotalPage ? "#" : Go2View(_CurrentPage + 1, (_Channel.IsHtml), _ChannelId, _ContentId, false);
                string _html = ContentList[0].ToString();
                string[] ThisPhotoUrl = ContentList[2].ToString().Split(new string[] { "|||" }, StringSplitOptions.RemoveEmptyEntries);
                string CurrentPhotoUrl = ThisPhotoUrl[ThisPhotoUrl.Length - 1];
                string CurrentPhotoTitle = ThisPhotoUrl.Length == 1 ? "" : ThisPhotoUrl[0];
                return _html
                    .Replace("{$CurrentPage}", _CurrentPage.ToString())
                    .Replace("{$TotalPage}", ContentList[1].ToString())
                    .Replace("{$CurrentPhotoUrl}", CurrentPhotoUrl)
                    .Replace("{$CurrentPhotoTitle}", CurrentPhotoTitle)
                    .Replace("{$SlideJSON}", ContentList[3].ToString())
                    .Replace("{$PrevLink}", _PrevLink)
                    .Replace("{$NextLink}", _NextLink);
            }
        }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:60,代码来源:PhotoDAL.cs


示例6: CreateContent

 public virtual void CreateContent(string _ChannelId, string _ContentId, int _CurrentPage)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.SqlCmd = "SELECT [Content],[FirstPage] FROM [jcms_module_article] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
         DataTable dtContent = _doh.GetDataTable();
         string ArticleContent = dtContent.Rows[0]["Content"].ToString();
         string ContentFirstPage = dtContent.Rows[0]["FirstPage"].ToString();
         dtContent.Clear();
         dtContent.Dispose();
         if (ArticleContent != "")
         {
             int pageCount = 1;
             //处理文章内容分页
             if (ArticleContent.Contains("[Jumbot_PageBreak]"))
             {
                 string[] ContentArr = ArticleContent.Split(new string[] { "[Jumbot_PageBreak]" }, StringSplitOptions.RemoveEmptyEntries);
                 pageCount = ContentArr.Length;
             }
             if (ContentFirstPage.Length == 0)
             {
                 _doh.Reset();
                 _doh.SqlCmd = "UPDATE [jcms_module_article] SET [FirstPage]='" + Go2View(1, true, _ChannelId, _ContentId, false) + "' WHERE [ChannelId]=" + _ChannelId + " and [IsPass]=1 and [Id]=" + _ContentId;
                 _doh.ExecuteSqlNonQuery();
             }
             for (int j = 1; j < (pageCount + 1); j++)
             {
                 JumboTCMS.Utils.DirFile.SaveFile(GetContent(_ChannelId, _ContentId, j), Go2View(j, true, _ChannelId, _ContentId, true));
             }
         }
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:33,代码来源:ArticleDAL.cs


示例7: BindData2Entity

 /// <summary>
 /// 绑定数据到实体
 /// </summary>
 /// <param name="_id"></param>
 public void BindData2Entity(string _id, JumboTCMS.Entity.Normal_Class _class)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.SqlCmd = "SELECT * FROM [jcms_normal_class] WHERE [Id]=" + _id;
         DataTable dt = _doh.GetDataTable();
         if (dt.Rows.Count > 0)
         {
             _class.Id = dt.Rows[0]["Id"].ToString();
             _class.ChannelId = Validator.StrToInt(dt.Rows[0]["ChannelId"].ToString(), 0);
             _class.ParentId = Validator.StrToInt(dt.Rows[0]["ParentId"].ToString(), 0);
             _class.Title = dt.Rows[0]["Title"].ToString();
             _class.Info = dt.Rows[0]["Info"].ToString();
             _class.Img = dt.Rows[0]["Img"].ToString();
             _class.FilePath = dt.Rows[0]["FilePath"].ToString();
             _class.Code = dt.Rows[0]["Code"].ToString();
             _class.IsPost = Validator.StrToInt(dt.Rows[0]["IsPost"].ToString(), 0) == 1;
             _class.IsTop = Validator.StrToInt(dt.Rows[0]["IsTop"].ToString(), 0) == 1;
             _class.TopicNum = Validator.StrToInt(dt.Rows[0]["TopicNum"].ToString(), 0);
             _class.TemplateId = Str2Str(dt.Rows[0]["TemplateId"].ToString());
             _class.ContentTemp = Str2Str(dt.Rows[0]["ContentTemp"].ToString());
             _class.PageSize = Validator.StrToInt(dt.Rows[0]["PageSize"].ToString(), 0);
             _class.IsOut = Validator.StrToInt(dt.Rows[0]["IsOut"].ToString(), 0) == 1;
             _class.FirstPage = dt.Rows[0]["FirstPage"].ToString();
             _class.ReadGroup = Validator.StrToInt(dt.Rows[0]["ReadGroup"].ToString(), 0);
         }
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:33,代码来源:ClassDAL.cs


示例8: GetVote

 /// <summary>
 /// 得到列表
 /// </summary>
 public Extends_Vote GetVote()
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         Extends_Vote vote = new Extends_Vote();
         _doh.Reset();
         _doh.SqlCmd = "SELECT TOP 1 [Id],[Title],[VoteText],[VoteNum],[VoteTotal],[Type] FROM [jcms_extends_vote] WHERE [Lock]=0 ORDER BY Id Desc";
         DataTable dtVote = _doh.GetDataTable();
         if (dtVote.Rows.Count > 0)
         {
             vote.Id = dtVote.Rows[0]["Id"].ToString();
             vote.Title = dtVote.Rows[0]["Title"].ToString();
             vote.VoteTotal = Str2Int(dtVote.Rows[0]["VoteTotal"].ToString());
             string[] itemtext = dtVote.Rows[0]["VoteText"].ToString().Split('|');
             string[] itemclicks = dtVote.Rows[0]["VoteNum"].ToString().Split('|');
             List<Extends_VoteItem> voteitems = new List<Extends_VoteItem>();
             for (int i = 0; i < itemtext.Length; i++)
             {
                 voteitems.Add(new Extends_VoteItem(itemtext[i], Str2Int(itemclicks[i])));
             }
             vote.Item = voteitems;
             vote.Type = Str2Int(dtVote.Rows[0]["Type"].ToString());
         }
         else
             vote.Id = "0";
         dtVote.Clear();
         dtVote.Dispose();
         return vote;
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:33,代码来源:VoteDAL.cs


示例9: GetDigg

        /// <summary>
        /// 得到内容
        /// </summary>
        /// <param name="_channeltype"></param>
        /// <param name="_contentid"></param>
        /// <returns></returns>
        public Normal_Digg GetDigg(string _channeltype, string _contentid)
        {
            using (DbOperHandler _doh = new Common().Doh())
            {
                Normal_Digg digg = new Normal_Digg();
                digg.ChannelType = _channeltype;
                digg.ContentId = Str2Int(_contentid);
                _doh.Reset();
                _doh.ConditionExpress = "[email protected] and [email protected]";
                _doh.AddConditionParameter("@channeltype", _channeltype);
                _doh.AddConditionParameter("@contentid", _contentid);
                if (!_doh.Exist("jcms_normal_digg"))
                {
                    _doh.Reset();
                    _doh.AddFieldItem("ChannelType", _channeltype);
                    _doh.AddFieldItem("ContentId", _contentid);

                    _doh.AddFieldItem("DiggNum", 0);
                    _doh.Insert("jcms_normal_digg");
                }
                _doh.Reset();
                _doh.ConditionExpress = "[email protected] and [email protected]";
                _doh.AddConditionParameter("@channeltype", _channeltype);
                _doh.AddConditionParameter("@contentid", _contentid);
                digg.DiggNum = Str2Int(_doh.GetField("jcms_normal_digg", "DiggNum").ToString());
                return digg;
            }
        }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:34,代码来源:DiggDAL.cs


示例10: LinkList

 /// <summary>
 /// 得到列表
 /// </summary>
 public List<Normal_Link> LinkList()
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         List<Normal_Link> links;
         links = new List<Normal_Link>();
         _doh.Reset();
         _doh.SqlCmd = "SELECT [Id],[Title],[Url],[ImgPath],[Info],[Style] FROM [jcms_normal_link] WHERE [State]=1 ORDER BY Style Desc,OrderNum Desc,Id Desc";
         DataTable dtLink = _doh.GetDataTable();
         if (dtLink.Rows.Count > 0)
         {
             for (int i = 0; i < dtLink.Rows.Count; i++)
             {
                 links.Add(new Normal_Link(dtLink.Rows[i]["Id"].ToString(),
                     dtLink.Rows[i]["Title"].ToString(),
                     dtLink.Rows[i]["Url"].ToString(),
                     dtLink.Rows[i]["ImgPath"].ToString(),
                     dtLink.Rows[i]["Info"].ToString(),
                     Str2Int(dtLink.Rows[i]["Style"].ToString())
                     ));
             }
         }
         dtLink.Clear();
         dtLink.Dispose();
         return links;
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:30,代码来源:LinkDAL.cs


示例11: AddVIPYears

 /// <summary>
 /// 续费VIP
 /// </summary>
 /// <param name="_id">用户ID</param>
 /// <param name="_vipyears">续的年数</param>
 public void AddVIPYears(string _id, int _vipyears)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         DateTime LimitDate = DateTime.Now;
         _doh.Reset();
         _doh.ConditionExpress = "id=" + _id;
         object[] values = _doh.GetFields("jcms_normal_user", "IsVIP,VIPTime");
         bool _isvip = (JumboTCMS.Utils.Validator.StrToInt(values[0].ToString(), 0) == 1);
         if (!_isvip)//如果还不是VIP
             LimitDate = DateTime.Now.AddYears(_vipyears);
         else
         {
             if (JumboTCMS.Utils.Validator.ValidDate(values[1].ToString()))//如果已经过期
                 LimitDate = DateTime.Now.AddYears(_vipyears);
             else
                 LimitDate = DateTime.Parse(values[1].ToString()).AddYears(_vipyears);
         }
         _doh.Reset();
         _doh.ConditionExpress = "id=" + _id;
         _doh.AddFieldItem("IsVIP", 1);
         _doh.AddFieldItem("VIPTime", LimitDate);
         _doh.Update("jcms_normal_user");
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:30,代码来源:UserDAL.cs


示例12: QQOnlineList

 /// <summary>
 /// 得到列表
 /// </summary>
 public List<Extends_QQOnline> QQOnlineList()
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         List<Extends_QQOnline> qqonlines;
         qqonlines = new List<Extends_QQOnline>();
         _doh.Reset();
         _doh.SqlCmd = "SELECT * FROM [jcms_extends_qqonline] Where State=1 ORDER BY OrderNum Desc,Id Desc";
         DataTable dtQQOnline = _doh.GetDataTable();
         if (dtQQOnline.Rows.Count > 0)
         {
             for (int i = 0; i < dtQQOnline.Rows.Count; i++)
             {
                 qqonlines.Add(new Extends_QQOnline(dtQQOnline.Rows[i]["Id"].ToString(),
                     dtQQOnline.Rows[i]["QQID"].ToString(),
                     dtQQOnline.Rows[i]["Title"].ToString(),
                     dtQQOnline.Rows[i]["TColor"].ToString(),
                     dtQQOnline.Rows[i]["face"].ToString()
                     ));
             }
         }
         dtQQOnline.Clear();
         dtQQOnline.Dispose();
         return qqonlines;
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:29,代码来源:QQOnlineDAL.cs


示例13: CountGoods

 /// <summary>
 /// 统计会员的购物量
 /// </summary>
 /// <param name="_uid"></param>
 /// <returns></returns>
 public int CountGoods(string _uid)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.ConditionExpress = "OrderNum='' and userid=" + _uid;
         return _doh.Count("jcms_normal_user_goods");
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:14,代码来源:UserGoodsDAL.cs


示例14: GetOrderMoney

 /// <summary>
 /// 获得订单的总金额
 /// </summary>
 /// <param name="_uid"></param>
 /// <param name="_ordernum"></param>
 /// <returns></returns>
 public float GetOrderMoney(string _uid, string _ordernum)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.ConditionExpress = "OrderNum='" + _ordernum + "' and userid=" + _uid;
         return Convert.ToSingle(_doh.GetField("jcms_normal_user_order", "Money").ToString());
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:15,代码来源:UserOrderDAL.cs


示例15: AddPoints

 /// <summary>
 /// 加博币
 /// </summary>
 /// <param name="_id">用户ID</param>
 /// <param name="_points">博币</param>
 public void AddPoints(string _id, int _points)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.ConditionExpress = "id=" + _id;
         _doh.Add("jcms_normal_user", "Points", _points);
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:14,代码来源:UserDAL.cs


示例16: DeleteLogs

 /// <summary>
 /// 清空管理日志
 /// </summary>
 public void DeleteLogs()
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.ConditionExpress = "1=1";
         _doh.Delete("jcms_normal_adminlogs");
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:12,代码来源:AdminlogsDAL.cs


示例17: GetNewGoods

 /// <summary>
 /// 统计会员的购物车商品种类
 /// </summary>
 /// <param name="_uid"></param>
 /// <returns></returns>
 public int GetNewGoods(string _uid)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.ConditionExpress = "state=0 and userid=" + _uid;
         return _doh.Count("jcms_normal_user_cart");
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:14,代码来源:UserCartDAL.cs


示例18: GetSome

 /// <summary>
 /// 获得内容的某些属性(第一个是时间,第二个是内容页另名)
 /// </summary>
 /// <param name="_channelid">频道ID</param>
 /// <param name="_channeltype">频道模型</param>
 /// <param name="_contentid">内容ID</param>
 /// <returns></returns>
 public object[] GetSome(string _channelid, string _channeltype, string _contentid)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.ConditionExpress = "ChannelId=" + _channelid + " and Id=" + _contentid;
         return _doh.GetFields("jcms_module_" + _channeltype, "AddDate,FirstPage,AliasPage");
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:16,代码来源:ModuleContentDAL.cs


示例19: GetGoodsCount

 /// <summary>
 /// 获得某种商品的已有数量
 /// </summary>
 /// <param name="_uid"></param>
 /// <returns></returns>
 public int GetGoodsCount(string _uid, string _productid)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.ConditionExpress = "state=0 and UserId=" + _uid + " and ProductId=" + _productid;
         return Str2Int(_doh.GetField("jcms_normal_user_cart", "BuyCount").ToString());
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:14,代码来源:UserCartDAL.cs


示例20: DeleteByID

 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool DeleteByID(string _id)
 {
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.ConditionExpress = "[email protected]";
         _doh.AddConditionParameter("@id", _id);
         int _del = _doh.Delete("jcms_normal_page");
         return (_del == 1);
     }
 }
开发者ID:WZDotCMS,项目名称:WZDotCMS,代码行数:14,代码来源:PageDAL.cs



注:本文中的JumboTCMS.DAL.Common类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Compiler.ILGenerator类代码示例发布时间:2022-05-26
下一篇:
C# Json.JsonReader类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap