예제 #1
0
 private void BindBankAccount()
 {
     try
     {
         BABankAccount objBankAccount = new BABankAccount();
         int           BankAcId       = 0;
         DataSet       ds             = objBankAccount.GetBankAccount(BankAcId);
         if (ds.Tables[0].Rows.Count > 0)
         {
             dropBankAccount.DataSource     = ds.Tables[0];
             dropBankAccount.DataTextField  = "BankName";
             dropBankAccount.DataValueField = "BankAcId";
             dropBankAccount.DataBind();
             dropBankAccount.Items.Insert(0, new ListItem("-- Please Select --", "0"));
         }
         else
         {
             dropBankAccount.DataSource = null;
             dropBankAccount.DataBind();
             dropBankAccount.Items.Insert(0, new ListItem("-- Please Select --", "0"));
         }
     }
     catch (Exception ex)
     {
         lblMsg.Text = _BOUtility.ShowMessage("danger", "Danger", ex.Message);
         ExceptionLogging.SendExcepToDB(ex);
     }
 }
예제 #2
0
 private void GetBankAccDetails(int BankAccId)
 {
     try
     {
         objBankAc.BankAcId = BankAccId;
         DataSet ds = objBABankAc.GetBankAccount(BankAccId);
         if (ds.Tables.Count > 0)
         {
             hf_BankAcId.Value     = ds.Tables[0].Rows[0]["BankAcId"].ToString();
             txtKey.Text           = ds.Tables[0].Rows[0]["BankAcKey"].ToString();
             txtKey.Enabled        = false;
             chkDeactivate.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsDeActivate"]);
             txtBankName.Text      = ds.Tables[0].Rows[0]["BankName"].ToString();
             //txtBankName.Enabled = false;
             ddlAccountType.SelectedIndex = ddlAccountType.Items.IndexOf(ddlAccountType.Items.FindByText(ds.Tables[0].Rows[0]["BankAcType"].ToString()));
             //ddlAccountType.Enabled = false;
             txtAccountNumber.Text = ds.Tables[0].Rows[0]["BankAcNo"].ToString();
             //txtAccountNumber.Enabled = false;
             txtBranchCode.Text = ds.Tables[0].Rows[0]["BankBranchCode"].ToString();
             //txtBranchCode.Enabled = false;
             txtBranchName.Text = ds.Tables[0].Rows[0]["BranchName"].ToString();
             //txtBranchName.Enabled = false;
             txtAccountHolder.Text = ds.Tables[0].Rows[0]["AccountHolder"].ToString();
             //txtAccountHolder.Enabled = false;
             ddlGraphic.SelectedIndex     = ddlGraphic.Items.IndexOf(ddlGraphic.Items.FindByValue(ds.Tables[0].Rows[0]["Graphic"].ToString()));
             ddlOwnerBranch.SelectedIndex = ddlOwnerBranch.Items.IndexOf(ddlOwnerBranch.Items.FindByValue(ds.Tables[0].Rows[0]["OwnerBranch"].ToString()));
             txtQuickGICode.Text          = ds.Tables[0].Rows[0]["GiCode"].ToString();
             //txtQuickGICode.Enabled = false;
             txtQuickGIDepositsBatch.Text = ds.Tables[0].Rows[0]["GiDepositBatch"].ToString();
             //txtQuickGIDepositsBatch.Enabled = false;
             txtQuickGIPaymentsBatch.Text = ds.Tables[0].Rows[0]["GiPaymentBatch"].ToString();
             //txtQuickGIPaymentsBatch.Enabled = false;
             txtInternetBankingWebLink.Text   = ds.Tables[0].Rows[0]["InternetBankingLink"].ToString();
             ddlStatementFormat.SelectedIndex = ddlStatementFormat.Items.IndexOf(ddlStatementFormat.Items.FindByValue(ds.Tables[0].Rows[0]["StatementFormat"].ToString()));
         }
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendExcepToDB(ex);
     }
 }
예제 #3
0
    private void BindBankAccDetails()
    {
        try
        {
            gvBankAccountList.PageSize = int.Parse(ViewState["ps"].ToString());
            int     bankaccId = 0;
            DataSet ds        = objBABankAc.GetBankAccount(bankaccId);
            Session["dt"] = ds.Tables[0];
            if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                gvBankAccountList.DataSource = ds;

                string sortDirection = "ASC", sortExpression;
                if (ViewState["so"] != null)
                {
                    sortDirection = ViewState["so"].ToString();
                }
                if (ViewState["se"] != null)
                {
                    sortExpression = ViewState["se"].ToString();
                    ds.Tables[0].DefaultView.Sort = sortExpression + " " + sortDirection;
                }

                gvBankAccountList.DataBind();
            }
            else
            {
                gvBankAccountList.DataSource = null;
                gvBankAccountList.DataBind();
                Label lblEmptyMessage = gvBankAccountList.Controls[0].Controls[0].FindControl("lblEmptyMessage") as Label;
                lblEmptyMessage.Text = "Currently there are no records in System";
            }
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            ExceptionLogging.SendExcepToDB(ex);
        }
    }