protected void get_bank_branches(int bank_id)
        {
            DataTable dt = Salary_scales.get_bank_branches("get_bank_branches", bank_id);

            if (dt.Rows.Count != 0)
            {
                DataRow dtRow = dt.NewRow();
                dtRow["record_guid"]   = string.Empty;
                dtRow["branch_id"]     = -1;
                dtRow["bank_id"]       = -1;
                dtRow["branch_name"]   = string.Empty;
                dtRow["branch_active"] = true;
                dt.Rows.InsertAt(dtRow, 0);
                this.cbo_bank_branch.DisplayMember = "branch_name";
                this.cbo_bank_branch.ValueMember   = "branch_id";
                this.cbo_bank_branch.DataSource    = dt;
            }
        }
Exemple #2
0
        protected void get_bank_branches()
        {
            DataTable dt = Salary_scales.get_bank_branches("get_bank_branches", Salary_scales.bank_id);

            this.gdv_branches.DataSource = dt;
            this.gdv_branches.Columns["record_guid"].Visible            = false;
            this.gdv_branches.Columns["branch_id"].Visible              = false;
            this.gdv_branches.Columns["bank_id"].Visible                = false;
            this.gdv_branches.DefaultCellStyle.SelectionBackColor       = Color.White;
            this.gdv_branches.DefaultCellStyle.SelectionForeColor       = Color.Black;
            this.gdv_branches.RowsDefaultCellStyle.BackColor            = Color.LightGray;
            this.gdv_branches.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige;
            this.gdv_branches.ColumnHeadersDefaultCellStyle.ForeColor   = Color.White;
            this.gdv_branches.ColumnHeadersDefaultCellStyle.BackColor   = Color.Black;
            this.gdv_branches.RowHeadersDefaultCellStyle.BackColor      = Color.Black;
            this.gdv_branches.DefaultCellStyle.SelectionBackColor       = Color.White;
            this.gdv_branches.DefaultCellStyle.SelectionForeColor       = Color.Black;
            this.txt_bank_id.Text = Salary_scales.bank_id.ToString();
        }