예제 #1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            ChangeAndAddCounteragent counteragent = new ChangeAndAddCounteragent(1, RoleId);

            counteragent.ShowDialog();
            EntityCounteragent entityCounteragent = new EntityCounteragent();

            entityCounteragent.ReadCounteragent(tableForCounteragents, RoleId);
        }
예제 #2
0
 private void BtnChange_Click(object sender, EventArgs e)
 {
     if (IdCounteragent != null)
     {
         ChangeAndAddCounteragent counteragent = new ChangeAndAddCounteragent(2, RoleId, IdCounteragent, Surname, CName, MiddleName, Inn, Adress, Phone);
         counteragent.ShowDialog();
         EntityCounteragent entityCounteragent = new EntityCounteragent();
         entityCounteragent.ReadCounteragent(tableForCounteragents, RoleId);
         IdCounteragent = null;
     }
     else
     {
         MessageBox.Show("Вы не выбрали контрагента для редактирования!\n\nНажмите на соответствующую запись в таблице");
     }
 }
예제 #3
0
 private void BtnChange_Click(object sender, EventArgs e)
 {
     if (IdCounteragent != null)
     {
         ChangeAndAddCounteragent counteragent = new ChangeAndAddCounteragent(2, RoleId, IdCounteragent, Surname, CName, MiddleName, Inn, Adress, Phone);
         counteragent.ShowDialog();
         EntityCounteragent entityCounteragent = new EntityCounteragent();
         entityCounteragent.ReadCounteragent(tableForCounteragents, RoleId);
         IdCounteragent = null;
     }
     else
     {
         MessageBox.Show("Выберите интересующую запись в таблице");
     }
 }