Exemple #1
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         rptPaymentForm report = new rptPaymentForm(id);
         report.ShowDialog();
         this.SuspendLayout();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString());
     }
 }
Exemple #2
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            string id = "";

            if (gridView.SelectedCells.Count != 0)
            {
                try
                {
                    DataGridViewCell cell = gridView.SelectedCells[0];
                    DataGridViewRow  row  = cell.OwningRow;
                    id = row.Cells[0].Value.ToString();

                    rptPaymentForm report = new rptPaymentForm(id);
                    report.ShowDialog();
                    this.SuspendLayout();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message.ToString());
                }
            }
        }