public ActionResult Appearldaycal()
 {
     AppearldaycalEntity Model = new AppearldaycalEntity();
     Model.StartDate = DateTime.Today.ToString("dd/MM/yyyy");
     Model.EndDate = DateTime.Today.Date.ToString("dd/MM/yyyy");
     return View(Model);
 }
 public JsonResult AppearldaycalList(string startDate = "", string endDate = "", int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null)
 {
     try
     {
         try
         {
             AppearldaycalEntity _Model = new AppearldaycalEntity();
             _Model.StartDate = startDate;
             _Model.EndDate = endDate;
             DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetAppearldaycalRecord, _Model);
             List<AppearldaycalEntity> ItemList = null;
             ItemList = new List<AppearldaycalEntity>();
             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 AppearldaycalEntity()
                     {
                         EMPID = dr["EMPID"].ToString(),
                         ENAME = dr["ENAME"].ToString(),
                         SECTION = dr["SECTION"].ToString(),
                         JDate = dr["JDate"].ToString(),
                         Status = dr["Status"].ToString(),
                         TTDay = dr["TTDay"].ToString(),
                         Holiday = dr["Holiday"].ToString(),
                         Present = dr["Present"].ToString(),
                         Absent = dr["Absent"].ToString(),
                         CL = dr["CL"].ToString(),
                         SL = dr["SL"].ToString(),
                         ML = dr["ML"].ToString(),
                         EL = dr["EL"].ToString(),
                     });
                 }
                 iCount += 1;
             }
             var RecordCount = dt.Rows.Count;
             var Record = ItemList;
             Session["Appreal"] = 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 });
     }
 }