public ReceiptDetailByRef(MDataSet.ReceiptMasterRow source,DataTable tableProduct,MainForm mainform) { InitializeComponent(); _mainForm = mainform; _productTable = tableProduct; _isNds = source.StockRowByFK_ReceiptMaster_Stock.IsNDS; this.mDataSet = source.Table.DataSet as MDataSet; this.productBindingSource.DataSource = new DataView(_productTable, "IsNds=" + _isNds.ToString(),"Name",DataViewRowState.OriginalRows); this.productBindingSource.ResetBindings(true); // this.productBindingSource.DataSource = this.mDataSet.Product.Select("IsNds=" + source.StockRowByFK_ReceiptMaster_Stock.IsNDS.ToString() ); this.receiptMasterBindingSource.DataSource = source; this.receiptMasterBindingSource.ResetBindings(true); this.receiptMasterBindingSourceView.DataSource = source.Table; this.receiptMasterBindingSourceView.ResetBindings(true); this.receiptMasterBindingSourceView.CurrencyManager.Position= this.receiptMasterBindingSourceView.Find("ID", source.ID); this.receiptDetailBindingSource.DataSource = this.receiptMasterBindingSourceView; this.receiptDetailBindingSource.DataMember = "ReceiptMaster_ReceiptDetail"; this.receiptDetailBindingSource.ResetBindings(true); }
public UCOrganizationRow(MDataSet.OrganizationRow organizationRow, MainForm.ActionDialog actionDialog) { InitializeComponent(); this.mDataSet =organizationRow.Table.DataSet as MDataSet; this.organizationBindingSource.DataSource = organizationRow; }
public ucProductRow(MDataSet.ProductRow productRow,MainForm.ActionDialog actionDialog) { InitializeComponent(); this.mDataSet = productRow.Table.DataSet as MDataSet; this.productBindingSource.DataSource = productRow; this.packingBindingSource.DataSource = this.mDataSet.Packing; this.storageConditionBindingSource.DataSource = this.mDataSet.StorageCondition; this.substanceBindingSource.DataSource = this.mDataSet.Substance; this.farmGroupLevel2BindingSource.DataSource = this.mDataSet.FarmGroupLevel2; this.unitBindingSource.DataSource = this.mDataSet.Unit; _state = actionDialog; }
public ucProductRow(DataRow productRow, MainForm.ActionDialog actionDialog) { InitializeComponent(); this.dataSet = productRow.Table.DataSet; // this.mDataSet = productRow.Table.DataSet as MDataSet; this.productBindingSource.DataSource = productRow ; this.packingBindingSource.DataSource = this.dataSet.Tables["Packing"]; this.storageConditionBindingSource.DataSource = this.dataSet.Tables["StorageCondition"]; this.substanceBindingSource.DataSource = this.dataSet.Tables["Substance"]; this.farmGroupLevel2BindingSource.DataSource = this.dataSet.Tables["FarmGroupLevel2"]; this.unitBindingSource.DataSource = this.dataSet.Tables["Unit"]; _state = actionDialog; }
private void FormDialog_Load(object sender, EventArgs e) { _MainForm = FindMainForm(this); }