protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         clsDoners objDonation = new clsDoners();
         objDonation.SourceACNo   = "0078453234567";
         objDonation.SponsorACNo  = txtSponsorAccountNo.Text;
         objDonation.OnlineAmount = Convert.ToInt32(txtAmount.Text);
         objDonation.BankName     = txtBankName.Text;
         objDonation.DateOfSend   = Convert.ToDateTime(txtDateOfSend.Text);
         objDonation.Comments     = txtComments.Text;
         int Flag = objDonation.InsertOnlineDonations();
         if (Flag > 0)
         {
             lblMsg.Visible = true;
             lblMsg.Text    = "Your Donation Transffered to 0078453234567 Acno, ThanQ!";
         }
         else
         {
             lblMsg.Visible = true;
             lblMsg.Text    = "Transaction Declined";
         }
     }
     catch (Exception ex)
     {
         lblMsg.Visible = true;
         lblMsg.Text    = ex.Message;
     }
 }
Beispiel #2
0
    public int Sum()
    {
        clsDoners objDonaiton = new clsDoners();
        int       Flag        = objDonaiton.GetOnlineTotalAmount();

        return(Flag);
    }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         clsDoners objDoners = new clsDoners();
         objDoners.ProgramCode = RBListPrograms.SelectedItem.Value;
         objDoners.Amount      = txtAmount.Text;
         objDoners.CheckNo     = txtCheckNo.Text;
         objDoners.BankName    = txtBankName.Text;
         objDoners.Place       = txtPlace.Text;
         objDoners.Name        = txtName.Text;
         objDoners.Address     = txtAddress.Text;
         objDoners.EmailId     = txtEmail.Text;
         objDoners.MobileNo    = txtPhone.Text;
         objDoners.Profession  = txtProfession.Text;
         int i = objDoners.InsertProgramDoners();
         if (i > 0)
         {
             Page.RegisterClientScriptBlock("Child", "<script>alert('Your Donation Accepted,Thank Q')</script>");
         }
         else
         {
             lblMsg.Visible = true;
             lblMsg.Text    = "Error Try Again!";
         }
     }
     catch (Exception ex)
     {
         lblMsg.Visible = true;
         lblMsg.Text    = ex.Message.ToString();
     }
 }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         clsDoners objDonation = new clsDoners();
         DataSet   ds          = objDonation.GetOnlineDonations();
         if (ds.Tables[0].Rows.Count > 0)
         {
             grvDonations.DataSource = ds.Tables[0];
             grvDonations.DataBind();
         }
     }
 }