Пример #1
0
 private void ClearFld()
 {
     foreach (Control control in PanelContainer.Controls)
     {
         if (control is TextBox)
         {
             control.Text = "";
         }
     }
     TxtCustomer.Focus();
 }
Пример #2
0
 private void BtnNew_Click(object sender, EventArgs e)
 {
     dateTimePicker1.Value = System.DateTime.Today;
     TxtOrder.Clear();
     TxtCustomer.Clear();
     TxtPhone.Clear();
     ComboItem.SelectedIndex = -1;
     TxtPrice.Clear();
     TxtQty.Clear();
     TxtTotal.Clear();
     TxtOrder.Focus();
 }
Пример #3
0
 private void TxtCustomer_Validating(object sender, CancelEventArgs e)
 {
     if (this.ActiveControl == TxtCustomer)
     {
         return;
     }
     if (TxtCustomer.Enabled == false)
     {
         return;
     }
     if (TxtCustomer.Text.Trim() == "")
     {
         MessageBox.Show("Customer Cannot Left Blank...!", "Mr. Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
         e.Cancel = true;
         TxtCustomer.Focus();
         return;
     }
 }
Пример #4
0
 public FrmInvoiceReceipt(string paymentType, string billamount)
 {
     InitializeComponent();
     _PaymentType = paymentType;
     _billamount  = billamount;
     if (paymentType == "Credit" || paymentType == "Card")
     {
         TxtCustomer.Enabled     = true;
         TxtTenderAmount.Enabled = false;
         TxtCustomer.TabStop     = true;
         TxtCustomer.Focus();
     }
     else
     {
         TxtCustomer.Enabled       = false;
         TxtCustomer.TabStop       = false;
         BtnSearchCustomer.Enabled = false;
         TxtTenderAmount.Enabled   = true;
         TxtTenderAmount.Focus();
     }
 }
Пример #5
0
 private void Page_Loaded(object sender, RoutedEventArgs e)
 {
     foreach (var instrumentVm in _cartItems)
     {
         if (instrumentVm.InstrumentStatusId == "For Rent" ||
             instrumentVm.InstrumentStatusId == "For Rent To Own")
         {
             _subTotal += instrumentVm.RentalFee;
         }
         _subTotal += instrumentVm.Price;
     }
     GetTaxAndTotal();
     TxtEmployee.Text = _user.LastName + ", " + _user.FirstName;
     if (_customerAdded)
     {
         TxtCustomer.Text = _customer.LastName + ", " + _customer.FirstName;
     }
     else
     {
         TxtCustomer.Focus();
     }
 }
Пример #6
0
        private void BtnSearchCustomer_Click(object sender, EventArgs e)
        {
            string GLCategory = (_PaymentType == "Credit") ? "Customer,Both" : "Bank Book";

            Common.PickList frmPickList = new Common.PickList("Generalledger." + GLCategory, _SearchKey);
            if (Common.PickList.dt.Rows.Count > 0)
            {
                frmPickList.ShowDialog();
                if (frmPickList.SelectedList.Count > 0)
                {
                    TxtCustomer.Text = frmPickList.SelectedList[0]["GlDesc"].ToString().Trim();
                    TxtCustomer.Tag  = Convert.ToInt32(frmPickList.SelectedList[0]["ledgerId"].ToString().Trim());
                    TxtCustomer.SelectAll();
                }
                frmPickList.Dispose();
            }
            else
            {
                MessageBox.Show("No List Available in Ledger !", "Mr. Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TxtCustomer.Focus();
                return;
            }
            TxtCustomer.Focus();
        }