예제 #1
0
        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();
        }
예제 #2
0
        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();
        }