private void BtnModify_Click(object sender, EventArgs e) { frmStoreHouse frm = new frmStoreHouse(); frm.flag = false; AddOwnedForm(frm); frm.FormBorderStyle = FormBorderStyle.None; frm.TopLevel = false; frm.Dock = DockStyle.Fill; this.Controls.Add(frm); this.Tag = frm; frm.cboCity.Enabled = true; String name = dgvSearch.CurrentRow.Cells[1].Value.ToString(); AlmacenDisecWS.storehouse store = new AlmacenDisecWS.storehouse(); store = serviceDA.queryStorehouseByName(name); frm.txtId.Text = store.id_storehouse.ToString(); frm.txtNameStorehouse.Text = store.storehouse_name; frm.txtAddressStorehouse.Text = store.address; frm.txtPhone.Text = store.phone_number.ToString(); frm.txtId.Enabled = false; frm.cboCity.Text = dgvSearch.CurrentRow.Cells[3].Value.ToString(); frm.btnDelete.Enabled = true; btnModify.Enabled = true; frm.BringToFront(); frm.Show(); }
private void BtnNew_Click(object sender, EventArgs e) { frmStoreHouse frm = new frmStoreHouse(); frm.flag = true; //OpenFormPanel(frm); AddOwnedForm(frm); frm.FormBorderStyle = FormBorderStyle.None; frm.TopLevel = false; frm.Dock = DockStyle.Fill; this.Controls.Add(frm); this.Tag = frm; frm.BringToFront(); frm.Show(); }