示例#1
0
        public JsonResult GetEmployeeDashBoard(int Month, int Year)
        {
            var holiday = ""; var balance = ""; var approve_leave = ""; var Inprogress_leave = "";
            var employee = ""; var notification = ""; var leave_all_type = ""; var Attendence_detail = "";
            var Employment_type = "";;

            try
            {
                int Emp_id = Convert.ToInt32(Session["emp_id"].ToString());
                var ds     = dblayer.GetEmpDashBoard(Emp_id, Month, Year);

                holiday = Utility.DataTableToJSONWithJSONNet(ds.Tables[0]);

                balance           = Utility.DataTableToJSONWithJSONNet(ds.Tables[1]);
                approve_leave     = Utility.DataTableToJSONWithJSONNet(ds.Tables[2]);
                Inprogress_leave  = Utility.DataTableToJSONWithJSONNet(ds.Tables[3]);
                employee          = Utility.DataTableToJSONWithJSONNet(ds.Tables[4]);
                notification      = Utility.DataTableToJSONWithJSONNet(ds.Tables[6]);
                leave_all_type    = Utility.DataTableToJSONWithJSONNet(ds.Tables[7]);
                Attendence_detail = Utility.DataTableToJSONWithJSONNet(ds.Tables[8]);
                Employment_type   = Utility.DataTableToJSONWithJSONNet(ds.Tables[9]);
            }
            catch
            {
                RedirectToAction("Login", "Home");
            }
            var result = new { holiday, balance, approve_leave, Inprogress_leave, employee, notification, leave_all_type, Attendence_detail, Employment_type };

            return(Json(result, JsonRequestBehavior.AllowGet));
        }