Exemplo n.º 1
0
 private void btCworkmarkAdd_Click(object sender, EventArgs e)
 {
     try
     {
         Buffer.State = "add";
         int         CardID        = Convert.ToInt32(dgCards[0, dgCards.CurrentRow.Index].Value.ToString());
         FCworkmarks frmCworkmarks = new FCworkmarks(CardID);
         frmCworkmarks.ShowDialog();
         ReloadAllOfCards();
     }
     catch
     {
         MessageBox.Show("Выберите Личную карточку", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
 private void btCworkmarksEdit_Click(object sender, EventArgs e)
 {
     try
     {
         Buffer.State = "edit";
         int         CardID        = Convert.ToInt32(dgCards[0, dgCards.CurrentRow.Index].Value.ToString());
         string      SubjectName   = dgCworkmarks[2, dgCworkmarks.CurrentRow.Index].Value.ToString();
         int         CworkmarksID  = Convert.ToInt32(dgCworkmarks[0, dgCworkmarks.CurrentRow.Index].Value.ToString());
         string      Theme         = dgCworkmarks[3, dgCworkmarks.CurrentRow.Index].Value.ToString();
         int         Mark          = Convert.ToInt32(dgCworkmarks[4, dgCworkmarks.CurrentRow.Index].Value.ToString());
         FCworkmarks frmCworkmarks = new FCworkmarks(CardID, CworkmarksID, SubjectName, Theme, Mark);
         frmCworkmarks.ShowDialog();
         ReloadAllOfCards();
     }
     catch
     {
         MessageBox.Show("Выберите Курсовую работу", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }