public ActionResult Index(int?page) { //Pager pager = new Pager(); //pager.table = "Product"; //pager.strwhere = "1=1"; //pager.PageSize = 12; //pager.PageNo = page ?? 1; //pager.FieldKey = "Id"; //pager.FiledOrder = "Id desc"; //pager = CommonDal.GetPager(pager); //IList<Product> dataList = DataConvertHelper<Product>.ConvertToModel(pager.EntityDataTable); //var PageList = new StaticPagedList<Product>(dataList, pager.PageNo, pager.PageSize, pager.Amount); //return View(PageList); int rid = int.Parse(Session["renid"].ToString()); Pager pager = new Pager(); pager.table = "RenkongList"; pager.strwhere = "Shenqingren=" + rid + " and Status='true'"; pager.PageSize = 12; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <RenKongList> dataList = DataConvertHelper <RenKongList> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <RenKongList>(dataList, pager.PageNo, pager.PageSize, pager.Amount); return(View(PageList)); }
public ActionResult UCenter(int?page) { if (Session["uid"].ToString() != "" && Session["uid"] != null) { int uid = int.Parse(Session["uid"].ToString()); Ren ren = unitOfWork.rensRepository.GetByID(uid); ViewData["user"] = ren; var yings = unitOfWork.yingsRepository.Get(); Pager pager = new Pager(); pager.table = "YingList"; pager.strwhere = "Canjiaren=" + int.Parse(Session["uid"].ToString()); pager.PageSize = 15; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <YingList> dataList = DataConvertHelper <YingList> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <YingList>(dataList, pager.PageNo, pager.PageSize, pager.Amount); ViewBag.Amount = pager.Amount; return(View(PageList)); } else { return(RedirectToAction("Login", "Account")); } }
public static Pager SelectAll(string DtoName, Pager pager) { IMapping Mapping = MappingFactory.CreatMapping(DtoName); pager = CommonDal.GetPager(pager); return(pager); }
public static IList <AdsCustomer> GetListForPageList(Pager pager) { pager = CommonDal.GetPager(pager); IList <AdsCustomer> customerList = DataConvertHelper <AdsCustomer> .ConvertToModel(pager.EntityDataTable); return(customerList); }
public static IList <AdsVideo> GetListForPageList(Pager pager) { pager = CommonDal.GetPager(pager); IList <AdsVideo> videoList = DataConvertHelper <AdsVideo> .ConvertToModel(pager.EntityDataTable); return(videoList); }
public ActionResult Search(int?page, string uname, string rname, string tel, string idcard, string sf, string city, string diqu) { Pager pager = new Pager(); pager.table = "AdsCustomer"; pager.strwhere = "1=1"; //if (!string.IsNullOrEmpty(role)) //{ // pager.strwhere = pager.strwhere + "and CustomerRole=" + int.Parse(role) + " "; //} if (!string.IsNullOrEmpty(uname)) { pager.strwhere = pager.strwhere + " and CustomerUserName like'%" + uname + "%' "; } if (!string.IsNullOrEmpty(rname)) { pager.strwhere = pager.strwhere + " and CustomerRealName like'%" + rname + "%' "; } if (!string.IsNullOrEmpty(tel)) { pager.strwhere = pager.strwhere + " and CustomerTelephone= '" + tel + "' "; } if (!string.IsNullOrEmpty(idcard)) { pager.strwhere = pager.strwhere + " and CustomerIDCard= '" + idcard + "' "; } if (!string.IsNullOrEmpty(sf)) { pager.strwhere = pager.strwhere + " and CustomerProvince= '" + sf + "' "; } if (!string.IsNullOrEmpty(city)) { pager.strwhere = pager.strwhere + " and CustomerCity= '" + city + "' "; } if (!string.IsNullOrEmpty(diqu)) { pager.strwhere = pager.strwhere + " and CustomerDistrict= '" + diqu + "' "; } pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "CustomerId"; pager.FiledOrder = "CustomerId asc"; pager = CommonDal.GetPager(pager); IList <AdsCustomer> customers = DataConvertHelper <AdsCustomer> .ConvertToModel(pager.EntityDataTable); var customersAsIPageList = new StaticPagedList <AdsCustomer>(customers, pager.PageNo, pager.PageSize, pager.Amount); // CategoryServices categoryServices = new CategoryServices(); ViewData["CustomerRole"] = CategoryServices.GetCategorySelectList(SkyCustomerRootId); return(View(customersAsIPageList)); }
public ActionResult Dushuying(int?page, string type = "all") { Pager pager = new Pager(); pager.table = "Ying"; pager.strwhere = "1=1"; if (type == "all") { pager.strwhere = "1=1"; } else if (type == "wei") { pager.strwhere = "YingStartTime>'" + System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "'"; } else if (type == "ing") { pager.strwhere = "YingStartTime<'" + System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "' and YingEndTime>'" + System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "'"; } else if (type == "end") { pager.strwhere = "YingEndTime<'" + System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "'"; } else { type = "all"; pager.strwhere = "1=1"; } pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <Ying> dataList = DataConvertHelper <Ying> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <Ying>(dataList, pager.PageNo, pager.PageSize, pager.Amount); ViewBag.baomingbtn = true; if (Session["uid"] == null) { ViewBag.baomingbtn = false; } return(View(PageList)); }
public ActionResult Search(int?page, string kewords) { Pager pager = new Pager(); pager.table = "SysUser"; pager.strwhere = "UserName like'%" + kewords + "%'"; pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "ID"; pager.FiledOrder = "ID asc"; pager = CommonDal.GetPager(pager); IList <SysUser> sysUsers = DataConvertHelper <SysUser> .ConvertToModel(pager.EntityDataTable); var sysUsersAsIPageList = new StaticPagedList <SysUser>(sysUsers, pager.PageNo, pager.PageSize, pager.Amount); return(View(sysUsersAsIPageList)); }
public ActionResult CourseList(int?page, int cid) { Pager pager = new Pager(); pager.table = "VideoCourse"; pager.strwhere = "Category=" + cid; pager.PageSize = 20; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Paixu asc"; pager = CommonDal.GetPager(pager); IList <VideoCourse> dataList = DataConvertHelper <VideoCourse> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <VideoCourse>(dataList, pager.PageNo, pager.PageSize, pager.Amount); return(View(PageList)); }
// GET: /Video/ public ActionResult Index(int?page) { Pager pager = new Pager(); pager.table = "Pingjia"; pager.strwhere = "1=1"; pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "PingjiaId"; pager.FiledOrder = "PingjiaId desc"; pager = CommonDal.GetPager(pager); IList <Pingjia> pingjiaList = DataConvertHelper <Pingjia> .ConvertToModel(pager.EntityDataTable); var pingjiaListAsIPageList = new StaticPagedList <Pingjia>(pingjiaList, pager.PageNo, pager.PageSize, pager.Amount); return(View(pingjiaListAsIPageList)); }
public ActionResult Search(int?page, string keywords) { Pager pager = new Pager(); pager.table = "ImgandFile"; pager.strwhere = "FileTitle like '%" + keywords + "%'"; pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "ID"; pager.FiledOrder = "ID desc"; pager = CommonDal.GetPager(pager); IList <ImgandFile> articles = DataConvertHelper <ImgandFile> .ConvertToModel(pager.EntityDataTable); var sysUsersAsIPageList = new StaticPagedList <ImgandFile>(articles, pager.PageNo, pager.PageSize, pager.Amount); return(View(sysUsersAsIPageList)); }
// GET: /用存储过程获取分页数据/ public ActionResult Index(int?page) { Pager pager = new Pager(); pager.table = "SysUser"; pager.strwhere = "1=1"; pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "ID"; pager.FiledOrder = "ID desc"; pager = CommonDal.GetPager(pager); IList <SysUser> sysUsers = DataConvertHelper <SysUser> .ConvertToModel(pager.EntityDataTable); var sysUsersAsIPageList = new StaticPagedList <SysUser>(sysUsers, pager.PageNo, pager.PageSize, pager.Amount); return(View(sysUsersAsIPageList)); }
public ActionResult Product(int?page) { Pager pager = new Pager(); pager.table = "Product"; pager.strwhere = "1=1"; pager.PageSize = 12; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <Product> dataList = DataConvertHelper <Product> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <Product>(dataList, pager.PageNo, pager.PageSize, pager.Amount); return(View(PageList)); }
public ActionResult GetBijiByRenwuId(int?page, int rid) { Pager pager = new Pager(); pager.table = "RenwuDaka"; pager.strwhere = "RenwuName=" + rid + " and Status='false'"; pager.PageSize = 10; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <RenwuDaka> List = DataConvertHelper <RenwuDaka> .ConvertToModel(pager.EntityDataTable); System.Web.Script.Serialization.JavaScriptSerializer js = new System.Web.Script.Serialization.JavaScriptSerializer(); string json = js.Serialize(new { pagecount = pager.PageCount, dakas = List });//将对象序列化成JSON字符串。匿名类。向浏览器返回多个JSON对象。 return(Content(json)); }
public ActionResult Yinglist(int?page, int yid) { Pager pager = new Pager(); pager.table = "YingList"; pager.strwhere = " Dushuying=" + yid; pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <YingList> dataList = DataConvertHelper <YingList> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <YingList>(dataList, pager.PageNo, pager.PageSize, pager.Amount); return(View(PageList)); }
public ActionResult DakaList(int?page) { Pager pager = new Pager(); pager.table = "RenwuDaka"; pager.strwhere = "RenwuZhixingzhe=" + int.Parse(Session["renid"].ToString()); pager.PageSize = 12; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <RenwuDaka> dataList = DataConvertHelper <RenwuDaka> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <RenwuDaka>(dataList, pager.PageNo, pager.PageSize, pager.Amount); return(View(PageList)); }
public ActionResult Index(int?page) { Pager pager = new Pager(); pager.table = "AdsBaby"; pager.strwhere = "1=1"; pager.PageSize = 20; pager.PageNo = page ?? 1; pager.FieldKey = "BabyId"; pager.FiledOrder = "BabyId desc"; pager = CommonDal.GetPager(pager); IList <AdsBaby> babys = DataConvertHelper <AdsBaby> .ConvertToModel(pager.EntityDataTable); var babysAsIPageList = new StaticPagedList <AdsBaby>(babys, pager.PageNo, pager.PageSize, pager.Amount); return(View(babysAsIPageList)); }
// // GET: /JkSucai/ public ActionResult Index(int?page, int cid) { Pager pager = new Pager(); pager.table = "ChanpinOrder"; pager.strwhere = "BuyChanpin=" + cid; pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <ChanpinOrder> dataList = DataConvertHelper <ChanpinOrder> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <ChanpinOrder>(dataList, pager.PageNo, pager.PageSize, pager.Amount); return(View(PageList)); }
public ActionResult MyOrder(int?page) { Pager pager = new Pager(); pager.table = "ChanpinOrder"; pager.strwhere = "1=1 and VipUser="******"renid"].ToString()); pager.PageSize = 12; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <ChanpinOrder> dataList = DataConvertHelper <ChanpinOrder> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <ChanpinOrder>(dataList, pager.PageNo, pager.PageSize, pager.Amount); return(View(PageList)); }
// GET: /SysUser/Default1 public ActionResult Index(int?page) { Pager pager = new Pager(); pager.table = "Honor"; pager.strwhere = "1=1"; pager.PageSize = SkyPageSize; pager.PageNo = page ?? 1; pager.FieldKey = "HonorId"; pager.FiledOrder = "HonorId desc"; pager = CommonDal.GetPager(pager); IList <Honor> honors = DataConvertHelper <Honor> .ConvertToModel(pager.EntityDataTable); var honorsAsIPageList = new StaticPagedList <Honor>(honors, pager.PageNo, pager.PageSize, pager.Amount); return(View(honorsAsIPageList)); }
public ActionResult Xueyuanchengzhang(int?page) { Pager pager = new Pager(); pager.table = "Biji"; pager.strwhere = "Tags like '%成长%'"; pager.PageSize = 15; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <Biji> dataList = DataConvertHelper <Biji> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <Biji>(dataList, pager.PageNo, pager.PageSize, pager.Amount); return(View(PageList)); }
public ActionResult ChengzhangList(int?page) { Pager pager = new Pager(); pager.table = "RenwuDaka"; pager.strwhere = "Status='false'"; pager.PageSize = 12; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <RenwuDaka> dataList = DataConvertHelper <RenwuDaka> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <RenwuDaka>(dataList, pager.PageNo, pager.PageSize, pager.Amount); return(View(PageList)); }
public ActionResult List(int?page) { Pager pager = new Pager(); pager.table = "IntegralDetail"; pager.strwhere = "1=1"; pager.PageSize = SkyPageSize; pager.PageNo = page ?? 1; pager.FieldKey = "IntegralDetailId"; pager.FiledOrder = "IntegralDetailId desc"; pager = CommonDal.GetPager(pager); IList <IntegralDetail> integralDetails = DataConvertHelper <IntegralDetail> .ConvertToModel(pager.EntityDataTable); var integralsAsIPageList = new StaticPagedList <IntegralDetail>(integralDetails, pager.PageNo, pager.PageSize, pager.Amount); return(View(integralsAsIPageList)); }
// // GET: /JkSucai/ public ActionResult Index(int?page, int bid) { Pager pager = new Pager(); pager.table = "Renwu"; pager.strwhere = "RenwuBook=" + bid; pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <Renwu> dataList = DataConvertHelper <Renwu> .ConvertToModel(pager.EntityDataTable); var PageList = new StaticPagedList <Renwu>(dataList, pager.PageNo, pager.PageSize, pager.Amount); ViewBag.bid = bid; return(View(PageList)); }
public ActionResult GetSpaceByPeibanshi(int?page, int pid) { Pager pager = new Pager(); pager.table = "Product"; pager.strwhere = "1=1"; pager.PageSize = 10; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <Product> List = DataConvertHelper <Product> .ConvertToModel(pager.EntityDataTable); System.Web.Script.Serialization.JavaScriptSerializer js = new System.Web.Script.Serialization.JavaScriptSerializer(); string json = js.Serialize(new { pagecount = pager.PageCount, dakas = List });//将对象序列化成JSON字符串。匿名类。向浏览器返回多个JSON对象。 return(Content(json)); }
public ActionResult Pingjia(int?page, float?sid) { float status = sid ?? 0; if (Session["CustomerId"] != null) { int id = int.Parse(Session["CustomerId"].ToString()); var babys = unitOfWork.adsBabysRepository.Get(filter: u => u.CustomerId == id && u.Babystatus == true); int count = babys.Count(); if (count > 0) { AdsBaby baby = babys.First() as AdsBaby; Pager pager = new Pager(); pager.table = "Pingjia"; pager.strwhere = "BabyId=" + baby.BabyId; if (status != 0) { pager.strwhere = pager.strwhere + " and PingjiaValue=" + status; } pager.PageSize = 20; pager.PageNo = page ?? 1; pager.FieldKey = "PingjiaId"; pager.FiledOrder = "PingjiaId desc"; pager = CommonDal.GetPager(pager); IList <Pingjia> pingjias = DataConvertHelper <Pingjia> .ConvertToModel(pager.EntityDataTable); var pingjiasAsIPageList = new StaticPagedList <Pingjia>(pingjias, pager.PageNo, pager.PageSize, pager.Amount); ViewBag.babyId = baby.BabyId; ViewBag.babyName = baby.BabyName; return(View(pingjiasAsIPageList)); } else { return(RedirectToAction("NoBaby")); } } else { return(RedirectToAction("Login")); } }
public ActionResult SaleBabys(int?page, int salercode, string salerName) { Pager pager = new Pager(); pager.table = "AdsBaby"; pager.strwhere = "SalerCode=" + salercode; pager.PageSize = 20; pager.PageNo = page ?? 1; pager.FieldKey = "BabyId"; pager.FiledOrder = "BabyId desc"; pager = CommonDal.GetPager(pager); IList <AdsBaby> babys = DataConvertHelper <AdsBaby> .ConvertToModel(pager.EntityDataTable); var babysAsIPageList = new StaticPagedList <AdsBaby>(babys, pager.PageNo, pager.PageSize, pager.Amount); ViewBag.salerName = salerName; ViewBag.salercode = salercode; return(View(babysAsIPageList)); }
public ActionResult HeartList(int?page) { string sqlpara = CategoryServices.GetChildIdLisForSql(4); Pager pager = new Pager(); pager.table = "AdsVideo"; pager.strwhere = "VideoCategory in" + sqlpara; pager.PageSize = 50; pager.PageNo = page ?? 1; pager.FieldKey = "VideoId"; pager.FiledOrder = "VideoId desc"; pager = CommonDal.GetPager(pager); IList <AdsVideo> videos = DataConvertHelper <AdsVideo> .ConvertToModel(pager.EntityDataTable); var videosAsIPageList = new StaticPagedList <AdsVideo>(videos, pager.PageNo, pager.PageSize, pager.Amount); return(View(videosAsIPageList)); }
public ActionResult PullNext(int?page) { Pager pager = new Pager(); pager.table = "Jigou"; pager.strwhere = "1=1"; pager.PageSize = 2; pager.PageNo = page ?? 1; pager.FieldKey = "Id"; pager.FiledOrder = "Id desc"; pager = CommonDal.GetPager(pager); IList <Jigou> dataList = DataConvertHelper <Jigou> .ConvertToModel(pager.EntityDataTable); System.Web.Script.Serialization.JavaScriptSerializer js = new System.Web.Script.Serialization.JavaScriptSerializer(); string strjson = js.Serialize(new { dataList = dataList });//将对象序列化成JSON字符串。匿名类。向浏览器返回多个JSON对象。 //// string json = JsonHelper.JsonSerializerBySingleData(videoUrlfo); return(Content(strjson)); //return View(PageList); }
// GET: /SysUser/Default1 public ActionResult Index(int?page, int?iden, int?rid) { Pager pager = new Pager(); pager.table = "AdsCustomer"; pager.strwhere = "1=1"; int identity = iden ?? 0; if (identity != 0) { pager.strwhere = pager.strwhere + " and CustomerIdentity=" + iden; } int roleid = rid ?? 0; if (roleid != 0) { pager.strwhere = pager.strwhere + " and CustomerRole=" + roleid; } pager.PageSize = SkyPageSize; pager.PageNo = page ?? 1; pager.FieldKey = "CustomerId"; pager.FiledOrder = "CustomerId desc"; pager = CommonDal.GetPager(pager); IList <AdsCustomer> customers = DataConvertHelper <AdsCustomer> .ConvertToModel(pager.EntityDataTable); var customersAsIPageList = new StaticPagedList <AdsCustomer>(customers, pager.PageNo, pager.PageSize, pager.Amount); ViewBag.SmallTitle = "客户总数共计:" + pager.Amount + "人"; CategoryServices categoryServices = new CategoryServices(); ViewData["CustomerRole"] = categoryServices.GetCategorySelectList(SkyCustomerRootId); ViewData["CusRolebtn"] = categoryServices.GetCategoryListByParentID(SkyCustomerRootId); return(View(customersAsIPageList)); }