Exemplo n.º 1
0
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------

        public void txtBoxDescription_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                string keyVal;
                string keyCd;
                string searchKey;

                ManualBilling mb = new ManualBilling();

                keyVal = e.KeyValue.ToString(); //convert and assign pressed keyValue
                keyCd  = e.KeyCode.ToString();  //convert and assign pressed keystring



                KeyPressEvent kpe = new KeyPressEvent();
                searchKey = kpe.manualSearchkey(keyVal, keyCd, "Billingform", "des", this); //call manualSearchkey function



                if (searchKey == "exit")
                {
                    this.Close();
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("Error Occured, Please Try Again, " + exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------

        public void txtBoxDescription_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                string keyVal;
                string keyCd;
                string searchKey;

                ManualBilling mb = new ManualBilling();

                keyVal = e.KeyValue.ToString(); //convert and assign pressed keyValue
                keyCd  = e.KeyCode.ToString();  //convert and assign pressed keystring



                KeyPressEvent kpe = new KeyPressEvent();
                searchKey = kpe.manualSearchkey(keyVal, keyCd, "Billingform", "des", this); //call manualSearchkey function



                if (searchKey == "exit")
                {
                    log.Show();
                    log.ActiveControl = log.UserName;
                    log.UserName.Text = "UserName";
                    log.maskedTextBox1.PasswordChar = '\0';
                    log.maskedTextBox1.Text         = "Password";
                    log.UserName.ForeColor          = Color.Gray;
                    log.maskedTextBox1.ForeColor    = Color.Gray;
                    this.Close();
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("Error Occured, Please Try Again, " + exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 3
0
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------

        public void txtBoxDescription_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                string keyVal;
                string keyCd;
                string searchKey;

                ManualBilling mb = new ManualBilling();

                keyVal = e.KeyValue.ToString(); //convert and assign pressed keyValue 
                keyCd = e.KeyCode.ToString();   //convert and assign pressed keystring




                KeyPressEvent kpe = new KeyPressEvent();
                searchKey = kpe.manualSearchkey(keyVal, keyCd, "Billingform", "des", this); //call manualSearchkey function



                if (searchKey == "exit")
                {
                    this.Close();
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("Error Occured, Please Try Again, " + exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            }

        }