protected void Examsheedules_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int RowIndex = 0;

            if (!e.CommandName.Equals(MicroEnums.DataOperation.Page.GetStringValue()))
            {
                RowIndex = Convert.ToInt32(e.CommandArgument);
                int RecordID = int.Parse(((Label)gridview_Examsheedules.Rows[RowIndex].FindControl("lbl_ExamScheduleID")).Text);

                PageVariables.ThisExamSchedule = (from xyzl in ExamScheduleManagement.GetInstance.GetExamSeduleList()
                                                  where xyzl.ExamScheduleID == RecordID
                                                  select xyzl).Single();
                if (e.CommandName.Equals(MicroEnums.DataOperation.Edit.GetStringValue()))
                {
                    PopulateFormField(PageVariables.ThisExamSchedule, RecordID);
                    Examschedule_Multi.SetActiveView(InputControls);
                    btn_Submit.Text = MicroEnums.DataOperation.Update.GetStringValue();
                }
                else if (e.CommandName.Equals(MicroEnums.DataOperation.Delete.GetStringValue()))
                {
                    int ProcReturnValue = (int)MicroEnums.DataOperationResult.Failure;
                    ProcReturnValue = DeleteRecord(RecordID);
                    if (ProcReturnValue > (int)MicroEnums.DataOperationResult.Success)
                    {
                        lbl_TheMessage.Text = ReadXML.GetSuccessMessage("OK_DATA_DELETED");
                        Bind_Exam_Sedhule();
                    }
                    else
                    {
                        lbl_TheMessage.Text = ReadXML.GetSuccessMessage("KO_DATA_DELETED");
                    }
                    dialog_Message.Show();
                }
            }
        }
        protected void btn_Submit_Click(object sender, EventArgs e)
        {
            int ProcReturnValue = (int)MicroEnums.DataOperationResult.Failure;

            if (((Button)sender).Text.Trim().Equals(MicroEnums.DataOperation.Save.GetStringValue()))
            {
                ProcReturnValue = InsertSchedules();
                if (ProcReturnValue > (int)MicroEnums.DataOperationResult.Success)
                {
                    lbl_TheMessage.Text = ReadXML.GetSuccessMessage("OK_DATA_ADDED");
                    ResetAll();
                    Bind_Exam_Sedhule();
                    Examschedule_Multi.SetActiveView(view_Grid);
                }
                else
                {
                    lbl_TheMessage.Text = ReadXML.GetFailureMessage("KO_DATA_ADDED");
                }
            }
            else
            {
                ProcReturnValue = UpdateExamSchedule();
                if (ProcReturnValue > (int)MicroEnums.DataOperationResult.Success)
                {
                    lbl_TheMessage.Text = ReadXML.GetSuccessMessage("OK_DATA_UPDATED");
                }
                else
                {
                    lbl_TheMessage.Text = ReadXML.GetFailureMessage("KO_DATA_UPDATED");
                }
            }

            dialog_Message.Show();
            Bind_Exam_Sedhule();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack && !IsCallback)
     {
         SetValidationMessages();
         BindDropdown_Quals();
         Bind_Exam_Sedhule();
         ResetAll();
         Examschedule_Multi.SetActiveView(view_Grid);
     }
 }
 protected void btn_AddNew_Click(object sender, EventArgs e)
 {
     ResetAll();
     Examschedule_Multi.SetActiveView(InputControls);
 }
 protected void btn_View_Click(object sender, EventArgs e)
 {
     Examschedule_Multi.SetActiveView(view_Grid);
     Bind_Exam_Sedhule();
     ResetAll();
 }