Esempio n. 1
0
 protected void BtnSave_Click(object sender, EventArgs e)
 {
     AwardYear ay = new AwardYear();
     ay.AYear = int.Parse(txtYear.Text.Trim());
     ay.Id = 0;
     int result = DataService.Provider.AddAwardYear(ay);
     if (result > 0) {
         Response.Redirect(Util.AdminUrl + "award", true);
     }
 }
Esempio n. 2
0
 protected void BtnSave_Click(object sender, EventArgs e)
 {
     int result = -1;
     try
     {
         if (Request.Params["yrid"] != null)
         {
                 yrid = Request.Params["yrid"];
                 AwardYear aston = new AwardYear();
                 aston.Id = int.Parse(yrid);
                 aston.AYear = int.Parse(txtYear.Text);
                 result = DataService.Provider.UpdateAwardYear(aston);
            
         }
     }
     catch (Exception ex)
     {
         ShowError(ex.Message);
     }
     if (result > 0)
     {
         Response.Redirect(Util.AdminUrl + "award", true);
     }
 }