Esempio n. 1
0
 private void btPracticAdd_Click(object sender, EventArgs e)
 {
     try
     {
         Buffer.State = "add";
         int      CardID     = Convert.ToInt32(dgCards[0, dgCards.CurrentRow.Index].Value.ToString());
         FPractic frmPractic = new FPractic(CardID);
         frmPractic.ShowDialog();
         ReloadAllOfCards();
     }
     catch
     {
         MessageBox.Show("Выберите Личную карточку", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 2
0
 private void btPracticEdit_Click(object sender, EventArgs e)
 {
     try
     {
         Buffer.State = "edit";
         int      CardID     = Convert.ToInt32(dgCards[0, dgCards.CurrentRow.Index].Value.ToString());
         int      PractID    = Convert.ToInt32(dgPractic[0, dgPractic.CurrentRow.Index].Value.ToString());
         int      Sem        = Convert.ToInt32(dgPractic[2, dgPractic.CurrentRow.Index].Value.ToString());
         int      type       = Convert.ToInt32(dgPractic[3, dgPractic.CurrentRow.Index].Value.ToString());
         decimal  length     = Convert.ToDecimal(dgPractic[5, dgPractic.CurrentRow.Index].Value.ToString());
         int      mark       = Convert.ToInt32(dgPractic[6, dgPractic.CurrentRow.Index].Value.ToString());
         int      name       = Convert.ToInt32(dgPractic[4, dgPractic.CurrentRow.Index].Value.ToString());
         FPractic frmPractic = new FPractic(CardID, PractID, Sem, type, length, mark, name);
         frmPractic.ShowDialog();
         ReloadAllOfCards();
     }
     catch
     {
         MessageBox.Show("Выберите редактируемую строку", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }