public JsonResult WelformDeptList(string startDate = "", string endDate = "", string DeptName = "", int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null) { try { try { WelformEntity _Model = new WelformEntity(); _Model.DeptName = DeptName; _Model.StartDate = startDate; _Model.EndDate = endDate; DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetWFDeptRecord, _Model); List<WelformEntity> ItemList = null; ItemList = new List<WelformEntity>(); int iCount = 0; int offset = 0; offset = jtStartIndex / jtPageSize; foreach (DataRow dr in dt.Rows) { if (iCount >= jtStartIndex && iCount < (jtPageSize * (offset + 1))) { ItemList.Add(new WelformEntity() { PDate = dr["PDate"].ToString(), EMPID = dr["EMPID"].ToString(), EName = dr["EName"].ToString(), Designation = dr["Designation"].ToString(), DeptName = dr["DeptName"].ToString(), Intime = dr["Intime"].ToString(), Outtime = dr["Outtime"].ToString(), Status = dr["Status"].ToString(), }); } iCount += 1; } var RecordCount = dt.Rows.Count; var Record = ItemList; Session["WFDept"] = ItemList; return Json(new { Result = "OK", Records = Record, TotalRecordCount = RecordCount }); } catch (Exception ex) { return Json(new { Result = "ERROR", Message = ex.Message }); } } catch (Exception ex) { return Json(new { Result = "ERROR", Message = ex.Message }); } }
public ActionResult WelformDept() { WelformEntity iWF = new WelformEntity(); ViewData["DeptName"]=GetAllDepatementListItem(); iWF.StartDate = DateTime.Today.Date.ToString("dd/MM/yyyy"); iWF.EndDate = DateTime.Today.Date.ToString("dd/MM/yyyy"); return View("WelformDept",iWF); }
public ActionResult WelformWiseExcel(string EX1 = "", string EX2 = "", string EX3 = "") { WelformEntity _Model = new WelformEntity(); _Model.StartDate = EX1; _Model.EndDate = EX2; _Model.EMPID = EX3; DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetWelformWiseRecord, _Model); ERP.Utility.Excelimport.ExcelFileResult actionResult = new ERP.Utility.Excelimport.ExcelFileResult(dt) { FileDownloadName = "WelformEMPWise.xls" }; return actionResult; }
public ActionResult WelformWise() { WelformEntity iWelform = new WelformEntity(); ViewData["EMPID"] = GetAllWelformWiseListItem(); iWelform.StartDate = DateTime.Today.Date.ToString("dd/MM/yyyy"); iWelform.EndDate = DateTime.Today.Date.ToString("dd/MM/yyyy"); return View(iWelform); }
public ActionResult Welform() { WelformEntity iWelform = new WelformEntity(); iWelform.StartDate = DateTime.Today.Date.ToString("dd/MM/yyyy"); iWelform.EndDate = DateTime.Today.Date.ToString("dd/MM/yyyy"); return View("Welform", iWelform); }
public ActionResult WelExcelReport(string startDate = "", string endDate = "") { WelformEntity _Model = new WelformEntity(); _Model.StartDate = startDate; _Model.EndDate = endDate; DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetWelformRecord, _Model); ERP.Utility.Excelimport.ExcelFileResult actionResult = new ERP.Utility.Excelimport.ExcelFileResult(dt) { FileDownloadName = "WelformAttendance.xls" }; return actionResult; }