private void btnOk_Click(object sender, EventArgs e)
 {
     this.abs.IsMakeUp = this.chkIsMakeup.Checked;
     this.abs.MakeUpDescription = (this.chkIsMakeup.Checked) ? this.txtMakeup.Text : "";
     this.Close();
     if (this.AfterMakeUp != null)
     {
         MakeUpEventArgs arg = new MakeUpEventArgs();
         arg.AbsenceRecord = this.abs;
         arg.RowIndex = this.rowIndex;
         arg.ColumnIndex = this.colIndex;
         this.AfterMakeUp(this, arg);
     }
 }
        void frm_AfterMakeUp(object sender, MakeUpEventArgs e)
        {
            if ((e.RowIndex < 0) || (e.ColumnIndex < 7))
                return;

            this.dg.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = this.makeCellContent(e.AbsenceRecord);
            string key = e.AbsenceRecord.StudentID + "_" + e.AbsenceRecord.SectionID;
            if (!this.updatedRecs.ContainsKey(key))
                this.updatedRecs.Add(key, e.AbsenceRecord);
            else
                this.updatedRecs[key] = e.AbsenceRecord;

            this.dg.Rows[e.RowIndex].Cells[e.ColumnIndex].Style.ForeColor = Color.Red;

            this.enableButtons();
        }