public ActionResult SelectProduct(long id, int?PageIndex, int?PageSize, long?qProductID, string qProductTitle, int?orderCol) { if ((_crud & Zippy.SaaS.Entity.CRUD.Read) != Zippy.SaaS.Entity.CRUD.Read) { return(RedirectToAction("NoPermission", "Error")); } ViewData.Add("db", db); ViewData.Add("PageSize", PageSize ?? 10); int currentPageSize = PageSize ?? 10; int currentPageIndex = PageIndex ?? 1; Hashtable hs = new Hashtable(); hs.Add("qDepotID", id); hs.Add("qProductID", qProductID); hs.Add("orderCol", orderCol); hs.Add("qProductTitle", qProductTitle); PaginatedList <EAP.Logic.Z10.View.V_DepotProduct> result = Z10DepotProductHelper.Query(db, _tenant.TenantID.Value, currentPageSize, currentPageIndex, hs, orderCol); result.QueryParameters = hs; return(View(result)); }
public ActionResult DepotProducts(int?PageIndex, int?PageSize, long?qProductID, long?qDepotID, int?orderCol) { if ((_crud & Zippy.SaaS.Entity.CRUD.Read) != Zippy.SaaS.Entity.CRUD.Read) { return(RedirectToAction("NoPermission", "Error")); } System.Text.StringBuilder sbMenu = new System.Text.StringBuilder(); if ((_crud & Zippy.SaaS.Entity.CRUD.Read) == Zippy.SaaS.Entity.CRUD.Read) { sbMenu.AppendLine("<a href='javascript:;' class='btn list img' id='search'><i class='icon i_search'></i>查询<b></b></a>"); } sbMenu.AppendLine("<a href='javascript:;' class='btn img' id='bReload'><i class='icon i_refresh'></i>刷新<b></b></a>"); ViewData["TopMenu"] = sbMenu.ToString(); ViewData.Add("db", db); ViewData.Add("PageSize", PageSize ?? 10); int currentPageSize = PageSize ?? 10; int currentPageIndex = PageIndex ?? 1; Hashtable hs = new Hashtable(); hs.Add("qDepotID", qDepotID); hs.Add("qProductID", qProductID); hs.Add("orderCol", orderCol); PaginatedList <EAP.Logic.Z10.View.V_DepotProduct> result = Z10DepotProductHelper.Query(db, _tenant.TenantID.Value, currentPageSize, currentPageIndex, hs, orderCol); result.QueryParameters = hs; ViewData["DepotOptions"] = EAP.Logic.Z10.HtmlHelper.DepotSelectOptions(_tenant.TenantID.Value, db); return(View(result)); }
public ActionResult Index(int?PageIndex, int?PageSize, Int64?qProductIDStart, Int64?qProductIDEnd, Int64?qDepotIDStart, Int64?qDepotIDEnd, int?orderCol) { if ((_crud & Zippy.SaaS.Entity.CRUD.Read) != Zippy.SaaS.Entity.CRUD.Read) { return(RedirectToAction("NoPermission", "Error")); } System.Text.StringBuilder sbMenu = new System.Text.StringBuilder(); if ((_crud & Zippy.SaaS.Entity.CRUD.Create) == Zippy.SaaS.Entity.CRUD.Create) { sbMenu.AppendLine("<a href='/" + _ContollerName + "/Edit?ReturnUrl=" + System.Web.HttpUtility.UrlEncode("/" + _ContollerName + "/?PageSize=" + PageSize) + "' class='btn img'><i class='icon i_create'></i>添加<b></b></a>"); } if ((_crud & Zippy.SaaS.Entity.CRUD.Read) == Zippy.SaaS.Entity.CRUD.Read) { sbMenu.AppendLine("<a href='javascript:;' class='btn list img' id='search'><i class='icon i_search'></i>查询<b></b></a>"); } if ((_crud & Zippy.SaaS.Entity.CRUD.Delete) == Zippy.SaaS.Entity.CRUD.Delete) { sbMenu.AppendLine("<a href='javascript:;' class='btn img' id='bDelete'><i class='icon i_delete'></i>删除<b></b></a>"); } sbMenu.AppendLine("<a href='javascript:;' class='btn img' id='bReload'><i class='icon i_refresh'></i>刷新<b></b></a>"); ViewData["TopMenu"] = sbMenu.ToString(); ViewData.Add("db", db); ViewData.Add("PageSize", PageSize ?? 10); int currentPageSize = PageSize ?? 10; int currentPageIndex = PageIndex ?? 1; Hashtable hs = new Hashtable(); hs.Add("qProductIDStart", qProductIDStart); hs.Add("qProductIDEnd", qProductIDEnd); hs.Add("qDepotIDStart", qDepotIDStart); hs.Add("qDepotIDEnd", qDepotIDEnd); PaginatedList <EAP.Logic.Z10.View.V_DepotProduct> result = Z10DepotProductHelper.Query(db, _tenant.TenantID.Value, currentPageSize, currentPageIndex, hs, orderCol); result.QueryParameters = hs; return(View(result)); }