Example #1
0
 protected void btnFundSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         if (ddlFundType.SelectedIndex != 0)
         {
             if (ddlAcctMethod.SelectedIndex != 0)
             {
                 if (hdUpdateMode.Value == "false")
                 {
                     FinancialTransactions.AddFundInfo(txtFname.Text, txtFAbbr.Text, Convert.ToInt32(ddlFundType.SelectedValue.ToString()), txtAcctNumber.Text, txtVHCBCode.Text,
                                                       Convert.ToInt32(ddlAcctMethod.SelectedValue.ToString()), txtDeptId.Text, rdBtnDrawDown.SelectedItem.Text == "Yes" ? true : false);
                 }
                 else
                 {
                     FinancialTransactions.UpdateFundInfo(Convert.ToInt32(hfFundId.Value), txtAcctNumber.Text, txtFname.Text, txtFAbbr.Text, Convert.ToInt32(ddlFundType.SelectedValue.ToString()), txtVHCBCode.Text,
                                                          Convert.ToInt32(ddlAcctMethod.SelectedValue.ToString()), txtDeptId.Text, rdBtnDrawDown.SelectedItem.Text == "Yes" ? true : false);
                     hdUpdateMode.Value = "false";
                     gvFund.EditIndex   = -1;
                     ClearFundInfo();
                 }
             }
             else
             {
                 lblErrorMsg.Text = "Select Account Method to add new fund.";
             }
         }
         else
         {
             lblErrorMsg.Text = "Select Fund type to add new fund.";
         }
         ClearFundInfo();
         BindFundInfoAddUpdate();
     }
     catch (Exception ex)
     {
         lblErrorMsg.Text = ex.Message;
     }
 }