예제 #1
0
        private void Btn_Update_Click(object sender, EventArgs e)
        {
            if (((System.Windows.Forms.BaseCollection)(dataGridView_Book.SelectedRows)).Count != 1)
            {
                MessageBox.Show("请选择一条数据", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            else
            {
                String barcode = this.dataGridView_Book.CurrentRow.Cells[0].Value.ToString();
                switch (Sqlname)
                {
                case "U_AllPlan":
                    FrmPlan frm1 = new FrmPlan("update", yearmonth, barcode);
                    frm1.ShowDialog();
                    break;

                case "U_DepPlan":
                    FrmDepPlan frm2 = new FrmDepPlan("update", yearmonth, barcode);
                    frm2.ShowDialog();
                    break;

                case "U_PerPlan":
                    FrmPerPlan frm3 = new FrmPerPlan("update", yearmonth, barcode);
                    frm3.ShowDialog();
                    break;
                }
            }
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            FrmPlan frm = new FrmPlan(null, null, null);

            frm.ShowDialog();
        }