public List <UOMType> GetUOMTypes_Filters(SM_UOMType searchData) { List <UOMType> list = this.GetAllUOMTypes(); list = list.Where(a => (searchData.UOMTypeID > 0) ? a.ID == searchData.UOMTypeID : true).ToList(); list = list.ToPagedList(searchData.CurrentPage++, CommonClass.PageSize).ToList(); return(list); }
public ActionResult SearchUOMType(SM_UOMType mdl) { if (string.IsNullOrEmpty(mdl.Type)) { mdl.UOMTypeID = 0; } return(RedirectToAction("UOMTypeList", mdl)); }
public int GetAllUOMTypeCount(SM_UOMType searchData) { int Count = 0; List <UOMType> list = this.GetAllUOMTypes(); list = list.Where(a => (searchData.UOMTypeID > 0) ? a.ID == searchData.UOMTypeID : true).ToList(); Count = list.Count; return(Count); }
// GET: UOMType public ActionResult UOMTypeList(SM_UOMType data) { if (Session["UserInfo"] != null) { SystemUser userInfo = (SystemUser)Session["UserInfo"]; ViewBag.SystemUserType = userInfo.SystemUserType; data.TotalPage = cs.TotalPage(da.GetAllUOMTypeCount(data)); data.TotalCount = da.GetAllUOMTypeCount(data); data.CurrentPage = 1; ViewBag.ActivePageID = "PageUOMType"; return(View("UOMTypeList", data)); } else { return(RedirectToAction("SessionTimeOut", "Error")); } }