Ejemplo n.º 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            AddWarehouseFrm addFrm = new AddWarehouseFrm();

            addFrm.Text = "添加仓库信息";
            addFrm.ShowDialog();
            refreshDataGridView();
        }
Ejemplo n.º 2
0
        private void buttonModify_Click(object sender, EventArgs e)
        {
            if (null == dataGridViewWarehouse.CurrentRow)
            {
                return;
            }
            int             index  = dataGridViewWarehouse.CurrentRow.Index;
            AddWarehouseFrm addFrm = new AddWarehouseFrm();

            addFrm.setId(int.Parse(dataGridViewWarehouse.Rows[index].Cells["Id"].Value.ToString()));
            addFrm.fillField();
            addFrm.Text = "修改仓库信息";
            addFrm.ShowDialog();
            refreshDataGridView();
        }