Exemplo n.º 1
0
        private void BindGrid()
        {
            FundManager oManager = new FundManager();

            oManager.ConnectionString = this.ConnectionString;
            oManager.Open();
            gridControl1.DataSource = oManager.GetCashBankSetup();
            gridControl1.Refresh();
            oManager.Close();
        }
Exemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FundManager oManager = new FundManager();
            FundUnit oUnit = new FundUnit();

            oUnit.AccountNumber = txtAccountNo.Text;
            oUnit.AccountName = txtAccountName.Text;

            oManager.ConnectionString = this.ConnectionString;
            oManager.Open();
            oManager.AddCashBank(oUnit);
            oManager.Close();

            txtAccountNo.Text = "";
            txtAccountName.Text = "";

            BindGrid();
        }
Exemplo n.º 3
0
        void BindSourceOfFund()
        {
            FundManager oManager = new FundManager();

            oManager.ConnectionString = this.ConnectionString;
            oManager.Open();
            //gridControl1.DataSource = oManager.GetCashBankSetup();
            //gridControl1.Refresh();
            cboSourceOfFund.Properties.DisplayMember = "AccountName";
            cboSourceOfFund.Properties.ValueMember = "AccountNumber";

            cboSourceOfFund.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("AccountNumber", "Code"));
            cboSourceOfFund.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("AccountName", "Fund Name"));

            cboSourceOfFund.Properties.DataSource = oManager.GetCashBankSetup();
            cboSourceOfFund.Refresh();

            oManager.Close();
        }