Пример #1
0
 private void btSemMarksAdd_Click(object sender, EventArgs e)
 {
     try
     {
         Buffer.State = "add";
         int            CardID      = Convert.ToInt32(dgCards[0, dgCards.CurrentRow.Index].Value.ToString());
         FSemesterMarks frmSemMarks = new FSemesterMarks(CardID);
         frmSemMarks.ShowDialog();
         ReloadAllOfCards();
     }
     catch
     {
         MessageBox.Show("Выберите Личную карточку", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
 private void btSemMarksEdit_Click(object sender, EventArgs e)
 {
     try
     {
         Buffer.State = "edit";
         int            CardID      = Convert.ToInt32(dgCards[0, dgCards.CurrentRow.Index].Value.ToString());
         int            SemMarkID   = Convert.ToInt32(dgSemMarks[0, dgSemMarks.CurrentRow.Index].Value.ToString());
         string         SubjectName = dgSemMarks[2, dgSemMarks.CurrentRow.Index].Value.ToString();
         int            Semester    = Convert.ToInt32(dgSemMarks[3, dgSemMarks.CurrentRow.Index].Value.ToString());
         int            Ahours      = Convert.ToInt32(dgSemMarks[4, dgSemMarks.CurrentRow.Index].Value.ToString());
         int            Shours      = Convert.ToInt32(dgSemMarks[5, dgSemMarks.CurrentRow.Index].Value.ToString());
         int            Mark        = Convert.ToInt32(dgSemMarks[6, dgSemMarks.CurrentRow.Index].Value.ToString());
         string         MarkType    = dgSemMarks[7, dgSemMarks.CurrentRow.Index].Value.ToString();
         FSemesterMarks frmSemMarks = new FSemesterMarks(CardID, SemMarkID, Semester, Mark, Ahours, Shours, MarkType, SubjectName);
         frmSemMarks.ShowDialog();
         ReloadAllOfCards();
     }
     catch
     {
         MessageBox.Show("Выберите Оценку", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }