private void getShowInfo() { dgvPiecesTaken.Rows.Clear(); dgvSold.Rows.Clear(); dgvGuestList.Rows.Clear(); guests.Clear(); getShowType(); if (showNoTextBox.Text != "" && Convert.ToInt32(showNoTextBox.Text) > 0) { show.showNo = Convert.ToInt32(showNoTextBox.Text); } if (hostNoTextBox.Text != "") { show.hostNo = Convert.ToInt32(hostNoTextBox.Text); Customer customer = DatabaseAccess.getCustomerByNo(show.hostNo); hostTextBox.Text = customer.firstName + " " + customer.lastName; } else { hostTextBox.Text = ""; } getExistingGuests(); getExistingShowPiecesTaken(); getExistingShowPiecesSold(); }
public void getHostNo(int pCustNo) { Customer customer = DatabaseAccess.getCustomerByNo(pCustNo); hostTextBox.Text = customer.firstName + " " + customer.lastName; hostNoTextBox.Text = pCustNo.ToString(); }
//get info about order to store if changes are made private void getOrderInfo() { if (orderNoTextBox.Text != "") { order.orderNo = Convert.ToInt32(orderNoTextBox.Text); } if (order.orderNo > 0) { if (showNoTextBox.Text != "") { order.showNo = Convert.ToInt32(showNoTextBox.Text); txtShowName.Text = DatabaseAccess.getShowNameByNo(order.showNo); } else { txtShowName.Text = ""; } if (customerNoTextBox.Text != "") { order.customerNo = Convert.ToInt32(customerNoTextBox.Text); Customer customer = DatabaseAccess.getCustomerByNo(order.customerNo); txtName.Text = customer.firstName + " " + customer.lastName + " (" + customer.customerNo + ")"; getCustomerCredit(); } else { txtName.Text = ""; } order.orderDate = orderDateDateTimePicker.Value; order.notes = txtNotes.Text; if (subtotalTextBox.Text != "") { order.subtotal = Convert.ToDecimal(subtotalTextBox.Text); } if (discountTextBox.Text != "") { order.discount = Convert.ToDecimal(discountTextBox.Text); } if (txtNewTotal.Text != "") { order.newSubtotal = Convert.ToDecimal(txtNewTotal.Text); } order.taxable = taxableCheckBox.Checked; if (taxTextBox.Text != "") { order.tax = Convert.ToDecimal(subtotalTextBox.Text); } if (totalTextBox.Text != "") { order.total = Convert.ToDecimal(totalTextBox.Text); } order.amountPaid = nudAmountPaid.Value; cbPaidFull.Checked = (order.amountPaid >= order.total); order.paymentType = (PaymentType)Enum.Parse(typeof(PaymentType), paymentTypeComboBox.Text); order.checkNo = txtCheckNo.Text; txtAmountDue.Text = (order.total - order.amountPaid).ToString("f2"); getExistingItems(); } }
//get a customer by itsnumber public void getCustomerNo(int pCustNo) { Customer selectedCustomer = DatabaseAccess.getCustomerByNo(pCustNo); txtName.Text = selectedCustomer.firstName + " " + selectedCustomer.lastName + " (" + selectedCustomer.customerNo + ")"; customerNoTextBox.Text = pCustNo.ToString(); getCustomerCredit(); }
public void getCustomer(int pCustNo) { Customer customer = DatabaseAccess.getCustomerByNo(pCustNo); rtxtAddress.Text = customer.firstName + " " + customer.lastName + "\r\n" + customer.street + "\r\n" + customer.city + ", " + customer.state + " " + customer.zip; //listBox1.Items.Clear(); //listBox1.Items.Add(customer.firstName + " " + customer.lastName); //listBox1.Items.Add(customer.street); //listBox1.Items.Add(customer.city + ", " + customer.state + " " + customer.zip); }
private void CustomerListing_Load(object sender, EventArgs e) { customer = DatabaseAccess.getCustomerByNo(customer.customerNo); txtCustomerName.Text = customer.firstName + " " + customer.lastName; loadData(); }
public void getCustomerNo(int pCustNo) { Customer selectedCustomer = DatabaseAccess.getCustomerByNo(pCustNo); getGuest(selectedCustomer); }
private void WishList_Load(object sender, EventArgs e) { customer = DatabaseAccess.getCustomerByNo(customer.customerNo); txtCustomer.Text = customer.firstName + " " + customer.lastName; getExistingItems(); }