Пример #1
0
 public ActionResult SavePerInfo(int EmployeeId, string address1, string city1, string state1, string country1, string zipcode1, string phone1, string address2, string city2,
                                 string state2, string country2, string zipcode2, string phone2, string EmergencyPhone, string Email, string Dob, string BloodGroup, string Nationality,
                                 string Gender)
 {
     NuPortalEmpService.NuPortalEmployeeService empService = new NuPortalEmpService.NuPortalEmployeeService();
     empService.Url = Constants.EmpService;
     try
     {
         bool IsSuccess = empService.SetPersonalInfo(EmployeeId, address1, city1, state1, country1, zipcode1,
                                                     phone1, address2, city2, state2, country2, zipcode2, phone2, EmergencyPhone, Email, Convert.ToDateTime(Dob), Gender, Nationality, BloodGroup,
                                                     DateTime.Now, DateTime.Now, Convert.ToInt32(Session["EmpID"]), Convert.ToInt32(Session["EmpID"]));
         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));
 }