Exemplo n.º 1
0
 protected void btnCreateSemester_Click(object sender, EventArgs e)
 {
     if (!(string.IsNullOrWhiteSpace(txtSemesterName.Text) && string.IsNullOrWhiteSpace(ddlSemesterMonth.SelectedValue) && string.IsNullOrWhiteSpace(ddlSemesterYear.SelectedValue)))
     {
         try
         {
             Semester.AddSemester(txtSemesterName.Text, Convert.ToInt32(ddlSemesterMonth.SelectedValue), Convert.ToInt32(ddlSemesterYear.SelectedValue));
             lblStatus_CreateSemester.Text = "Semester added successfully!";
         }
         catch (Exception ex)
         {
             lblStatus_CreateSemester.Text = ex.ToString();
         }
     }
     else
     {
     }
 }