Example #1
0
        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();
        }
Example #2
0
        public void getHostNo(int pCustNo)
        {
            Customer customer = DatabaseAccess.getCustomerByNo(pCustNo);

            hostTextBox.Text   = customer.firstName + " " + customer.lastName;
            hostNoTextBox.Text = pCustNo.ToString();
        }
Example #3
0
 //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();
     }
 }
Example #4
0
        //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();
 }
Example #7
0
        public void getCustomerNo(int pCustNo)
        {
            Customer selectedCustomer = DatabaseAccess.getCustomerByNo(pCustNo);

            getGuest(selectedCustomer);
        }
Example #8
0
 private void WishList_Load(object sender, EventArgs e)
 {
     customer         = DatabaseAccess.getCustomerByNo(customer.customerNo);
     txtCustomer.Text = customer.firstName + " " + customer.lastName;
     getExistingItems();
 }