当前位置: 首页>>代码示例>>C#>>正文


C# PageInfo.AddCondition方法代码示例

本文整理汇总了C#中System.PageInfo.AddCondition方法的典型用法代码示例。如果您正苦于以下问题:C# PageInfo.AddCondition方法的具体用法?C# PageInfo.AddCondition怎么用?C# PageInfo.AddCondition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.PageInfo的用法示例。


在下文中一共展示了PageInfo.AddCondition方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitList()
 {
     CurrencyPage = Utils.GetInt(Utils.GetQueryStringValue("Page"));
     if (CurrencyPage == 0)
         CurrencyPage = 1;
     string Keyword = Utils.GetQueryStringValue("KeyWord");
     PageInfo pi = new PageInfo();
     pi.PageIndex = CurrencyPage;
     pi.PageSize = PageSize;
     //pi.AddCondition<TywmytravellineDTO>(o => o.publishtarget, Target, QueryMethod.Equal);
     //pi.AddCondition<TywmytravellineDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     var model = LoginCheck();
     pi.AddCondition<TywmytravellineDTO>(o => o.member_id, model.id, QueryMethod.Equal);
     pi.AddCondition<TywmytravellineDTO>(o => o.ordernum, 0, QueryMethod.Equal);
     if (!String.IsNullOrWhiteSpace(Keyword))
     {
         pi.AddCondition<TywmytravellineDTO>(o => o.title, Keyword, QueryMethod.Like);
     }
     pi.OrderBy.Add("create_date", OrderByType.Desc);
     var list = BMyTravelline.GetList(pi, ref TotalRows);
     if (list != null)
     {
         this.rptList.DataSource = list;
         this.rptList.DataBind();
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:29,代码来源:member_line.aspx.cs

示例2: InitScenicList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitScenicList()
 {
     PageInfo pi = new PageInfo();
     pi.PageIndex = 1;
     pi.PageSize = int.MaxValue;
     pi.AddCondition<HotspotScenicsDTO>(o => o.publishtarget, Target, QueryMethod.Equal);
     pi.AddCondition<HotspotScenicsDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     //Response.Write(pi.ToSqlCondition());
     var list = BHotspot.GetScenicsList(pi);
     if (list != null)
     {
         System.Text.StringBuilder tmpStr = new System.Text.StringBuilder();
         tmpStr.Append("<li>");
         for (int i = 0; i < list.Count(); i++)
         {
             if ((i + 1) % 2 == 0)
             {
                 tmpStr.Append("<div class=\"list_div right\"><img class=\"list_img\" src=\"" + Common.NoPhotoDefault(list[i].coverphoto) + "\"><h1>" + list[i].hotspot_name + "</h1><p>" + list[i].tourtime + "</p><a href=\"javascript:void(0)\" ID=\"" + list[i].id + "\" EID=\"" + list[i].hotspot_id + "\" class=\"jingdianAdd\">&nbsp;</a></div>");
             }
             else
             {
                 tmpStr.Append("<div class=\"list_div left\"><img class=\"list_img\" src=\"" + Common.NoPhotoDefault(list[i].coverphoto) + "\"><h1>" + list[i].hotspot_name + "</h1><p>" + list[i].tourtime + "</p><a href=\"javascript:void(0)\" ID=\"" + list[i].id + "\" EID=\"" + list[i].hotspot_id + "\" class=\"jingdianAdd\">&nbsp;</a></div>");
             }
             
             if ((i+1) % 2 == 0) { tmpStr.Append("</li><li>"); }
         }
         tmpStr.Append("</li>");
         this.ltrJD.Text = tmpStr.ToString();
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:33,代码来源:trip_custom.aspx.cs

示例3: InitList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitList()
 {
     CurrencyPage = Utils.GetInt(Utils.GetQueryStringValue("Page"));
     if (CurrencyPage == 0)
         CurrencyPage = 1;
     string Keyword = Utils.GetQueryStringValue("KeyWord");
     PageInfo pi = new PageInfo();
     pi.PageIndex = CurrencyPage;
     pi.PageSize = PageSize;
     int infoType = (int)资讯类别.新闻资讯;
     pi.AddCondition<TywinformationDTO>(o => o.publishtarget, Target, QueryMethod.Equal);
     pi.AddCondition<TywinformationDTO>(o => o.info_type, infoType, QueryMethod.Equal);
     pi.AddCondition<TywinformationDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     if (!String.IsNullOrWhiteSpace(Keyword))
     {
         pi.AddCondition<TywinformationDTO>(o => o.title, Keyword, QueryMethod.Like);
     }
     //Response.Write(pi.ToSqlCondition());
     pi.OrderBy.Add("create_date", OrderByType.Desc);
     var list = BInfomation.GetList(pi, ref TotalRows);
     if (list != null) {
         this.rptList.DataSource = list;
         this.rptList.DataBind();
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:28,代码来源:news_information.aspx.cs

示例4: InitList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitList()
 {
     CurrencyPage = Utils.GetInt(Utils.GetQueryStringValue("Page"));
     if (CurrencyPage == 0)
         CurrencyPage = 1;
     string Keyword = Utils.GetQueryStringValue("KeyWord");
     PageInfo pi = new PageInfo();
     pi.PageIndex = CurrencyPage;
     pi.PageSize = PageSize;
     pi.AddCondition<CptoutactivitiesDTO>(o => o.publishtarget, Target, QueryMethod.Equal);
     pi.AddCondition<CptoutactivitiesDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     //有效活动
     DateTime cDate = DateTime.Now;
     pi.AddCondition<CptoutactivitiesDTO>(o => o.act_startdate, cDate, QueryMethod.LessThanOrEqual);
     pi.AddCondition<CptoutactivitiesDTO>(o => o.act_enddate, cDate, QueryMethod.GreaterThan);
     if (!String.IsNullOrWhiteSpace(Keyword))
     {
         pi.AddCondition<CptoutactivitiesDTO>(o => o.act_name, Keyword, QueryMethod.Like);
     }
     pi.OrderBy.Add("create_date", OrderByType.Desc);
     var list = BActivities.GetList(pi, ref TotalRows);
     if (list != null)
     {
         this.rptList.DataSource = list;
         this.rptList.DataBind();
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:30,代码来源:bandao-huodong.aspx.cs

示例5: InitList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitList()
 {
     int typeId = Utils.GetInt(Utils.GetQueryStringValue("Type"));
     CurrencyPage = Utils.GetInt(Utils.GetQueryStringValue("Page"));
     if (CurrencyPage == 0)
         CurrencyPage = 1;
     string Keyword = Utils.GetQueryStringValue("KeyWord");
     PageInfo pi = new PageInfo();
     pi.PageIndex = CurrencyPage;
     pi.PageSize = PageSize;
     //pi.AddCondition<ViewOrderDTO>(o => o.publishtarget, Target, QueryMethod.Equal);
     pi.AddCondition<ViewOrderDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     if (typeId != 0)
     {
         pi.AddCondition<ViewOrderDTO>(o => o.ordertype, typeId, QueryMethod.Equal);
     }
     else
     {
         pi.AddCondition<ViewOrderDTO>(o => o.ordertype, (int)订单类型.酒店订单, QueryMethod.Equal);
     }
     var model = LoginCheck();
     pi.AddCondition<ViewOrderDTO>(o => o.member_id, model.id, QueryMethod.Equal);
     if (!String.IsNullOrWhiteSpace(Keyword))
     {
         pi.AddCondition<ViewOrderDTO>(o => o.productname, Keyword, QueryMethod.Like);
     }
     pi.OrderBy.Add("create_date", OrderByType.Desc);
     var list = BOrder.GetViewList(pi, ref TotalRows);
     if (list != null)
     {
         this.rptList.DataSource = list;
         this.rptList.DataBind();
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:37,代码来源:user-dd2.aspx.cs

示例6: InitTalkCount

 /// <summary>
 /// 加载评论数
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void InitTalkCount(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         Repeater rptTalkList = (Repeater)e.Item.FindControl("rptTalkList");
         var Id = ((TywphotoalbumDTO)e.Item.DataItem).id;
         Literal ltrCollectCount = (Literal)e.Item.FindControl("ltrCollectCount");
         ltrCollectCount.Text = BMycollect.Count(Id);
         Literal ltrTalkCount = (Literal)e.Item.FindControl("ltrTalkCount");
         ltrTalkCount.Text = BComment.Count(Id,评论类型.光影);
         #region 评论列表
         PageInfo pi = new PageInfo();
         pi.PageIndex = 1;
         pi.PageSize = 10;
         pi.AddCondition<TywcommentDTO>(o => o.datasource, BasePage.Target, QueryMethod.Equal);
         pi.AddCondition<TywcommentDTO>(o => o.objecttype, (int)Adpost.YCH.BLL.评论类型.光影, QueryMethod.Equal);
         pi.AddCondition<TywcommentDTO>(o => o.objectid, Id, QueryMethod.Equal);
         pi.AddCondition<TywcommentDTO>(o => o.replyid, "0", QueryMethod.Equal);
         pi.OrderBy.Add("commenttime", OrderByType.Desc);
         var list = BComment.GetList(pi);
         if (list != null)
         {
             rptTalkList.DataSource = list;
             rptTalkList.DataBind();
         }
         #endregion
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:33,代码来源:share_shadow.aspx.cs

示例7: InitList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitList()
 {
     Id = Utils.GetQueryStringValue("Id");
     int CurrencyPage = Utils.GetInt(Utils.GetQueryStringValue("Page"));
     if (CurrencyPage == 0)
         CurrencyPage = 1;
     PageInfo pi = new PageInfo();
     pi.PageIndex = CurrencyPage;
     pi.PageSize = 4;
     pi.AddCondition<HotspotHotelDTO>(o => o.publishtarget, Target, QueryMethod.Equal);
     pi.AddCondition<HotspotHotelDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     //Response.Write(pi.ToSqlCondition());
     pi.OrderBy.Add("order_id", OrderByType.Asc);
     var list = BHotspot.GetHotelsList(pi);
     if (list != null)
     {
         this.rptList.DataSource = list;
         this.rptList.DataBind();
         if (!String.IsNullOrEmpty(Id))
         {
             InitRoomInfo(Id);
         }
         else
         {
             Id = list[0].hotspot_id;
             InitRoomInfo(Id);
         }
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:32,代码来源:travel_hotel.aspx.cs

示例8: InitEventInfo

 /// <summary>
 /// 加载活动信息
 /// </summary>
 private void InitEventInfo()
 {
     string Id = Utils.GetQueryStringValue("Id");
     if (!String.IsNullOrWhiteSpace(Id))
     {
         var model = BActivities.GetModel(Id);
         if (model != null)
         {
             if (model.act_enddate != null)
             {
                 if (!String.IsNullOrWhiteSpace(model.thumb_img))
                     this.ltrImg.Text = "<img src=\"" + model.thumb_img + "\">";
                 this.ltrAddress.Text = model.act_address;
                 this.ltract_registration.Text = model.act_registration;
                 this.ltrprebookphone.Text = model.prebookphone;
                 this.ltrpriceinfo.Text = model.price.ToString("F2")+"元";
                 this.ltrambitus_restaurant.Text = model.ambitus_restaurant;
                 this.ltrIntro.Text = model.act_introduce;
                 this.ltract_process.Text = model.act_process;
                 if (model.is_audit != 1) { this.phJoin.Visible = false; }
                 #region 报名次数及参加人数
                 int TotalRows = 0, TotalPeoNumber = 0;
                 PageInfo pi = new PageInfo();
                 pi.PageIndex = 1;
                 pi.PageSize = int.MaxValue;
                 pi.AddCondition<ViewOrderDTO>(o => o.ordertype, (int)订单类型.活动, QueryMethod.Equal);
                 pi.AddCondition<ViewOrderDTO>(o => o.productid, Id, QueryMethod.Equal);
                 pi.AddCondition<ViewOrderDTO>(o => o.is_delete, 0, QueryMethod.Equal);
                 var Tlist = BOrder.GetViewList(pi, ref TotalRows);
                 this.ltrJoinCount.Text = TotalRows.ToString();
                 if (Tlist != null && Tlist.Count() > 0)
                 {
                     foreach (var m in Tlist)
                     {
                         TotalPeoNumber += m.num;
                     }
                 }
                 this.ltrJoinPeoNumber.Text = TotalPeoNumber.ToString();
                 #endregion
                 if (model.allowjointimelimit <= TotalRows)
                     this.phJoin.Visible = false;
             }
             else
             {
                 MessageBox.ShowAndReturnBack("未找到您要查看的信息");
                 return;
             }
         }
         else
         {
             MessageBox.ShowAndReturnBack("未找到您要查看的信息");
             return;
         }
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:58,代码来源:huodong-view.aspx.cs

示例9: InitEventInfo

 /// <summary>
 /// 加载活动信息
 /// </summary>
 private void InitEventInfo()
 {
     string Id = Utils.GetQueryStringValue("Id");
     if (!String.IsNullOrWhiteSpace(Id))
     {
         var model = BActivities.GetModel(Id);
         if (model != null)
         {
             this.ltrRemark.Text = model.act_registration;
             if (model.is_audit == 1)
             {
                 this.btnSubmit.Visible = true;
             }
             else
             {
                 this.btnSubmit.Visible = false;
             }
             #region 报名次数及参加人数
             string str = "<tr class=\"tempRow\"><td><input name=\"txtAName\" type=\"text\" style=\"width:30px;\"></td> <td><input name=\"txtASex\" type=\"text\" style=\"width:30px;\"></td><td><input name=\"txtAIdCard\" type=\"text\" style=\"width:30px;\"></td><td><input name=\"txtAMobile\" type=\"text\" style=\"width:30px;\"></td></tr>";
             if (model.personnumlimit > 1)
             {
                 for (int j = 0; j < model.personnumlimit - 1; j++)
                 {
                     str += "<tr class=\"tempRow\"><td><input name=\"txtAName\" type=\"text\" style=\"width:30px;\" ></td> <td><input name=\"txtASex\" type=\"text\" class=\"theme_input1\" style=\"width:30px;\"></td><td><input name=\"txtAIdCard\" type=\"text\" class=\"theme_input1\" style=\"width:30px;\"></td><td><input name=\"txtAMobile\" type=\"text\" class=\"theme_input1\" style=\"width:30px;\"></td></tr>";
                 }
             }
             this.ltrBuyContactInfo.Text = str;
             int TotalRows = 0;
             PageInfo pi = new PageInfo();
             pi.PageIndex = 1;
             pi.PageSize = int.MaxValue;
             pi.AddCondition<ViewOrderDTO>(o => o.ordertype, (int)订单类型.活动, QueryMethod.Equal);
             pi.AddCondition<ViewOrderDTO>(o => o.productid, Id, QueryMethod.Equal);
             pi.AddCondition<ViewOrderDTO>(o => o.is_delete, 0, QueryMethod.Equal);
             var Tlist = BOrder.GetViewList(pi, ref TotalRows);
             #endregion
             if (model.allowjointimelimit <= TotalRows)
                 this.btnSubmit.Visible = false;
         }
         else
         {
             MessageBox.ShowAndReturnBack("未找到您要查看的信息");
             return;
         }
     }
     else
     {
         MessageBox.ShowAndReturnBack("未找到您要查看的信息");
         return;
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:54,代码来源:huodong_baoming.aspx.cs

示例10: InitList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitList()
 {
     PageInfo pi = new PageInfo();
     pi.PageIndex = 1;
     pi.PageSize = int.MaxValue;
     pi.AddCondition<TywinformationDTO>(o => o.publishtarget, Target, QueryMethod.Equal);
     pi.AddCondition<TywinformationDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     //Response.Write(pi.ToSqlCondition());
     var list = BCicerone.GetList(pi);
     if (list != null)
     {
         this.rptList.DataSource = list;
         this.rptList.DataBind();
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:18,代码来源:share_youke.aspx.cs

示例11: InitImgList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitImgList()
 {
     PageInfo pi = new PageInfo();
     pi.PageIndex = CurrencyPage;
     pi.PageSize = int.MaxValue;
     var model = LoginCheck();
     pi.AddCondition<MbmycollectDTO>(o => o.collectcategory, 收藏类别.光影记录, QueryMethod.Equal);
     pi.AddCondition<MbmycollectDTO>(o => o.memberid, model.id, QueryMethod.Equal);
     pi.OrderBy.Add("collecttime", OrderByType.Desc);
     var list = BMycollect.GetList(pi, ref TotalRows);
     if (list != null)
     {
         this.rptImgList.DataSource = list;
         this.rptImgList.DataBind();
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:19,代码来源:member_collect.aspx.cs

示例12: GetScenicsList

 /// <summary>
 /// 取得列表
 /// </summary>
 /// <param name="pi">页面查询信息</param>
 /// <returns></returns>
 public static List<HotspotScenicsDTO> GetScenicsList(int target)
 {
     PageInfo pi = new PageInfo();
     pi.PageIndex = 1;
     pi.PageSize = int.MaxValue;
     pi.AddCondition<HotspotScenicsDTO>(o => o.publishtarget, target, QueryMethod.Equal);
     pi.AddCondition<HotspotScenicsDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     var Result = APIOP<HotspotScenicsDTO>.SearchPage(ScenicsApiUrl, pi);
     if (Result.total > 0)
     {
         if (Result.data != null)
         {
             return Result.data;
         }
         else { return null; }
     }
     else { return null; }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:23,代码来源:BHotspot.cs

示例13: InitList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitList()
 {
     if (CurrencyPage == 0)
         CurrencyPage = 1;
     string Keyword = Utils.GetQueryStringValue("KeyWord");
     PageInfo pi = new PageInfo();
     pi.PageIndex = CurrencyPage;
     pi.PageSize = PageSize;
     pi.AddCondition<TywvideosDTO>(o => o.publishtarget, Target, QueryMethod.Equal);
     pi.AddCondition<TywvideosDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     pi.OrderBy.Add("create_date", OrderByType.Desc);
     var list = BVideo.GetList(pi, ref TotalRows);
     if (list != null)
     {
         this.rptList.DataSource = list;
         this.rptList.DataBind();
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:21,代码来源:share_video.aspx.cs

示例14: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     string ApiUrl = "http://122.224.201.244/ychapitest/api/V1/Tywcomment/SearchPage";
     PageInfo pi = new PageInfo();
     pi.PageIndex = 1;
     pi.PageSize = 50;
     pi.AddCondition<TywcommentDTO>(o => o.datasource, BasePage.Target, QueryMethod.Equal);
     pi.AddCondition<TywcommentDTO>(o => o.objecttype, (int)评论类型.游记, QueryMethod.Equal);
     pi.AddCondition<TywcommentDTO>(o => o.objectid, "921b7cc7-78c1-486e-96bf-0f26ac68ea7d", QueryMethod.Equal);
     pi.AddCondition<TywcommentDTO>(o => o.replyid, "0", QueryMethod.Equal);
     pi.OrderBy.Add("create_date", OrderByType.Desc);
     //Response.Write(pi.ToSqlCondition());
     HttpClient client = new HttpClient();
     var strJson = pi.ToJSON_Newtonsoft();
     HttpContent httpContent = new StringContent(strJson);
     httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
     var v = client.PostAsync(ApiUrl, httpContent).Result.Content.ReadAsStringAsync().Result;
     Response.Write(v);
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:19,代码来源:test.aspx.cs

示例15: InitList

 /// <summary>
 /// 加载列表
 /// </summary>
 private void InitList()
 {
     int CurrencyPage = Utils.GetInt(Utils.GetQueryStringValue("Page"));
     if (CurrencyPage == 0)
         CurrencyPage = 1;
     PageInfo pi = new PageInfo();
     pi.PageIndex = CurrencyPage;
     pi.PageSize = int.MaxValue;
     pi.AddCondition<HotspotScenicsDTO>(o => o.publishtarget, Target, QueryMethod.Equal);
     pi.AddCondition<HotspotScenicsDTO>(o => o.is_valid, 1, QueryMethod.Equal);
     //Response.Write(pi.ToSqlCondition());
     pi.OrderBy.Add("order_id", OrderByType.Asc);
     var list = BHotspot.GetScenicsList(pi);
     if (list != null)
     {
         this.rptList.DataSource = list;
         this.rptList.DataBind();
     }
 }
开发者ID:jslpower,项目名称:jingqu,代码行数:22,代码来源:bandao-jingdian1.aspx.cs


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