Exemple #1
0
        private void metroButtonClientAdd_Click(object sender, EventArgs e)
        {
            ClientEntityForm form = new ClientEntityForm();

            form.Text          = "Добавление клиента";
            form.btnAddvisible = true;
            form.Show();
        }
Exemple #2
0
 private void metroButtonClientEdit_Click(object sender, EventArgs e)
 {
     try
     {
         int cid               = Convert.ToInt32(dataGridViewClient.SelectedCells[0].Value.ToString());
         var client            = db.Clients.Find(cid);
         ClientEntityForm form = new ClientEntityForm();
         form.Text           = "Изменение клиента";
         form.btnEditvisible = true;
         form.ClientId       = client.ClientId;
         form.csur           = client.ClientSurName;
         form.cfname         = client.ClientFirstName;
         form.ctel           = client.ClientTelephone;
         form.Show();
     }
     catch (Exception gg)
     {
         MessageBox.Show(gg.Message, "Ошибка");
     }
 }