Beispiel #1
0
        private void ParseFormDataAndUpdateDataAccessObject(EditData ed)
        {
            var id    = new AccountId(int.Parse(txtAccId.Text));
            var email = new DAL.Email(txtEmail.Text);
            var phone = new Phone(txtPhone.Text);
            var add1  = txtAddress1.Text;
            var add2  = txtAddress2.Text;
            var cty   = txtCity.Text;
            var ctry  = cbxCounty.Text;

            var details = new EditAccountDetails(id, email, phone, add1, add2, cty, ctry);

            ed.UpdateAccount(details);
        }
Beispiel #2
0
 /// <summary>
 /// Create a new Email object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="email1">Initial value of the Email1 property.</param>
 /// <param name="subscriptionsId">Initial value of the SubscriptionsId property.</param>
 public static Email CreateEmail(global::System.Int32 id, global::System.String email1, global::System.Int32 subscriptionsId)
 {
     Email email = new Email();
     email.Id = id;
     email.Email1 = email1;
     email.SubscriptionsId = subscriptionsId;
     return email;
 }
 /// <summary>
 /// Create a new Email object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="address">Initial value of the Address property.</param>
 /// <param name="createdDate">Initial value of the CreatedDate property.</param>
 /// <param name="editedDate">Initial value of the EditedDate property.</param>
 public static Email CreateEmail(global::System.Int32 id, global::System.String address, global::System.DateTime createdDate, global::System.DateTime editedDate)
 {
     Email email = new Email();
     email.ID = id;
     email.Address = address;
     email.CreatedDate = createdDate;
     email.EditedDate = editedDate;
     return email;
 }
Beispiel #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Emails EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEmails(Email email)
 {
     base.AddObject("Emails", email);
 }
 public void UpdateEmail(Email email)
 {
     _dbContext.SaveChanges();
 }