Пример #1
0
        protected void LoadChartofAccountsListing()
        {
            dt = ChartofAccounts.LoadListing("select_chart_of_acounts_listing");
            gdvList.DataSource = dt;

            gdvList.Columns["acc_id"].Visible           = false;
            gdvList.Columns["acc_type_name"].HeaderText = "Account Type";
            gdvList.Columns["acc_name"].HeaderText      = "Account Name";
            gdvList.Columns["acc_number"].HeaderText    = "Account Number";
            gdvList.Columns["opening_bal"].HeaderText   = "Opening Balance";
            gdvList.Columns["Bank"].HeaderText          = "Bank";
            gdvList.Columns["debit_credit"].HeaderText  = "Debit/Credit";

            gdvList.RowsDefaultCellStyle.BackColor            = Color.LightGray;
            gdvList.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige;
            gdvList.ColumnHeadersDefaultCellStyle.ForeColor   = Color.White;
            gdvList.ColumnHeadersDefaultCellStyle.BackColor   = Color.Black;
            gdvList.RowHeadersDefaultCellStyle.BackColor      = Color.Black;
            gdvList.DefaultCellStyle.SelectionBackColor       = Color.Cyan;
            gdvList.DefaultCellStyle.SelectionForeColor       = Color.Black;
            foreach (DataGridViewColumn c in this.gdvList.Columns)
            {
                c.DefaultCellStyle.Font = new System.Drawing.Font("Arial", 12f, GraphicsUnit.Pixel);
            }
            this.gdvList.ColumnHeadersDefaultCellStyle.BackColor = Color.CadetBlue;
            this.gdvList.EnableHeadersVisualStyles = false;
        }
Пример #2
0
        protected void LoadNorminalAccountList()
        {
            dt = ChartofAccounts.LoadListing("select_chart_of_acounts_listing");
            DataRow dtRow = dt.NewRow();

            dtRow["acc_id"]   = string.Empty;
            dtRow["acc_name"] = "select one";
            dt.Rows.InsertAt(dtRow, 0);

            cboNorminalAcc.DataSource    = dt;
            cboNorminalAcc.ValueMember   = "acc_id";
            cboNorminalAcc.DisplayMember = "acc_name";

            cboNorminalAcc.AutoCompleteMode   = AutoCompleteMode.Suggest;
            cboNorminalAcc.AutoCompleteSource = AutoCompleteSource.ListItems;


            dt = ChartofAccounts.LoadListing("select_chart_of_acounts_listing");
            DataRow _dtRow = dt.NewRow();

            _dtRow["acc_id"]   = string.Empty;
            _dtRow["acc_name"] = "select one";
            dt.Rows.InsertAt(_dtRow, 0);

            cboControlAccSearch.DataSource    = dt;
            cboControlAccSearch.ValueMember   = "acc_id";
            cboControlAccSearch.DisplayMember = "acc_name";

            cboControlAccSearch.AutoCompleteMode   = AutoCompleteMode.Suggest;
            cboControlAccSearch.AutoCompleteSource = AutoCompleteSource.ListItems;
        }