public int Update(Customer aCustomer) { try { return customerGateway.Update(aCustomer); } catch (Exception exception) { throw (exception); } }
public int Insert(Customer aCustomer) { try { return customerGateway.Insert(aCustomer); } catch (Exception expException) { throw (expException); } }
public int Update(Customer aCustomer) { using (SqlConnection conn = new SqlConnection(this.connection)) { try { SQL = ""; SqlCommand cmd = new SqlCommand(SQL, conn); conn.Open(); result = cmd.ExecuteNonQuery(); conn.Close(); return result; } catch (Exception exception) { throw (exception); } } }