Exemplo n.º 1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView dgv = (DataGridView)sender;

            if (e.ColumnIndex > 0)
            {
                if (dgv.Columns[e.ColumnIndex].Name == "BtnRenew")
                {
                    DataGridViewRow dgr         = dataGridView1.CurrentRow;
                    int             intStatusID = Convert.ToInt32(dgr.Cells["StatusID"].Value);

                    if (intStatusID == 1 || intStatusID == 3)
                    {
                        int intTicketID = Convert.ToInt32(dgr.Cells["TicketID"].Value);

                        RenewPawnOperationForm frmRenewPawnOperation = new RenewPawnOperationForm(intTicketID);
                        frmRenewPawnOperation.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    }
                    else
                    {
                        MessageBox.Show("该当票不能进行续当处理!", "续当");
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void btnRenew_Click(object sender, EventArgs e)
        {
            DataGridViewRow        dgr                   = dataGridView1.CurrentRow;
            int                    intTicketID           = Convert.ToInt32(dgr.Cells["TicketID"].Value);
            RenewPawnOperationForm frmRenewPawnOperation = new RenewPawnOperationForm(intTicketID);

            frmRenewPawnOperation.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
        }