コード例 #1
0
ファイル: EditForm.cs プロジェクト: junrikson/Palm-Oil
        private void btnPrint_Click(object sender, EventArgs e)
        {
            rptReceiptForm report = new rptReceiptForm(this.id.ToString());

            report.ShowDialog();
            this.SuspendLayout();
            this.Close();
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: junrikson/Palm-Oil
        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();

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