Example #1
0
 public ActionResult UpdateEmpInfo(int EmployeeId, string title, string fname, string lname, string empCode, int designation, string officeEmail, int empType, int location,
                                   string workLocation, string joinDate, string confirmDate, int manager, string relDate, string profilePic, string passportPic, string bgPic, int powerval,
                                   string StartTime, string EndTime, string quotes, int EmpStatus)
 {
     NuPortalEmpService.NuPortalEmployeeService empService = new NuPortalEmpService.NuPortalEmployeeService();
     empService.Url = Constants.EmpService;
     try
     {
         bool IsSuccess = empService.UpdateEmployee(EmployeeId, fname, lname, title, empCode, designation, manager, profilePic,
                                                    passportPic, bgPic, Convert.ToDateTime(joinDate), Convert.ToDateTime(confirmDate), officeEmail, location,
                                                    workLocation, empType, Convert.ToDateTime(relDate), DateTime.Now,
                                                    Convert.ToInt32(Session["EmpID"]), powerval, StartTime, EndTime, quotes, EmpStatus);
         if (IsSuccess)
         {
             return(Json(Common_Library.Constants.JsonSuccess));
         }
     }
     catch (Exception ex)
     {
         GeneralFunctions genFun = new GeneralFunctions();
         genFun.LogError(ControllerContext.HttpContext, ex.Message, ex.TargetSite.Name,
                         Convert.ToString(ControllerContext.RouteData.Values["action"]),
                         Convert.ToString(ControllerContext.RouteData.Values["controller"]));
         genFun = null;
     }
     finally
     {
         empService = null;
     }
     return(Json(Common_Library.Constants.JsonError));
 }