//===================================================================================================================================== //=============================END OF INVENTORY MANAGER PROGRAM======================================================================== //===================================================================================================================================== //===================================================================================================================================== //=============================BEGINNING OF ORDER CLERKS PROGRAM======================================================================= //===================================================================================================================================== // Create object Order private Order createOrder() { Order aorder = new Order(); Book abook = new Book(); Client aclient = new Client(); abook = BookDA.SearchISBN(Convert.ToInt64(comboBoxOrdISBN.Text)); aclient = ClientDA.SearchName(comboBoxOrdClient.Text); aorder.OrdId = OrderDA.OrderID() + 1; aorder.OrdClient = aclient; aorder.OrdBbook = abook; aorder.OrdBkQuantity = Convert.ToInt32(textBoxOrdBkQt.Text); aorder.OrdCost = aorder.OrdBkQuantity * BookDA.SearchISBN(Convert.ToInt64(comboBoxOrdISBN.Text)).BkUnitPrice; aorder.OrdDate = Convert.ToDateTime(dateTimePickerOrder.Value); aorder.OrdType = comboBoxOrdMadeBy.Text; textBoxOrId.Text = aorder.OrdId.ToString(); return(aorder); }
//________________ORDER TAB_______________________________________________________________________ private Order createOrder() { Order aOrder = new Order(); Clients aClients = new Clients(); Books aBook = new Books(); Employee aEmployee = new Employee(); aBook = BooksDA.SearchByTitle(comboBoxOrdProduct.Text); aClients = ClientsDA.Search(comboBoxOrdClient.Text); aEmployee = EmployeeDA.Search(Convert.ToInt32(textBoxOrdEmployee.Text)); aOrder.OrdNumber = OrderDA.OrderID() + 1; aOrder.OrdEmployee = null; aOrder.OrdEmployee = aEmployee; aOrder.OrdClient = aClients; aOrder.OrdProduct = aBook; aOrder.OrdQuantity = Convert.ToInt32(textBoxOrdQuantity.Text); aOrder.OrdTotal = aOrder.OrdQuantity * BooksDA.SearchByTitle(comboBoxOrdProduct.Text).unitPrice; aOrder.OrdDate = Convert.ToDateTime(dateTimePicker1.Value); return(aOrder); }