public void TestMethodTotalCustomerBill()
        {
            CustomerBilling cusBill = new CustomerBilling();

            int testAmount = cusBill.CustomerBillCalculation(15, 16, 17);

            int Expected = 15 + 16 + 17;

            Assert.AreEqual(Expected, testAmount);
        }
Exemplo n.º 2
0
 internal static void AddNewCardInformationToUser(Billing CardInfoEntered, Customer CurrentCustomer)
 {
     using (var DB = new P0Context())
     {
         BillingDAO.AddBilling(CardInfoEntered, DB);
         CustomerBilling CB = new CustomerBilling
         {
             CustomerID = CurrentCustomer.CustomerID,
             BillingID  = CardInfoEntered.BillingID
         };
         CustomerBillingDAO.AddCustomerBilling(CB, DB);
     }
 }
        internal static void AddNewCardInformationToUser(Billing CardInfoEntered, Customer CurrentCustomer, P1Context _context)
        {
            var DB = _context;

            BillingDAO.AddBilling(CardInfoEntered, DB);
            CustomerBilling CB = new CustomerBilling
            {
                CustomerID = CurrentCustomer.CustomerID,
                BillingID  = CardInfoEntered.BillingID
            };

            CustomerBillingDAO.AddCustomerBilling(CB, DB);
        }
Exemplo n.º 4
0
 internal static void RemoveCustomerBilling(CustomerBilling cb, P1Context DB)
 {
     DB.CustomersBilling.Remove(cb);
     DB.SaveChanges();
 }
Exemplo n.º 5
0
 internal static void AddCustomerBilling(CustomerBilling cb, P1Context DB)
 {
     DB.CustomersBilling.Add(cb);
     DB.SaveChanges();
 }
 internal static void UpdateCustomerBilling(CustomerBilling cb, P0Context DB)
 {
     DB.CustomersBilling.Update(cb);
     DB.SaveChanges();
 }