protected void updatebalance()
    {
        DataSet ds = new DataSet();
          ds =  objManabusBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));
          if (ds != null)
          {
              if (ds.Tables.Count > 0)
              {
                  if (ds.Tables[0].Rows.Count > 0)
                  {
                      ClsBAL objBal = new ClsBAL();
                          DateTime? dtime = null;

                      //    string msg = objBal.AddAgentDeposit(Convert.ToInt32(Session["UserID"].ToString())
                      //, Convert.ToDouble(Session["RechargeAmount"].ToString()), "", Convert.ToInt32(Session["UserID"].ToString())
                      //, "Payment Gateway", Session["Order_Id"].ToString().ToString(), "");

                      //    lblMsg.InnerText = msg;
                          lblMsg.InnerText = objBal.InsertDepositUpdateRequest(Convert.ToInt32(Session["UserID"].ToString()), Convert.ToDouble(Session["RechargeAmount"].ToString()),
                              Convert.ToString(""), Session["Order_Id"].ToString(), "Payment Gateway",
                            "", "", System.DateTime.Now,
                             "", Convert.ToInt32(Session["UserID"].ToString()), "Deposited");
                          if (lblMsg.InnerText.ToString() == "Your request has been submitted successfully. Our Team will get back to you.")
                          {
                              lblmessage.Text = "your Amount added Successfully";

                              objBal.Upstatus(Convert.ToInt32(Session["UserID"].ToString()), Convert.ToDouble((Session["RechargeAmount"].ToString())));
                          }

                  }
              }
          }
    }
 protected void btnDepositUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         if (Session["UserID"] != null)
         {
             ClsBAL obj = new ClsBAL();
             DateTime? dtime = null;
             if (txtChequeIssueDate.Text != "")
             {
                 dtime = Convert.ToDateTime(txtChequeIssueDate.Text.ToString());
             }
             lblMsg.InnerText = obj.InsertDepositUpdateRequest(Convert.ToInt32(Session["UserID"].ToString()), Convert.ToDouble(txtDepositAmount.Text.Trim().ToString()),
                 Convert.ToString(txtMobileNumber.Text.ToString()), txtTransactionId.Text.ToString(), rbtnDepositType.SelectedItem.Text.ToString(),
                 ddlDepositedBank.SelectedItem.Text.ToString(), txtChequeDrawnBank.Text.ToString(), dtime,
                 txtChequeNumber.Text.ToString(), Convert.ToInt32(Session["UserID"].ToString()),"Requested");
             if (lblMsg.InnerText.ToString() == "Your request has been submitted successfully. Our Team will get back to you.")
             {
                 txtDepositAmount.Text = txtMobileNumber.Text = txtTransactionId.Text = txtChequeNumber.Text = txtChequeIssueDate.Text = txtChequeDrawnBank.Text = "";
                 ddlDepositedBank.SelectedIndex = 0;
             }
         }
     }
     catch (Exception ex)
     {
         lblMsg.InnerHtml = ex.Message;
         throw;
     }
 }