VolTeer.BusinessLogicLayer.VT.Vend.sp_Contact_BLL.UpdateContactContext C# (CSharp) Метод

UpdateContactContext() публичный Метод

public UpdateContactContext ( sp_Contact_DM contact ) : void
contact VolTeer.DomainModels.VT.Vend.sp_Contact_DM
Результат void
        public void UpdateContactContext(sp_Contact_DM contact)
        {
            dal.UpdateContactContext(contact);
        }

Usage Example

Пример #1
0
        public void TestContactUpdate()
        {
            //Test Our Read
            DataTable dt = cExcel.ReadExcelFile("Sheet1", Path.Combine(cExcel.GetHelperFilesDir(), "Contact.xlsx"));
            foreach (DataRow row in dt.Rows) // Loop over the rows.
            {
                string updateFirstName = "TestFirstName";
                string updateMiddleName = "TestMiddleName";
                string updateLastName = "TestLastName";
                string contactID = row["ContactID"].ToString();
                sp_Contact_DM data = new sp_Contact_DM();
                data.ContactID = new Guid(contactID);
                data.ContactFirstName = updateFirstName;
                data.ContactMiddleName = updateMiddleName;
                data.ContactLastName = updateLastName;
                sp_Contact_BLL contact = new sp_Contact_BLL();
                contact.UpdateContactContext(data);
                data = contact.ListContacts(new Guid(contactID));
                Assert.AreEqual(updateFirstName, data.ContactFirstName, "Contact First Name Not Set As Expected");
                Assert.AreEqual(updateMiddleName, data.ContactMiddleName, "Contact Middle Name Not Set As Expected");
                Assert.AreEqual(updateLastName, data.ContactLastName, "Contact Last Name Not Set As Expected");

            }
        }