Example #1
0
 protected void btnFisYrAmt_Click(object sender, EventArgs e)
 {
     try
     {
         lblErrorMsg.Text = "";
         if (ViewState["SelectedGrantInfoId"] != null && ViewState["SelectedGrantInfoId"].ToString() != "")
         {
             if (ddlFiscalYr.SelectedIndex != 0)
             {
                 FinancialTransactions.AddGrantInfoFyAmt(Convert.ToInt32(ViewState["SelectedGrantInfoId"]), Convert.ToInt32(ddlFiscalYr.SelectedValue.ToString()), Convert.ToDecimal(txtAmount.Text));
             }
             else
             {
                 lblErrorMsg.Text = "Select Fiscal Year for Grant.";
             }
             BindFiscalYr();
             ddlFiscalYr.SelectedIndex = 0;
             txtAmount.Text            = "";
         }
         else
         {
             lblErrorMsg.Text = "Select Grant to add Fiscal Year Amount";
         }
     }
     catch (Exception ex)
     {
         lblErrorMsg.Text = ex.Message;
     }
 }