public ContentResult GetEmpWeeklyData([ModelBinder(typeof(DataTablesBinder))] IDataTablesRequest requestModel, string searchprm)//, int EntityID = 10002,  DateTime? fromdate = null, DateTime? todate = null)
        {
            EMPWeelFilter ObjPara = new EMPWeelFilter()
            {
                EmployeeCode = CurrentUser.EmployeeCode,
                FromDate     = new DateTime(2017, 08, 15),
                ToDate       = new DateTime(2017, 09, 15)
            };

            if (!string.IsNullOrEmpty(searchprm))
            {
                ObjPara = JsonConvert.DeserializeObject <EMPWeelFilter>(searchprm,
                                                                        new JsonSerializerSettings
                {
                    NullValueHandling = NullValueHandling.Ignore,
                    DateFormatString  = "dd/MM/yyyy"
                });
            }
            //   ObjPara.EmployeeCode = 1863;
            //EMPTMSPara SearchKey = new EMPTMSPara()
            //{
            //    EntityID = 10002,
            //    DeptID = 0,
            //    @FromDate = fromdate ,
            //    @ToDate = todate,
            //    OrderBy = "EmployeeNo",
            //    OrderDirection = "DESC",
            //    Page = (requestModel.Start / requestModel.Length) + 1,
            //    PageSize = requestModel.Length,
            //};
            //fromdate = fromdate == null ? SystemConfig.CurrentDate : fromdate;
            //todate = todate == null ? SystemConfig.CurrentDate : todate;
            //ObjPara.OrderBy = "DeptName";
            //ObjPara.OrderDirection = "ASC";
            //ObjPara.Page = (requestModel.Start / requestModel.Length) + 1;
            //ObjPara.PageSize = requestModel.Length;
            DataTable collection = new DataTable();

            collection = T_TMS_EmployeeTimesheetWeeklyDetailsManager.EmployeeTMSWeeeklyFilter(ObjPara);

            System.Data.DataColumn newColumn = new System.Data.DataColumn("Accumulate", typeof(System.String));
            //newColumn.DefaultValue = "Summary";
            collection.Columns.Add(newColumn);
            int            TotalRecord = 0;
            EmpWeekSummary myWeek      = new EmpWeekSummary();

            if (collection.Rows.Count > 0)
            {
                for (int i = 0; i < collection.Rows.Count; i++)
                {
                    //collection.Rows[i]["Accumulate"] = data(collection.Rows[i],i,out myWeek);
                    data(collection.Rows[i], i, ref myWeek);
                }
                myWeek.TotalWorkHour             = 42;
                collection.Rows[1]["Accumulate"] = myWeek.IntoWeek;
                collection.Rows[2]["Accumulate"] = myWeek.WorkHourString;
                collection.Rows[3]["Accumulate"] = myWeek.OTSummary == 0? "":myWeek.OTString.ToString();
                collection.Rows[4]["Accumulate"] = myWeek.LeaveSummary == 0 ? "" : myWeek.LeaveString.ToString();
                collection.Rows[5]["Accumulate"] = myWeek.UnNoregSummary == 0 ? "" : myWeek.UnoRegString.ToString();
                collection.Rows[6]["Accumulate"] = myWeek.LackingHour == 0 ? "" : myWeek.LackingHourString;
                TotalRecord = Convert.ToInt32(collection.Rows.Count);
            }

            IEnumerable <DataRow> rows = collection.AsEnumerable().ToList();
            object temp = new object();

            foreach (var item in rows)
            {
                temp = item.Table;
            }
            //DataTablesResponseExtend results = new DataTablesResponseExtend(requestModel.Draw, temp, TotalRecord, TotalRecord);
            return(Content(JsonConvert.SerializeObject(new DataTablesResponseExtend(requestModel.Draw, temp, TotalRecord, TotalRecord)), "application/json"));
        }