public int createNewBills(int orderNumber) { ORDERS_DISHES_DB odm = new ORDERS_DISHES_DB(Configuration); ORDERS_DB om = new ORDERS_DB(Configuration); SERVICE_CLASS_DB scm = new SERVICE_CLASS_DB(Configuration); DELIVERY_DB dm = new DELIVERY_DB(Configuration); ORDERS orders = om.GetORDERS(orderNumber); BILLS bills = new BILLS(); bills.Amount = odm.GetAmount(orders) + scm.GetAmount(dm.GetDELIVERY(orders.Fk_Id_Delivery)); bills = BILLS_DB.AddBILLS(bills); return(bills.Id); }
public ORDERS confirmOrders(int orderNumber) { ORDERS orders = ORDERS_DB.GetORDERS(orderNumber); orders.Fk_Id_Order_Status = 4; BILLS_DB bm = new BILLS_DB(Configuration); BILLS bills = bm.GetBILLS(orders.Fk_Id_Bills); bm.UpdateBILLS_Payment_Date(bills); DELIVERY_DB dm = new DELIVERY_DB(Configuration); DELIVERY delivery = dm.GetDELIVERY(orders.Fk_Id_Delivery); delivery.Fk_Id_Delivery_Status = 4; dm.UpdateDELIVERY_Fk_Id_Delivery_Status(delivery); return(ORDERS_DB.UpdateORDERS_Fk_Id_Order_Status(orders)); }
public BILLS displayBills(int orderNumber) { ORDERS_DB om = new ORDERS_DB(Configuration); return(BILLS_DB.GetBILLS(om.GetORDERS(orderNumber).Fk_Id_Bills)); }
public BILLS_Manager(IConfiguration configuration) { BILLS_DB = new BILLS_DB(configuration); Configuration = configuration; }