private void btnAddClient_Click(object sender, EventArgs e) { AddClientForm add_form = new AddClientForm(); add_form.lblBL.Visible = false; add_form.chkbxBL.Visible = false; add_form.ShowDialog(); zapis(); }
public void ClientForm() // Форма с добавление клиентов { this.panel.Controls.Clear(); AddClientForm form_activated = new AddClientForm(); form_activated.FormBorderStyle = 0; form_activated.TopLevel = false; form_activated.Dock = DockStyle.Fill; form_activated.lblBL.Visible = false; form_activated.chkbxBL.Visible = false; this.panel.Controls.Add(form_activated); form_activated.chkModal = true; form_activated.Show(); this.panel.Enabled = false; }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { pp_dbEntities db = new pp_dbEntities(); int id = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[4].Value.ToString()); clients cl = db.clients.Find(id); AddClientForm edit_form = new AddClientForm(); edit_form.txtBoxname.Text = cl.fullname; edit_form.txtboxAddress.Text = cl.address; edit_form.txtboxphone.Text = cl.contact; if (cl.blackliststatus == 1) { edit_form.chkbxBL.Checked = true; } else { edit_form.chkbxBL.Checked = false; } edit_form.ShowDialog(); zapis(); }