private void uctxtLedgerConfig_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Return)
            {
                if (uctxtLedgerConfig.Text == "")
                {
                    uctxtLedgerConfig.Text = "";
                    if (DGMr.Rows.Count > 0)
                    {
                        int i = 0;
                        DGMr.Visible = true;
                    }

                    DGMr.Visible = false;

                    return;
                }
                if (uctxtLedgerConfig.Text != "")
                {
                    DGMr.Focus();
                    if (DGMr.Rows.Count > 0)
                    {
                        int i = 0;
                        uctxtTerritoryCode.Text = DGMr.Rows[i].Cells[0].Value.ToString();
                        uctxtTeritorryName.Text = DGMr.Rows[i].Cells[1].Value.ToString();
                        uctxtLedgerConfig.Text  = DGMr.Rows[i].Cells[2].Value.ToString();
                        DGMr.Visible            = false;
                        dteFromDate.Focus();
                    }
                }
                else
                {
                    int i = 0;

                    uctxtTerritoryCode.Text = DGMr.Rows[i].Cells[0].Value.ToString();
                    uctxtTeritorryName.Text = DGMr.Rows[i].Cells[1].Value.ToString();
                    uctxtLedgerConfig.Text  = DGMr.Rows[i].Cells[2].Value.ToString();
                    DGMr.Visible            = false;
                    dteFromDate.Focus();
                }
            }
        }
        private void uctxtMedicalRep_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Return)
            {
                if (uctxtMedicalRep.Text == "")
                {
                    uctxtDebitAmount.Focus();
                    DGMr.Visible = false;

                    return;
                }


                if (uctxtMedicalRep.Text != "")
                {
                    DGMr.Focus();
                    if (DGMr.Rows.Count > 0)
                    {
                        int i = 0;
                        uctxtTerritoryCode.Text = DGMr.Rows[i].Cells[0].Value.ToString();
                        uctxtTeritorryName.Text = DGMr.Rows[i].Cells[1].Value.ToString();
                        uctxtMedicalRep.Text    = DGMr.Rows[i].Cells[2].Value.ToString();
                        DGMr.Visible            = false;
                        uctxtDebitAmount.Focus();
                    }
                }
                else
                {
                    int i = 0;

                    uctxtTerritoryCode.Text = DGMr.Rows[i].Cells[0].Value.ToString();
                    uctxtTeritorryName.Text = DGMr.Rows[i].Cells[1].Value.ToString();
                    uctxtMedicalRep.Text    = DGMr.Rows[i].Cells[2].Value.ToString();
                    DGMr.Visible            = false;
                    uctxtDebitAmount.Focus();
                }
            }
            if (e.KeyChar == (char)Keys.Back)
            {
                Utility.PriorSetFocusText(uctxtMedicalRep, uctxtBranch);
            }
        }
Esempio n. 3
0
        private void uctxtLedgerConfig_KeyDown(object sender, KeyEventArgs e)
        {
            DGMr.Visible = true;
            if (e.KeyCode == Keys.Up)
            {
                DGMr.Focus();
            }
            if (e.KeyCode == Keys.Down)
            {
                DGMr.Focus();
            }

            DGMr.Top    = uctxtLedgerConfig.Top + 25;
            DGMr.Left   = uctxtLedgerConfig.Left;
            DGMr.Width  = uctxtLedgerConfig.Width;
            DGMr.Height = 200;
            DGMr.BringToFront();
            DGMr.AllowUserToAddRows = false;
            return;
        }
Esempio n. 4
0
        private void uctxtMrName_KeyDown(object sender, KeyEventArgs e)
        {
            DGMr.Visible = true;
            if (e.KeyCode == Keys.Up)
            {
                DGMr.Focus();
            }
            if (e.KeyCode == Keys.Down)
            {
                DGMr.Focus();
            }

            //DGMr.Top = uctxtMrName.Top + 25;
            //DGMr.Left = uctxtMrName.Left;
            //DGMr.Width = uctxtMrName.Width;
            //DGMr.Height = 200;
            //DGMr.BringToFront();
            //DGMr.AllowUserToAddRows = false;
            return;
        }
Esempio n. 5
0
 private void uctxtMedicalRep_KeyDown(object sender, KeyEventArgs e)
 {
     DGMr.Visible = true;
     if (e.KeyCode == Keys.Up)
     {
         DGMr.Focus();
     }
     if (e.KeyCode == Keys.Down)
     {
         DGMr.Focus();
     }
     DGMr.Top    = uctxtMedicalRep.Top + 25;
     DGMr.Left   = uctxtMedicalRep.Left;
     DGMr.Width  = uctxtMedicalRep.Width;
     DGMr.Height = 200;
     DGMr.BringToFront();
     DGMr.AllowUserToAddRows = false;
     lstLeft.Items.Clear();
     lstRight.Items.Clear();
     return;
 }
Esempio n. 6
0
        private void uctxtMedicalRep_KeyPress(object sender, KeyPressEventArgs e)
        {
            lstLeft.Items.Clear();
            lstRight.Items.Clear();

            if (e.KeyChar == (char)Keys.Return)
            {
                if (uctxtMedicalRep.Text == "")
                {
                    uctxtMedicalRep.Text = "";
                    if (DGMr.Rows.Count > 0)
                    {
                        int i = 0;
                        DGMr.Visible = true;
                    }

                    DGMr.Visible = false;

                    return;
                }


                if (uctxtMedicalRep.Text != "")
                {
                    if (radGroup.Checked == true)
                    {
                        DGMr.Focus();
                        if (DGMr.Rows.Count > 0)
                        {
                            int i = 0;
                            uctxtTerritoryCode.Text = DGMr.Rows[i].Cells[0].Value.ToString();
                            uctxtTeritorryName.Text = DGMr.Rows[i].Cells[1].Value.ToString();
                            uctxtMedicalRep.Text    = DGMr.Rows[i].Cells[2].Value.ToString();
                            uctxtLedgerConfig.Text  = DGMr.Rows[i].Cells[2].Value.ToString();
                            DGMr.Visible            = false;
                            //txtCustomerGorupname.Focus();
                        }
                    }
                    if (rbtMPO.Checked == true)
                    {
                        DGMr.Focus();
                        if (DGMr.Rows.Count > 0)
                        {
                            int i = 0;
                            uctxtTerritoryCode.Text = DGMr.Rows[i].Cells[0].Value.ToString();
                            uctxtTeritorryName.Text = DGMr.Rows[i].Cells[1].Value.ToString();
                            uctxtMedicalRep.Text    = DGMr.Rows[i].Cells[3].Value.ToString();
                            uctxtLedgerConfig.Text  = DGMr.Rows[i].Cells[2].Value.ToString();
                            DGMr.Visible            = false;
                            txtCustomerGorupname.Focus();
                        }
                    }
                }
                else
                {
                    int i = 0;

                    uctxtTerritoryCode.Text = DGMr.Rows[i].Cells[0].Value.ToString();
                    uctxtTeritorryName.Text = DGMr.Rows[i].Cells[1].Value.ToString();
                    uctxtMedicalRep.Text    = DGMr.Rows[i].Cells[2].Value.ToString();
                    DGMr.Visible            = false;
                    txtCustomerGorupname.Focus();
                }
            }
        }