public JsonResult AddUpdateVendor(VendorModels Model) { var UseInfo = GetLoginUserInfo(Session["EmpId"].ToString()); if (Model.ID > 0) { Model.ModifiedDate = DateTime.Now; } else { Model.ReqEmpCode = UseInfo[1]; Model.ReqEmpName = UseInfo[2]; Model.ReqEmpTitle = UseInfo[3].Equals("M") ? "Mr." : "Ms."; Model.ReqEmpEmailID = UseInfo[4]; Model.ReqMobile = UseInfo[5]; Model.AddDate = DateTime.Now; } Model.IsActive = true; return(Json(_vendorRepository.AddUpdateVendor(Model), JsonRequestBehavior.AllowGet)); }