Esempio n. 1
0
        private void DataBinding(BindingSource dataSource)
        {
            data.baseDS.investorTransHistoryDataTable tbl = new data.baseDS.investorTransHistoryDataTable();

            this.stockCodeEd.DataBindings.Clear();
            this.stockCodeEd.DataBindings.Add(new System.Windows.Forms.Binding("Text", dataSource, tbl.stockCodeColumn.ColumnName, true));

            this.transTypeCb.DataBindings.Clear();
            this.transTypeCb.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", dataSource, tbl.tranTypeColumn.ColumnName, true));

            this.codeEd.DataBindings.Clear();
            this.codeEd.DataBindings.Add(new System.Windows.Forms.Binding("Text", dataSource, tbl.idColumn.ColumnName, true));

            this.portpolioCb.DataBindings.Clear();
            this.portpolioCb.DataBindings.Add(new System.Windows.Forms.Binding("myValue", dataSource, tbl.portfolioColumn.ColumnName, true));

            this.onTimeEd.DataBindings.Clear();
            this.onTimeEd.DataBindings.Add(new System.Windows.Forms.Binding("Text", dataSource, tbl.onTimeColumn.ColumnName, true));

            this.qtyEd.DataBindings.Clear();
            this.qtyEd.DataBindings.Add(new System.Windows.Forms.Binding("Value", dataSource, tbl.qtyColumn.ColumnName, true));

            this.subTotalEd.DataBindings.Clear();
            this.subTotalEd.DataBindings.Add(new System.Windows.Forms.Binding("Value", dataSource, tbl.amtColumn.ColumnName, true));

            this.feeAmtEd.DataBindings.Clear();
            this.feeAmtEd.DataBindings.Add(new System.Windows.Forms.Binding("Value", dataSource, tbl.feeAmtColumn.ColumnName, true));
        }
Esempio n. 2
0
        private void DataBinding(BindingSource dataSource)
        {
            data.baseDS.investorTransHistoryDataTable tbl = new data.baseDS.investorTransHistoryDataTable();

            this.stockCodeEd.DataBindings.Clear();
            this.stockCodeEd.DataBindings.Add(new System.Windows.Forms.Binding("Text", dataSource, tbl.stockCodeColumn.ColumnName, true));

            this.transTypeCb.DataBindings.Clear();
            this.transTypeCb.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", dataSource, tbl.tranTypeColumn.ColumnName, true));

            this.codeEd.DataBindings.Clear();
            this.codeEd.DataBindings.Add(new System.Windows.Forms.Binding("Text", dataSource, tbl.idColumn.ColumnName, true));

            this.portpolioCb.DataBindings.Clear();
            this.portpolioCb.DataBindings.Add(new System.Windows.Forms.Binding("myValue", dataSource, tbl.portfolioColumn.ColumnName, true));

            this.onTimeEd.DataBindings.Clear();
            this.onTimeEd.DataBindings.Add(new System.Windows.Forms.Binding("Text", dataSource, tbl.onTimeColumn.ColumnName, true));

            this.qtyEd.DataBindings.Clear();
            this.qtyEd.DataBindings.Add(new System.Windows.Forms.Binding("Value", dataSource, tbl.qtyColumn.ColumnName, true));

            this.subTotalEd.DataBindings.Clear();
            this.subTotalEd.DataBindings.Add(new System.Windows.Forms.Binding("Value", dataSource, tbl.amtColumn.ColumnName, true));

            this.feeAmtEd.DataBindings.Clear();
            this.feeAmtEd.DataBindings.Add(new System.Windows.Forms.Binding("Value", dataSource, tbl.feeAmtColumn.ColumnName, true));
        }