public void Update(Customer customer) { Customer dest = WebSiteDB.MyNorthwind.Customers.FirstOrDefault(c => c.CustomerID == customer.CustomerID); if( dest != null ) { dest.CustomerName = customer.CustomerName; dest.Address = customer.Address; dest.ContactName = customer.ContactName; dest.PostalCode = customer.PostalCode; dest.Tel = customer.Tel; } }
public int Test6(Category category, Product product, Customer customer, string stringVal) { TestSerializerModel3 model = new TestSerializerModel3 { StringVal = stringVal, Category = category, Customer = customer, Product = product }; if( model.Equals(s_lastTestSerializerModel3) ) return 1; else return 0; }
public void Update(Customer customer) { customer.EnsureItemIsOK(); BllFactory.GetCustomerBLL().Update(customer); }
public void Insert(Customer customer) { customer.EnsureItemIsOK(); BllFactory.GetCustomerBLL().Insert(customer); }
public void Insert(Customer customer) { int maxId = WebSiteDB.MyNorthwind.Customers.Max(x => x.CustomerID); customer.CustomerID = maxId + 1; WebSiteDB.MyNorthwind.Customers.Add(customer); }
public void Update(Customer customer) { DbHelper.ExecuteNonQuery("UpdateCustomer", customer); }
public void Insert(Customer customer) { DbHelper.ExecuteNonQuery("InsertCustomer", customer); }