Beispiel #1
0
 private void uctxtCustomer_GotFocus(object sender, System.EventArgs e)
 {
     DGcustomer.Top    = uctxtCustomer.Top + 25;
     DGcustomer.Left   = uctxtCustomer.Left;
     DGcustomer.Width  = uctxtCustomer.Width;
     DGcustomer.Height = 200;
     DGcustomer.BringToFront();
     DGcustomer.Visible            = true;
     DGcustomer.AllowUserToAddRows = false;
     mloadCustomer();
 }
 private void uctxtCustomer_KeyDown(object sender, KeyEventArgs e)
 {
     DGcustomer.Visible = true;
     if (e.KeyCode == Keys.Up)
     {
         DGcustomer.Focus();
     }
     if (e.KeyCode == Keys.Down)
     {
         DGcustomer.Focus();
     }
     return;
 }
        private void uctxtCustomer_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Return)
            {
                if (uctxtCustomer.Text == "" || uctxtCustomer.Text == Utility.gcEND_OF_LIST)
                {
                    uctxtCustomer.Text = "";
                    DGcustomer.Visible = false;
                    uctxCustomerAmount.Focus();
                    return;
                }


                if (uctxtCustomer.Text != "")
                {
                    DGcustomer.Focus();
                    if (DGcustomer.Rows.Count > 0)
                    {
                        int i = 0;
                        txtCustomerCode.Text = DGcustomer.Rows[i].Cells[0].Value.ToString();
                        uctxtCustomer.Text   = DGcustomer.Rows[i].Cells[1].Value.ToString();
                        txtHomoeoHall.Text   = DGcustomer.Rows[i].Cells[2].Value.ToString();
                        DGcustomer.Visible   = false;
                        uctxCustomerAmount.Focus();
                    }
                }
                else
                {
                    if (DGcustomer.Rows.Count > 0)
                    {
                        int i = 0;

                        txtCustomerCode.Text = DGcustomer.Rows[i].Cells[0].Value.ToString();
                        uctxtCustomer.Text   = DGcustomer.Rows[i].Cells[1].Value.ToString();
                        txtHomoeoHall.Text   = DGcustomer.Rows[i].Cells[2].Value.ToString();
                        DGcustomer.Visible   = false;
                    }
                    else
                    {
                        txtCustomerCode.Text = "";
                        uctxtCustomer.Text   = "End of List";
                        txtHomoeoHall.Text   = "";
                    }
                    uctxCustomerAmount.Focus();
                }
            }
            if (e.KeyChar == (char)Keys.Back)
            {
                PriorSetFocusText(uctxtCustomer, sender, e);
            }
        }
 private void radIndividual_Click(object sender, EventArgs e)
 {
     label3.Visible        = true;
     label3.Visible        = true;
     uctxtCustomer.Visible = true;
     uctxtCustomer.Text    = "";
     uctxtCustomer.Focus();
     mloadCustomer();
     DGcustomer.Top    = uctxtCustomer.Top + 25;
     DGcustomer.Left   = uctxtCustomer.Left;
     DGcustomer.Width  = uctxtCustomer.Width;
     DGcustomer.Height = 200;
     DGcustomer.BringToFront();
     DGcustomer.AllowUserToAddRows = false;
     DGcustomer.Visible            = true;
 }
Beispiel #5
0
 private void uctxtCustomer_KeyDown(object sender, KeyEventArgs e)
 {
     DGcustomer.Visible = true;
     if (e.KeyCode == Keys.Up)
     {
         DGcustomer.Focus();
     }
     if (e.KeyCode == Keys.Down)
     {
         DGcustomer.Focus();
     }
     if (chePartySelction.Checked)
     {
         SearchListViewCustomer(ooCustomer, uctxtCustomer.Text);
     }
     return;
 }
        private void uctxtCustomer_KeyDown(object sender, KeyEventArgs e)
        {
            DGcustomer.Visible = true;
            if (e.KeyCode == Keys.Up)
            {
                DGcustomer.Focus();
            }
            if (e.KeyCode == Keys.Down)
            {
                DGcustomer.Focus();
            }

            DGcustomer.Top    = uctxtCustomer.Top + 25;
            DGcustomer.Left   = uctxtCustomer.Left;
            DGcustomer.Width  = uctxtCustomer.Width;
            DGcustomer.Height = 200;
            DGcustomer.BringToFront();
            DGcustomer.AllowUserToAddRows = false;
            return;
        }