Ejemplo n.º 1
0
        public JsonResult Read()
        {
            //Declare of local variables
            DataTable        dt = new DataTable();
            LogonUserSession logonUserSession = new LogonUserSession();
            Int64            userRole         = 0;

            //assigning user role
            userRole = Convert.ToInt64(Session["RoleId"].ToString());

            MTSHRDataLayer.EmployeeDetails employeedetails = new MTSHRDataLayer.EmployeeDetails();
            //dt = userRole == UserConstants.User ? employeedetails.Read().Select("Active=1").CopyToDataTable() : employeedetails.Read();
            dt = employeedetails.Read();

            return(Json(JsonConvert.SerializeObject(dt), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
 public JsonResult Read()
 {
     MTSHRDataLayer.EmployeeDetails employeedetails = new MTSHRDataLayer.EmployeeDetails();
     return(Json(JsonConvert.SerializeObject(employeedetails.Read()), JsonRequestBehavior.AllowGet));
 }