public ActionResult Index() { ViewBag.Active = "TrxBinderAllotmentQuantityView"; DateTime dtNow = DateTime.Now; BinderAllotQuantity objBinderAllotQuantity = new BinderAllotQuantity(); objBinderAllotQuantity.StartDate = dtNow.ToString("dd-MMM-yyyy"); objBinderAllotQuantity.EndDate = dtNow.ToString("dd-MMM-yyyy"); #region [Pagination Initialization] try { Int16 AccadYear = Convert.ToInt16(GlobalSettings.oUserData.AcademicYearId); string allotmentcode = ""; DataTable GetBinderAllotQtyDtl = objDbTrx.GetBinderAllotmentQtyViewNew(dtNow.AddDays(-(Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["BinderStartDayInitial"]))), dtNow, AccadYear, default(int), default(int), allotmentcode); if (GetBinderAllotQtyDtl != null && GetBinderAllotQtyDtl.Rows.Count > default(int)) { ViewBag.TotalRecords = Convert.ToInt32(GetBinderAllotQtyDtl.Rows[0]["TotalRecords"].ToString()); ViewBag.pageSize = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["RecordsPerPage"]); } } catch (Exception ex) { objDbTrx.SaveSystemErrorLog(ex, Request.UserHostAddress); } #endregion [Pagination Initialization] return(View(objBinderAllotQuantity)); }