Beispiel #1
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
            case Keys.Alt | Keys.S:
                save_data();
                return(true);

            case Keys.Alt | Keys.C:
                this.Close();
                return(true);

            case Keys.Alt | Keys.P:
                frmResultEntryReport frmObj = new frmResultEntryReport(BillId);
                frmObj.ShowDialog();
                return(true);

            case Keys.F2:
                //do something
                return(true);

            default:
                return(base.ProcessCmdKey(ref msg, keyData));
            }
        }
Beispiel #2
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvViewLabBills.SelectedRows.Count > 0)
         {
             string resultId = dgvViewLabBills.SelectedRows[0].Cells["result_entry_id"].Value.ToString();
             if (!string.IsNullOrWhiteSpace(resultId))
             {
                 int billId = Convert.ToInt32(dgvViewLabBills.SelectedRows[0].Cells["bill_id"].Value);
                 frmResultEntryReport frmObj = new frmResultEntryReport(billId);
                 frmObj.ShowDialog();
             }
             else
             {
                 MessageBox.Show("Result Entry is not found!", "View Result Entry", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
         else
         {
             MessageBox.Show("Please select any Bill!", "View Result Entry", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         Common.Common.ExceptionHandler.ExceptionWriter(ex);
         MessageBox.Show(ex.Message, "View Result Entry", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #3
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            frmResultEntryReport frmObj = new frmResultEntryReport(BillId);

            frmObj.ShowDialog();
        }