public void TestEditdirector() { Esigner edirector = new Esigner { DirectorID = 69, CustomerID = 1418, FirstName = "shlomi", LastName = "lastname", MiddleName = "midname", BirthDate = new DateTime(2011, 6, 10), Gender = "M", Email = "*****@*****.**", CompanyId = 1220, MobilePhone = "0547998484", IsDirector = true, IsShareholder = false, UserId = 22 }; var s = new AddHistoryDirector(edirector); s.Execute(); //this.m_oDB.ExecuteNonQuery("AddHistoryDirector2", CommandSpecies.StoredProcedure, //new QueryParameter("@DirectorID", 1), //new QueryParameter("@Name", "asdgfa")); }
public JsonResult SaveExperianDirector( int directorID, string email, string mobilePhone, string line1, string line2, string line3, string town, string county, string postcode ) { Log.Debug("Saving Experian director (E-signatures controller): {0}: {1} {2}, {3} {4} {5} {6} {7} {8}", directorID, email, mobilePhone, line1, line2, line3, town, county, postcode ); var m = new Esigner { DirectorID = directorID, Email = (email ?? string.Empty).Trim(), MobilePhone = (mobilePhone ?? string.Empty).Trim(), Line1 = (line1 ?? string.Empty).Trim(), Line2 = (line2 ?? string.Empty).Trim(), Line3 = (line3 ?? string.Empty).Trim(), Town = (town ?? string.Empty).Trim(), County = (county ?? string.Empty).Trim(), Postcode = (postcode ?? string.Empty).Trim(), }; string sValidation = m.ValidateExperianDirectorDetails(); if (!string.IsNullOrWhiteSpace(sValidation)) { return(Json(new { success = false, error = sValidation, })); } try { this.serviceClient.Instance.UpdateExperianDirectorDetails(null, this.context.UserId, m); } catch (Exception e) { Log.Warn(e, "Failed to save experian director details."); return(Json(new { success = false, error = string.Empty, })); } // try return(Json(new { success = true, error = string.Empty, })); } // SaveExperianDirector
public UpdateExperianDirectorDetails(Esigner oDetails) { m_oSp = new SpUpdateExperianDirectorDetails(DB, Log) { DirectorID = oDetails.DirectorID, Email = oDetails.Email, MobilePhone = oDetails.MobilePhone, Line1 = oDetails.Line1, Line2 = oDetails.Line2, Line3 = oDetails.Line3, Town = oDetails.Town, County = oDetails.County, Postcode = oDetails.Postcode, }; }
public JsonResult EditDirector(int nCustomerID, int nDirectorID, DirectorModel directorModel) { ms_oLog.Debug("updating director"); Director director = this._directorRepository.Get(nDirectorID); Esigner Edirector = directorModel.ToEsigner(director, nCustomerID); this.m_oServiceClient.Instance.AddHistoryDirector(Edirector); directorModel.UpdateFromModel(ref director); var tybReduced = director.Company.TypeOfBusiness.Reduce(); switch (tybReduced) { case TypeOfBusinessReduced.Limited: var limitedCurrAddress = director.DirectorAddressInfo.LimitedDirectorHomeAddress; if (!limitedCurrAddress.Any()) { limitedCurrAddress = director.DirectorAddressInfo.NonLimitedDirectorHomeAddress; } MakeAddress( directorModel.DirectorAddress, director.DirectorAddressInfo.LimitedDirectorHomeAddressPrev, CustomerAddressType.LimitedDirectorHomeAddressPrev, limitedCurrAddress, CustomerAddressType.LimitedDirectorHomeAddress ); break; default: var nonLimitedCurrAddress = director.DirectorAddressInfo.NonLimitedDirectorHomeAddress; if (!nonLimitedCurrAddress.Any()) { nonLimitedCurrAddress = director.DirectorAddressInfo.LimitedDirectorHomeAddress; } MakeAddress( directorModel.DirectorAddress, director.DirectorAddressInfo.NonLimitedDirectorHomeAddressPrev, CustomerAddressType.NonLimitedDirectorHomeAddressPrev, nonLimitedCurrAddress, CustomerAddressType.NonLimitedDirectorHomeAddress ); break; } this._directorRepository.Update(director); return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); }
public JsonResult Load(int?nCustomerID, bool bPollStatus) { Log.Debug("Loading e-signatures for customer {0} {1} polling status...", nCustomerID, bPollStatus ? "with" : "without"); Esignature[] oSignatures; Esigner[] oPotentialSigners; try { EsignatureListActionResult elar = this.serviceClient.Instance.LoadEsignatures(this.context.UserId, nCustomerID, bPollStatus); oSignatures = elar.Data; oPotentialSigners = elar.PotentialSigners; } catch (Exception e) { Log.Warn(e, "Failed to load e-signatures for customer {0} {1} polling status.", nCustomerID, bPollStatus ? "with" : "without"); oSignatures = new Esignature[0]; oPotentialSigners = new Esigner[0]; } // try Log.Debug("Loading e-signatures for customer {0} {1} polling status complete.", nCustomerID, bPollStatus ? "with" : "without"); return(Json(new { signatures = oSignatures, signers = oPotentialSigners, }, JsonRequestBehavior.AllowGet)); } // Load
public JsonResult SaveExperianDirector( string sCustomerID, string sContactEmail, int directorID, string email, string mobilePhone, string line1, string line2, string line3, string town, string county, string postcode ) { var oIsAuthResult = IsAuth <BrokerForJsonResult>( "Save Experian director details for customer " + sCustomerID, sContactEmail ); if (oIsAuthResult != null) { return(oIsAuthResult); } ms_oLog.Debug( "Saving Experian director (BrokerHome controller, broker {9}): {0}: {1} {2}, {3} {4} {5} {6} {7} {8}", directorID, email, mobilePhone, line1, line2, line3, town, county, postcode, sContactEmail ); var m = new Esigner { DirectorID = directorID, Email = (email ?? string.Empty).Trim(), MobilePhone = (mobilePhone ?? string.Empty).Trim(), Line1 = (line1 ?? string.Empty).Trim(), Line2 = (line2 ?? string.Empty).Trim(), Line3 = (line3 ?? string.Empty).Trim(), Town = (town ?? string.Empty).Trim(), County = (county ?? string.Empty).Trim(), Postcode = (postcode ?? string.Empty).Trim(), }; string sValidation = m.ValidateExperianDirectorDetails(); if (!string.IsNullOrWhiteSpace(sValidation)) { return(new BrokerForJsonResult(sValidation)); } try { this.m_oServiceClient.Instance.UpdateExperianDirectorDetails(null, null, m); } catch (Exception e) { ms_oLog.Warn(e, "Failed to save Experian director details."); return(new BrokerForJsonResult("Failed to save director details.")); } // try return(new BrokerForJsonResult()); } // SaveExperianDirector
} // LoadApplicationInfo public ActionMetaData AddHistoryDirector(Esigner Edirector) { return(Execute <AddHistoryDirector>(null, null, Edirector)); }
public ActionMetaData UpdateExperianDirectorDetails(int?nCustomerID, int?nUnderwriterID, Esigner oDetails) { return(ExecuteSync <UpdateExperianDirectorDetails>(nCustomerID, nUnderwriterID, oDetails)); } // UpdateExperianDirectorDetails
public AddHistoryDirector(Esigner edirector) { this.EDirector = edirector; }