Ejemplo n.º 1
0
 private void toolStripButton3_Click(object sender, EventArgs e)
 {
     try {
         if (txtMaBN.Text.Length > 0)
         {
             frmQLXoachidinhFromMaBN frm = new frmQLXoachidinhFromMaBN(txtMaBN.Text, dNgayThucHien.Value, "DUYỆT XÓA CHỈ ĐỊNH XÉT NGHIỆM - CLS", txtMaMay.Text);
             frm.Show();
         }
         else
         {
             MessageBox.Show("Vui lòng chọn tiếp nhận yêu cầu!");
         }
     }
     catch { }
 }
Ejemplo n.º 2
0
        private void txtMaMay_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.KeyCode == Keys.Enter)
                {
                    SendKeys.Send("{Tab}");
                }
                if (e.KeyCode == Keys.F7)
                {
                    //F7
                    try
                    {
                        if (txtMaBN.Text.Length > 0)
                        {
                            frmQLXoachidinhFromMaBN frm = new frmQLXoachidinhFromMaBN(txtMaBN.Text, dNgayThucHien.Value, "DUYỆT XÓA CHỈ ĐỊNH XÉT NGHIỆM - CLS", txtMaMay.Text);
                            frm.Show();
                        }
                        else
                        {
                            MessageBox.Show("Vui lòng chọn tiếp nhận yêu cầu!");
                        }
                    }
                    catch { }
                }
                if ((e.Modifiers == Keys.Control) && (e.KeyCode == Keys.N))
                {
                    //MessageBox.Show("New");
                    if (toolNew.Enabled == true)
                    {
                        f_new();
                    }
                }

                // Ctrl + O
                if ((e.Modifiers == Keys.Control) && (e.KeyCode == Keys.E))
                {
                    //MessageBox.Show("Open");
                    if (toolEdit.Enabled == true)
                    {
                        f_edit();
                    }
                }

                // Ctrl + S
                if ((e.Modifiers == Keys.Control) && (e.KeyCode == Keys.S))
                {
                    //MessageBox.Show("Save");
                    if (toolSave.Enabled == true)
                    {
                        f_save();
                    }
                }
                if (e.KeyCode == Keys.Escape)
                {
                    //MessageBox.Show("Save");
                    if (toolCancel.Enabled == true)
                    {
                        f_cancel();
                    }
                }
            }
            catch { }
        }