Exemplo n.º 1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (ValidateInput())
     {
         QuotaViewModel quota = new QuotaViewModel()
         {
             SchoolId  = int.Parse(ddlSchool.SelectedValue),
             SessionId = int.Parse(ddlYear.SelectedValue),
             Year      = ddlYear.SelectedItem.Text,
             Quota     = int.Parse(txtQuota.Value)
         };
         var result = GeneralUtility.AddQuota(quota);
         if (result)
         {
             DropDownManager.ShowPopUp("Quota Successfully Assigned to School");
         }
         else
         {
             DropDownManager.ShowPopUp("Quota Failed to Assign, Try Again");
         }
     }
 }