예제 #1
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!edit)
            {
                return;
            }
            var edt = new DesignEdit();

            edt.ShowDialog();
            designTableAdapter.Fill(printingDataSet.Design);
            printingDataSet.AcceptChanges();
        }
예제 #2
0
        private void editToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (!edit)
            {
                return;
            }
            var st = new PrintingDataSet.DesignDataTable();

            designTableAdapter.FillBy(st,
                                      Convert.ToInt32(dataGridViewDesign.SelectedRows[0].Cells[0].Value));
            object[] row = st.Rows[0].ItemArray;
            var      edt = new DesignEdit(
                Convert.ToInt32(row[0]),
                row[1].ToString(),
                Convert.ToDecimal(row[2])
                );

            edt.ShowDialog();
            dataGridViewDesign.DataSource = designBindingSource;
            designTableAdapter.Fill(printingDataSet.Design);
            printingDataSet.AcceptChanges();
        }