コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 internal static void AddCustomerShipping(CustomerShipping cs, P1Context DB)
 {
     DB.CustomersShipping.Add(cs);
     DB.SaveChanges();
 }
コード例 #4
0
 internal static void RemoveCustomersShipping(CustomerShipping cs, P1Context DB)
 {
     DB.CustomersShipping.Remove(cs);
     DB.SaveChanges();
 }
コード例 #5
0
 internal static void UpdateCustomersShipping(CustomerShipping cs, P0Context DB)
 {
     DB.CustomersShipping.Update(cs);
     DB.SaveChanges();
 }