Пример #1
0
        private void insert_Click(object sender, EventArgs e)
        {
            StockInsertUpdateForm stockInsertUpdateForm = new StockInsertUpdateForm(this);

            stockInsertUpdateForm.changeEnableUpdate(false);
            stockInsertUpdateForm.ShowDialog();
        }
Пример #2
0
        private void update_Click(object sender, EventArgs e)
        {
            StockInsertUpdateForm stockInsertUpdateForm = new StockInsertUpdateForm(this);

            stockInsertUpdateForm.changeEnableInsert(false);
            if (stockTable.CurrentRow != null)
            {
                String isbn      = stockTable.CurrentRow.Cells[0].Value.ToString();
                String grade     = stockTable.CurrentRow.Cells[1].Value.ToString();
                String amount    = stockTable.CurrentRow.Cells[2].Value.ToString();
                String orderCost = stockTable.CurrentRow.Cells[3].Value.ToString();
                stockInsertUpdateForm.changeEnableGradeIsbnTextBox(false);
                stockInsertUpdateForm.setData(isbn, grade, amount, orderCost);
            }
            stockInsertUpdateForm.ShowDialog();
        }