예제 #1
0
        private Email ReceiveHtml()
        {


            Email email = new Email();
            email.EmailID = (hddEmailID.Value != "") ? Convert.ToInt32(hddEmailID.Value) : 0;
            email.Name = txtName.Text;
            email.EmailAddress = txtEmailAddress.Text;

            return email;
        }
예제 #2
0
 public void CreateEmail(Email email)
 {
     using (SqlConnection connection = base.GetConnection())
     {
         SqlCommand command = new SqlCommand("_EmailUpdate", connection) {
             CommandType = CommandType.StoredProcedure
         };
         command.Parameters.AddWithValue("@Type", 0);
         command.Parameters.AddWithValue("@EmailID", 0);
         command.Parameters.AddWithValue("@EmailAddress", email.EmailAddress);
         command.Parameters.AddWithValue("@Name", email.Name);
         connection.Open();
         if (command.ExecuteNonQuery() <= 0)
         {
             throw new DataAccessException("khong them moi duoc email");
         }
         command.Dispose();
     }
 }
예제 #3
0
 public void UpdateEmail(Email email)
 {
     new EmailDAO().UpdateEmail(email);
 }
예제 #4
0
 public void CreateEmail(Email email)
 {
     new EmailDAO().CreateEmail(email);
 }