internal static void AddNewShippingInformationToUser(Shipping address, Customer customer, P1Context _context) { var DB = _context; ShippingDAO.AddShippingInformation(address, DB); CustomerShipping CS = new CustomerShipping { CustomerID = customer.CustomerID, ShippingID = address.ShippingID }; CustomerShippingDAO.AddCustomerShipping(CS, DB); }
internal static void AddNewShippingInformationToUser(Billing card, Customer customer, P1Context _context) { Shipping S = new Shipping { AddressNum = card.AddressNum, AddressStreet = card.AddressStreet, AddressCity = card.AddressCity, AddressState = card.AddressState, AddressZipCode = card.AddressZipCode, }; var DB = _context; ShippingDAO.AddShippingInformation(S, DB); CustomerShipping CS = new CustomerShipping { CustomerID = customer.CustomerID, ShippingID = S.ShippingID }; CustomerShippingDAO.AddCustomerShipping(CS, DB); }
internal static void AddCustomerShipping(CustomerShipping cs, P1Context DB) { DB.CustomersShipping.Add(cs); DB.SaveChanges(); }
internal static void RemoveCustomersShipping(CustomerShipping cs, P1Context DB) { DB.CustomersShipping.Remove(cs); DB.SaveChanges(); }
internal static void UpdateCustomersShipping(CustomerShipping cs, P0Context DB) { DB.CustomersShipping.Update(cs); DB.SaveChanges(); }