Ejemplo n.º 1
0
        private void DisplayInvoice()
        {
            if (CurrentSelectedInvoice != null)
            {
                InvoiceTxtbox.Text = CurrentSelectedInvoice.InvoiceID.ToString();
                v.Text             = CurrentSelectedInvoice.InvoiceDateTime.ToString();

                CustNameTxbox.Text    = CurrentSelectedInvoice.CustomerName;
                CustEmailTxtbox.Text  = CurrentSelectedInvoice.CustomerEmail;
                CustAddressTxbox.Text = CurrentSelectedInvoice.CustomerAddress;

                //if items are shipped, checkbox is checked
                if ((bool)CurrentSelectedInvoice.Shipping == true)
                {
                    ShippedChckbox.IsChecked = true;
                }
                else
                {
                    ShippedChckbox.IsChecked = false;
                }
            }

            else
            {
                InvoiceTxtbox.Clear();
                CustNameTxbox.Clear();
                CustEmailTxtbox.Clear();
                CustAddressTxbox.Clear();
            }
        }
Ejemplo n.º 2
0
 private void NewBtn_Click(object sender, RoutedEventArgs e)
 {
     InvoiceTxtbox.Clear();
     CustNameTxbox.Clear();
     CustEmailTxtbox.Clear();
     CustAddressTxbox.Clear();
     isNewRecord = true;
 }
Ejemplo n.º 3
0
 private void NewBtn_Click(object sender, RoutedEventArgs e)
 {
     //to clear all textbox and be ready to save
     InvoiceTxtbox.Clear();
     CustNameTxbox.Clear();
     CustEmailTxtbox.Clear();
     CustAddressTxbox.Clear();
     MessageTextBox.Clear();
     isNewRecord = true;
 }