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

            edt.ShowDialog();
            dataGridViewPaper.DataSource = paperBindingSource;
            Ziro();
            paperTableAdapter.Fill(printingDataSet.Paper);
            printingDataSet.AcceptChanges();
        }
示例#2
0
        private void editToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (!edit)
            {
                return;
            }
            var st = new PrintingDataSet.PaperDataTable();

            paperTableAdapter.FillBy(st,
                                     Convert.ToInt32(dataGridViewPaper.SelectedRows[0].Cells[0].Value));
            object[] row = st.Rows[0].ItemArray;
            var      edt = new PaperEdit(
                Convert.ToInt32(row[0]),
                row[1].ToString(),
                row[2].ToString(),
                Convert.ToDecimal(row[3])
                );

            edt.ShowDialog();
            dataGridViewPaper.DataSource = paperBindingSource;
            Ziro();
            paperTableAdapter.Fill(printingDataSet.Paper);
            printingDataSet.AcceptChanges();
        }