public UpdateEmailAddr ( |
||
_cEmail | ||
Résultat | void |
/* public sp_Email_DM hSelectVolAddress(int emailID) { sp_Email_DM Email = new sp_Email_DM(); sp_VolEmail_BLL VolEmailBll = new sp_VolEmail_BLL(); Email = VolEmailBll.ListEmails(emailID); return Email; }*/ public void hUpdateVolEmail(sp_Email_DM Email, string emailAddress) { sp_VolEmail_BLL VolEmailBll = new sp_VolEmail_BLL(); Email.EmailAddr = emailAddress; VolEmailBll.UpdateEmailAddr(Email); }
public void hUpdateVolEmail(sp_Email_DM Email, string emailAddress, bool primaryFlg) { sp_VolEmail_BLL VolEmailBll = new sp_VolEmail_BLL(); Email.EmailAddr = emailAddress; Email.PrimaryFlg = primaryFlg; VolEmailBll.UpdateEmailAddr(Email); }
public void TestVolEmailUpdate() { sp_VolEmail_BLL volEmailBLL = new sp_VolEmail_BLL(); volEmailBLL.InsertEmailContext(ref primaryTestVolEmail); sp_Email_DM updateEmail = volEmailBLL.ListPrimaryEmail(primaryTestVolEmail); String newEmailAddr = "*****@*****.**"; updateEmail.EmailAddr = newEmailAddr; volEmailBLL.UpdateEmailAddr(updateEmail); sp_Email_DM selectedEmail = volEmailBLL.ListPrimaryEmail(updateEmail); //To get all emails listed, create a new domain model with no emailID specified. sp_Email_DM selectAllEmails = new sp_Email_DM(); selectAllEmails.VolID = updateEmail.VolID; List<sp_Email_DM> selectedEmailList = volEmailBLL.ListEmails(selectAllEmails); Assert.IsTrue(EmailListContains(selectedEmailList, updateEmail)); Assert.IsTrue(EmailListContains(selectedEmailList, selectedEmail)); Assert.IsTrue(EmailEquals(selectedEmail,updateEmail)); Assert.AreEqual(newEmailAddr, selectedEmail.EmailAddr); }