public bool SetDirectDepositeFormData(DirectDepositeFormModel model, long UserId) { try { using (workorderEMSEntities Context = new workorderEMSEntities()) { var EmployeeId = objworkorderEMSEntities.UserRegistrations.Where(x => x.UserId == UserId).FirstOrDefault()?.EmployeeID; var data = GetDirectDepositeDataByEmployeeId(EmployeeId); if (data != null) { return(Context.spSetDirectDepositForm("U", EmployeeId, model.Account1.EmployeeBankName, model.Account1.AccountType, model.Account1.Account, model.Account1.BankRouting, model.Account1.DepositeAmount.HasValue ? model.Account1.DepositeAmount.Value : 0, model.Account2.EmployeeBankName, model.Account2.AccountType, model.Account2.Account , model.Account2.BankRouting, model.VoidCheck, "Y") > 0 ? true : false); } var add = Context.spSetDirectDepositForm("I", EmployeeId, model.Account1.EmployeeBankName, model.Account1.AccountType, model.Account1.Account, model.Account1.BankRouting, model.Account1.DepositeAmount.HasValue ? model.Account1.DepositeAmount.Value : 0, model.Account2.EmployeeBankName, model.Account2.AccountType, model.Account2.Account , model.Account2.BankRouting, model.VoidCheck, "Y");// > 0 ? true : false; return(true); } } catch (Exception ex) { throw ex; } }
public PartialViewResult _DirectDepositeForm(string Id) { var model = new DirectDepositeFormModel(); model = _IGuestUser.GetDirectDepositeDataByEmployeeId(Id); return(PartialView("~/Views/NewAdmin/ePeople/_DirectDepositeEditForm.cshtml", model)); }
/// <summary> /// Created By /// </summary> /// <param name="model"></param> /// <returns></returns> public bool SaveDirectDepositeForm(DirectDepositeFormModel model) { try { using (workorderEMSEntities Context = new workorderEMSEntities()) { var tt = new GuestUserRepository(); var data = tt.GetDirectDepositeDataByEmployeeId(model.EmployeeId); if (data != null) { return(Context.spSetDirectDepositForm("U", model.EmployeeId, model.Account1.EmployeeBankName, model.Account1.AccountType, model.Account1.Account, model.Account1.BankRouting, model.Account1.DepositeAmount, model.Account2.EmployeeBankName, model.Account2.AccountType, model.Account2.Account , model.Account2.BankRouting, model.VoidCheck, "Y") > 0 ? true : false); } return(Context.spSetDirectDepositForm("I", model.EmployeeId, model.Account1.EmployeeBankName, model.Account1.AccountType, model.Account1.Account, model.Account1.BankRouting, model.Account1.DepositeAmount.HasValue ? model.Account1.DepositeAmount.Value : 0, model.Account2.EmployeeBankName, model.Account2.AccountType, model.Account2.Account , model.Account2.BankRouting, model.VoidCheck, "Y") > 0 ? true : false); } } catch (Exception ex) { throw ex; } }
public PartialViewResult _DirectDepositeForm() { DirectDepositeFormModel model = new DirectDepositeFormModel(); var ObjLoginModel = (eTracLoginModel)(Session["eTrac"]); model = _IGuestUserRepository.GetDirectDepositeDataByUserId(ObjLoginModel.UserId); return(PartialView("_directDepositeForm", model)); }
public JsonResult _DirectDepositeForm(DirectDepositeFormModel model) { if (model != null) { _IePeopleManager.SaveDirectDepositeForm(model); return(Json(true, JsonRequestBehavior.AllowGet)); } ViewBag.NotSaved = true; return(Json(false, JsonRequestBehavior.AllowGet));; }
public ActionResult _DirectDepositeForm(DirectDepositeFormModel model) { if (ModelState.IsValid) { var ObjLoginModel = (eTracLoginModel)(Session["eTrac"]); _IGuestUserRepository.SetDirectDepositeFormData(model, ObjLoginModel.UserId); return(Json(true, JsonRequestBehavior.AllowGet)); } ViewBag.NotSaved = true; return(PartialView("_directDepositeForm", model)); }
public DirectDepositeFormModel GetDirectDepositeDataByUserId(long UserId) { try { DirectDepositeFormModel result = new DirectDepositeFormModel(); using (workorderEMSEntities Context = new workorderEMSEntities()) { var EmployeeId = objworkorderEMSEntities.UserRegistrations.Where(x => x.UserId == UserId).FirstOrDefault()?.EmployeeID; result = Context.spGetDirectDepositForm(EmployeeId).Select(x => new DirectDepositeFormModel { Account1 = new AccountModel { Account = x.DDF_AccountNumber_1, AccountType = x.DDF_AccountType_1, BankRouting = x.DDF_BankRoutingNumber_1, DepositeAmount = x.DDF_PrcentageOrDollarAmount_1, EmployeeBankName = x.DDF_BankRoutingNumber_1 }, Account2 = new AccountModel { Account = x.DDF_AccountNumber_2, AccountType = x.DDF_AccountType_2, BankRouting = x.DDF_BankRoutingNumber_2, DepositeAmount = x.DDF_PrcentageOrDollarAmount_1, EmployeeBankName = x.DDF_BankRoutingNumber_2 }, EmployeeId = EmployeeId, PrintedName = x.EmployeeName, }).FirstOrDefault(); result = result == null ? new DirectDepositeFormModel() : result; result.EmployeeId = EmployeeId; return(result); } } catch (Exception ex) { throw ex; } }
/// <summary> /// Created By : Ashwajit Bansod /// Created Date : 02-11-2019 /// Created For : TO save files from mobile /// </summary> /// <param name="obj"></param> /// <returns></returns> public bool SaveFileList(CommonFormModel obj) { bool isSaved = false; var _guestRepository = new GuestUserRepository(); try { if (obj != null) { if (obj.FormName == "EducationForm" && obj.EducationFormModel != null) { var educatioModel = new EducationVarificationModel(); educatioModel.EvfId = obj.EducationFormModel.EVF_Id; educatioModel.Certificate = obj.EducationFormModel.EVF_SchoolDegreeDiplomaCert; educatioModel.HighSchool.SchoolName = obj.EducationFormModel.EVF_OrganizationName; educatioModel.HighSchool.City = obj.EducationFormModel.EVF_City; educatioModel.HighSchool.State = obj.EducationFormModel.EVF_State; educatioModel.HighSchool.AttendFrom = Convert.ToDateTime(obj.EducationFormModel.EVF_AttendedFrom); educatioModel.HighSchool.AttendTo = Convert.ToDateTime(obj.EducationFormModel.EVF_AttendedTo); educatioModel.IsActive = "Y"; _guestRepository.SetEducationVerificationForm(obj.UserId, educatioModel); isSaved = true; } else if (obj.FormName == "DirectDepositForm" && obj.DirectDepositFormModel != null) { var directDepo = new DirectDepositeFormModel(); directDepo.Account1.EmployeeBankName = obj.DirectDepositFormModel.DDF_BankName_1; directDepo.Account1.AccountType = obj.DirectDepositFormModel.DDF_AccountType_1; directDepo.Account1.Account = obj.DirectDepositFormModel.DDF_AccountNumber_1; directDepo.Account1.BankRouting = obj.DirectDepositFormModel.DDF_BankRountingNumber_1; directDepo.Account1.DepositeAmount = obj.DirectDepositFormModel.DDF_PercentageOrDollarAmount_1; directDepo.Account2.EmployeeBankName = obj.DirectDepositFormModel.DDF_BankName_2; directDepo.Account2.AccountType = obj.DirectDepositFormModel.DDF_AccountType_2; directDepo.Account2.Account = obj.DirectDepositFormModel.DDF_AccountNumber_2; directDepo.Account2.BankRouting = obj.DirectDepositFormModel.DDF_BankRountingNumber_2; directDepo.Account2.DepositeAmount = obj.DirectDepositFormModel.DDF_PercentageOrDollarAmount_2; _guestRepository.SetDirectDepositeFormData(directDepo, obj.UserId); isSaved = true; } else if (obj.FormName == "EmergencyContactInfo" && obj.EmergencyContactFormModel != null) { var emergency_form = new EmergencyContactFormModel(); emergency_form.ECF_EMP_EmployeeId = obj.EmergencyContactFormModel.ECF_EMP_EmployeeId; emergency_form.ECF_HomeEmail = obj.EmergencyContactFormModel.ECF_HomeEmail; emergency_form.ECF_HomePhone = obj.EmergencyContactFormModel.ECF_HomePhone; emergency_form.ECF_Id = obj.EmergencyContactFormModel.ECF_Id; emergency_form.ECF_NickName = obj.EmergencyContactFormModel.ECF_NickName; emergency_form.ECF_FirstName = obj.EmergencyContactFormModel.ECF_FirstName; emergency_form.ECF_MiddleName = obj.EmergencyContactFormModel.ECF_MiddleName; emergency_form.ECF_LastName = obj.EmergencyContactFormModel.ECF_LastName; emergency_form.ECF_Address = obj.EmergencyContactFormModel.ECF_Address; emergency_form.ECF_Gender = obj.EmergencyContactFormModel.ECF_Gender; emergency_form.ECF_Citizenship = obj.EmergencyContactFormModel.ECF_Citizenship; emergency_form.ECF_BirthDate = obj.EmergencyContactFormModel.ECF_BirthDate; emergency_form.ECF_DriverLicense = obj.EmergencyContactFormModel.ECF_DriverLicense; emergency_form.ECF_EmergencyContactName = obj.EmergencyContactFormModel.ECF_EmergencyContactName; emergency_form.ECF_Mobile = obj.EmergencyContactFormModel.ECF_Mobile; emergency_form.ECF_PhoneNumber = obj.EmergencyContactFormModel.ECF_PhoneNumber; emergency_form.ECF_SSN = obj.EmergencyContactFormModel.ECF_SSN; emergency_form.ECF_Relationship = obj.EmergencyContactFormModel.ECF_Relationship; emergency_form.ECF_HomeAddress = obj.EmergencyContactFormModel.ECF_HomeAddress; _guestRepository.SetEmergencyContactFormData(emergency_form, obj.UserId); isSaved = true; } else if (obj.FormName == "W-4" && obj.W4FormModel != null) { var w4_Form = new W4FormModel(); w4_Form.EmployeerNameAndAddress = obj.W4FormModel.EmployeerNameAndAddress; w4_Form.City = obj.W4FormModel.City; w4_Form.State = obj.W4FormModel.State; w4_Form.Zip = obj.W4FormModel.Zip; w4_Form.FirstName = obj.W4FormModel.FirstName; w4_Form.LastName = obj.W4FormModel.LastName; w4_Form.MiddleName = obj.W4FormModel.MiddleName; w4_Form.w4F_10 = obj.W4FormModel.w4F_10; w4_Form.EmployeeMaritalStatus = obj.W4FormModel.EmployeeMaritalStatus; w4_Form.w4F_4 = obj.W4FormModel.w4F_4; w4_Form.w4F_5 = obj.W4FormModel.w4F_5; w4_Form.w4F_6 = obj.W4FormModel.w4F_6; w4_Form.w4F_7 = obj.W4FormModel.w4F_7; w4_Form.w4F_8EmployersName = obj.W4FormModel.w4F_8EmployersName; w4_Form.w4F_9 = obj.W4FormModel.w4F_9; w4_Form.EmpId = obj.W4FormModel.EmpId; w4_Form.W4FId = obj.W4FormModel.W4FId; w4_Form.SSN = obj.W4FormModel.SSN; // _guestRepository.SetDirectDepositeFormData(w4_Form, obj.UserId); } } } catch (Exception ex) { } return(isSaved); }