Ejemplo n.º 1
0
        private void toolStripButton_Adjust_Click(object sender, EventArgs e)
        {
            if (this.dgvMain.CurrentRow == null)
            {
                return;
            }
            if (this.dgvMain.CurrentRow.Index >= 0)
            {
                if (this.dgvMain.SelectedRows[0].Cells["colState"].Value.ToString() == "保存")
                {
                    string      BillID = this.dgvMain.SelectedRows[0].Cells["colBillID"].Value.ToString();
                    DataRowView drv    = dgvMain.SelectedRows[0].DataBoundItem as DataRowView;
                    DataRow     dr     = drv.Row;

                    frmProducePlanEdit f = new frmProducePlanEdit(dr);
                    if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        this.BindData();
                    }
                    ;
                }
                else
                {
                    MessageBox.Show("选中的状态非[保存],请确认!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
        }
Ejemplo n.º 2
0
        private void toolStripButton_Add_Click(object sender, EventArgs e)
        {
            frmProducePlanEdit f = new frmProducePlanEdit();

            if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.BindData();
            }
        }