public ReceiptMasterNewAll(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.receiptMasterBindingSource.DataSource = new DataView(this.mDataSet.ReceiptMaster, "DocumentTypeRef=0", null, DataViewRowState.CurrentRows); this.receiptMasterBindingSource.ResetBindings(false); this.productBindingSource.DataSource = this.mDataSet.Product; this.organizationBindingSource.DataSource = this.mDataSet.Organization; this.stockBindingSource.DataSource = this.mDataSet.Stock; // _viewChangesReceiptDetail.ListChanged += new ListChangedEventHandler(_viewChangesReceiptDetail_ListChanged); _changesMaster = new DataView(this.mDataSet.ReceiptMaster, "DocumentTypeRef=0", null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); _changesDetail = new DataView(this.mDataSet.ReceiptDetail, "DocumentTypeRef=0", null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); _changesMaster.ListChanged += new ListChangedEventHandler(_changesMaster_ListChanged); _changesDetail.ListChanged += new ListChangedEventHandler(_changesMaster_ListChanged); // (this.receiptMasterBindingSource.DataSource as DataView).ListChanged += new ListChangedEventHandler(_viewChangesReceiptDetail_ListChanged); }
public InvoiceDetailEdit(MDataSet.InvoiceMasterRow source,MDataSet.ProductDataTable product,MainForm mainForm) { InitializeComponent(); _mainForm = mainForm; this.mDataSet = source.Table.DataSet as MDataSet; this.productBindingSource.DataSource = product; this.productBindingSource.ResetBindings(false); // this.RemainsBindingSource.DataSource = new DataView(this.mDataSet.Remains, "MainStockRef=" + source.MainStockRef.ToString(), null, DataViewRowState.CurrentRows); this.RemainsBindingSource.DataSource = new DataView(this.mDataSet.Remains, "Quantityremains<>0 and MainStockRef=" + source.MainStockRef.ToString(),"ProductName", DataViewRowState.CurrentRows); this.RemainsBindingSource.ResetBindings(true); this.invoiceMasterBindingSource.DataSource = source; this.invoiceMasterBindingSource.ResetBindings(true); this.invoiceMasterBindingSourceView.DataSource = source.Table; this.invoiceMasterBindingSourceView.ResetBindings(true); this.invoiceMasterBindingSourceView.CurrencyManager.Position = this.invoiceMasterBindingSourceView.Find("ID", source.ID); this.invoiceDetailBindingSource.DataSource = this.invoiceMasterBindingSourceView; this.invoiceDetailBindingSource.DataMember = "FK_InvoiceDetail_InvoiceMaster"; this.invoiceDetailBindingSource.ResetBindings(true); }
public ReceiptMasterStock(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.receiptMasterBindingSource.DataSource = new DataView(this.mDataSet.ReceiptMaster, "DocumentTypeRef=1", null, DataViewRowState.CurrentRows); this.receiptMasterBindingSource.ResetBindings(false); this.organizationBindingSource.DataSource = this.mDataSet.Organization; this.organizationBindingSource.ResetBindings(false); // this.productBindingSource.DataSource = this.mDataSet.Product; // заполнить this.btDelete.Visible = false; this.PariodsComboBox.ComboBox.DataSource = this.mDataSet.Periods; this.PariodsComboBox.ComboBox.DisplayMember = "Name"; this.PariodsComboBox.ComboBox.ValueMember = "ID"; _changesReceiptMaster = new DataView(this.mDataSet.ReceiptMaster, "DocumentTypeRef=1", null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); _changesReceiptDetail = new DataView(this.mDataSet.ReceiptDetail, "DocumentTypeRef=1", null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); _changesReceiptMaster.ListChanged+=new ListChangedEventHandler(_changes_ListChanged); _changesReceiptDetail.ListChanged += new ListChangedEventHandler(_changes_ListChanged); }
public OrdersAll(MDataSet.OrdersDataTable source) { InitializeComponent(); this.mDataSet = source.DataSet as MDataSet; this.ordersBindingSource.DataSource = new DataView(source,"Quantity - Reserved- QuantityNow >0 and isClose=0",null,DataViewRowState.CurrentRows); this.ordersBindingSource.ResetBindings(false); this.ordersOldBindingSource.DataSource = new DataView(source, "Quantity - Reserved - QuantityNow <=0",null,DataViewRowState.CurrentRows); this.ordersBindingSourceAll.DataSource = new DataView(source, null, null, DataViewRowState.CurrentRows); this.tradePutletBindingSource.DataSource = this.mDataSet.TradePutlet; this.tradePutletBindingSource.ResetBindings(false); this.productBindingSource.DataSource = this.mDataSet.Product; this.productBindingSource.ResetBindings(false); this.dateEdit.Value = DateTime.Today; //this.TradePutletLookUpEdit.DataSource = }
/// <summary> /// Gets the data set. /// </summary> /// <param name="tsqlParamed">The TSQL paramed.</param> /// <param name="paramKeyAndValue">The parameter key and value.</param> /// <returns>DataSet.</returns> public virtual MDataSet GetDataSet(string tsqlParamed, params Params[] paramKeyAndValue) { MDataSet ds = new MDataSet(); using (var dr = this.Driver.CreateDataReader(tsqlParamed, CommandType.Text, CommandBehavior.CloseConnection, paramKeyAndValue)) { List <MColumn> columns = new List <MColumn>(); for (int i = 0; i < dr.FieldCount; i++) { var fieldType = dr.GetFieldType(i); var caption = dr.GetName(i); columns.Add(new MColumn(caption, fieldType)); } MDataTable dt = new MDataTable(columns); while (dr.Read()) { List <MCell> cells = new List <MCell>(); for (int i = 0; i < dr.FieldCount; i++) { var value = dr[i]; cells.Add(new MCell(columns[i], value)); } dt.AddRow(cells); } ds.Tables.Add(dt); } return(ds); }
public void Test_Blob() { ConnectString source = new ConnectString { Host = "192.168.0.120", Port = "1521", Instance = "orcl", UserId = "masgh", Password = "******" }; ConnectString dest = new ConnectString { Host = "192.168.0.205", Port = "1521", Instance = "orcl", UserId = "masgh", Password = "******" }; string table = "T5399"; Table tableDetail = Tables.GetTableDetails(source, table); MDataSet dataSet = new MDataSet(tableDetail.Name, tableDetail.Columns.Select(item => item.Name).ToArray()); System.Data.IDataReader dr = Stores.Read(source, table); dataSet.SetDataSource(dr); Stores.Write(dest, dataSet); }
/// <summary> /// Write a dicom file object to a (persistent) Media Storage file. /// </summary> /// <param name="file">dicom file object to write</param> /// <param name="mediaFileName">file name to write to</param> /// <returns></returns> public static bool WriteDataSetToFile( DicomFile file, string mediaFileName) { if (file == null) { throw new System.ArgumentNullException("file"); } if (mediaFileName == null) { throw new System.ArgumentNullException("mediaFileName"); } FileMetaInformation fmi = file.FileMetaInformation; if (fmi == null) { fmi = new FileMetaInformation(); //Set the default transfer syntax(ELE) attribute in FMI fmi.AddAttribute("0x00020010", VR.UI, "1.2.840.10008.1.2.1"); file.FileMetaInformation = fmi; } return(MDataSet.WriteFile(file, mediaFileName)); }
public ReceiptMasterStock(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.receiptMasterBindingSource.DataSource = new DataView(this.mDataSet.ReceiptMaster, "DocumentTypeRef=1", null, DataViewRowState.CurrentRows); this.receiptMasterBindingSource.ResetBindings(false); this.organizationBindingSource.DataSource = this.mDataSet.Organization; this.organizationBindingSource.ResetBindings(false); // this.productBindingSource.DataSource = this.mDataSet.Product; // заполнить this.btDelete.Visible = false; this.PariodsComboBox.ComboBox.DataSource = this.mDataSet.Periods; this.PariodsComboBox.ComboBox.DisplayMember = "Name"; this.PariodsComboBox.ComboBox.ValueMember = "ID"; _changesReceiptMaster = new DataView(this.mDataSet.ReceiptMaster, "DocumentTypeRef=1", null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); _changesReceiptDetail = new DataView(this.mDataSet.ReceiptDetail, "DocumentTypeRef=1", null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); _changesReceiptMaster.ListChanged += new ListChangedEventHandler(_changes_ListChanged); _changesReceiptDetail.ListChanged += new ListChangedEventHandler(_changes_ListChanged); }
public RemainsLocal(MDataSet.RemainsDataTable source) { InitializeComponent(); this.remainsBindingSource.DataSource = new DataView(source,"quantityRemains<>0",null,DataViewRowState.CurrentRows); }
public InvoiceRow(MDataSet.InvoiceMasterRow source) { InitializeComponent(); _curentMasterRow = source; mainDataset = source.Table.DataSet as MDataSet; }
public InvoiceRow(MDataSet.InvoiceMasterRow source) { InitializeComponent(); _curentMasterRow = source; mainDataset= source.Table.DataSet as MDataSet; }
/// <summary> /// Read a DataSet from the given Media file. /// </summary> /// <param name="dataSetFileName">Media filename to read.</param> /// <returns>Imported Dataset.</returns> public static DataSet ReadDataSetFromFile(string dataSetFileName) { if (dataSetFileName == null) { throw new System.ArgumentNullException("dataSetFileName"); } return(MDataSet.ReadFile(dataSetFileName)); }
/// <summary> /// Read the FMI from the given Media file. The useUnVrDefinitionLookUp parameter is used to indicate whether /// the definition files loaded should be used to get the real VR of an attributed decoded with a VR of UN. /// When set true a definition lookup for the real VR will be made and the corresponding attribute value /// decoded usign this looked up VR. /// When set false no look up will be done for attributes decoded with a UN VR. The attribute values will be /// decoded with VR of UN. /// </summary> /// <param name="dataSetFileName">Media filename to read.</param> /// <param name="useUnVrDefinitionLookUp">Boolean - UN VR Definition LookUp.</param> /// <returns>Imported FileMetaInformation.</returns> public static FileMetaInformation ReadFMIFromFile(string dataSetFileName, bool useUnVrDefinitionLookUp) { if (dataSetFileName == null) { throw new System.ArgumentNullException("dataSetFileName"); } return(MDataSet.ReadFMI(dataSetFileName, useUnVrDefinitionLookUp)); }
public InvoiceForReplication(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.invoiceMasterBindingSource.DataSource = new DataView(this.mDataSet.InvoiceMaster, "DocumentTypeRef=3", null, DataViewRowState.CurrentRows); this.invoiceMasterBindingSource.ResetBindings(false); _changesMaster = new DataView(this.mDataSet.InvoiceMaster, "DocumentTypeRef=3", null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); _changesDetail = new DataView(this.mDataSet.InvoiceDetail, "DocumentTypeRef=3", null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); }
/// <summary> /// Read the FMI from the given Media file. /// </summary> /// <param name="dataSetFileName">Media filename to read.</param> /// <returns>Imported FileMetaInformation.</returns> public static FileMetaInformation ReadFMIFromFile(string dataSetFileName) { if (dataSetFileName == null) { throw new System.ArgumentNullException("dataSetFileName"); } return(MDataSet.ReadFMI(dataSetFileName)); }
public DialogOfExpend(MDataSet.CashRow cashrow) { InitializeComponent(); _cash = cashrow; this.cashBindingSource.DataSource = _cash; this.cashBindingSource.ResetBindings(true); this.SummEdit.DataBindings.Add(new Binding("EditValue", this, "SummExpend")); }
public ReceiptMasterNewAll(MDataSet source) { InitializeComponent(); _table = source.ReceiptMaster; mDataSet = source; this.receiptMasterBindingSource.DataSource = new DataView(_table, "DocumentTypeRef = 0", null, DataViewRowState.CurrentRows); this.productBindingSource.DataSource = source.Product; this.productBindingSource.ResetBindings(true); }
/// <summary> /// DEPRICATED - see similar method below with extra useUnVrDefinitionLookUp parameter. /// Read a DataSet from the given Media file. /// </summary> /// <param name="dataSetFileName">Media filename to read.</param> /// <returns>Imported Dataset.</returns> public static DataSet ReadDataSetFromFile(string dataSetFileName) { if (dataSetFileName == null) { throw new System.ArgumentNullException("dataSetFileName"); } // Read File but consult definitions for any Attributes with VR UN to get real VR return(MDataSet.ReadFile(dataSetFileName, true)); }
public InvoiceMasterNewAll(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.invoiceMasterBindingSource.DataSource = new DataView(this.mDataSet.InvoiceMaster, "DocumentTypeRef=0", null, DataViewRowState.CurrentRows); this.invoiceMasterBindingSource.ResetBindings(false); //this.productBindingSource.DataSource = this.mDataSet.Product; _changesMaster = new DataView(this.mDataSet.InvoiceMaster, "DocumentTypeRef=0", null, DataViewRowState.Added|DataViewRowState.Deleted|DataViewRowState.ModifiedCurrent); _changesDetail = new DataView(this.mDataSet.InvoiceDetail, "DocumentTypeRef=0", null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); }
public OrdersAll(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.ordersBindingSource.DataSource = this.mDataSet.Orders; this.productBindingSource.DataSource = this.mDataSet.Product; this.productBindingSource.ResetBindings(true); }
/// <summary> /// Compute the Item Offset for DICOMDIR. /// </summary> /// <param name="dataSet">DICOM Seq Item</param> /// <param name="transferSyntax">with transfer syntax</param> /// <returns>Offset</returns> public static UInt32 ComputeItemOffset( DataSet dataSet, string transferSyntax) { if (dataSet == null) { throw new System.ArgumentNullException("dataSet"); } return(MDataSet.ComputeItemOffset(dataSet, transferSyntax)); }
public Payment(MDataSet.InvoiceMasterRow sourceRow) { InitializeComponent(); _sourceRow = sourceRow; // _CashCustomer = 0; this.invoiceMasterBindingSource.DataSource = _sourceRow; CashEdit.DataBindings.Add(new Binding("Text",this,"CashCustomer")); labelCanges.DataBindings.Add(new Binding("Text", this, "Change")); }
public InvoiceTradePutletAll(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.invoiceMasterBindingSource.DataSource = new DataView(this.mDataSet.InvoiceMaster, " PeriodsRef=0 ", null, DataViewRowState.CurrentRows); this.invoiceMasterBindingSource.ResetBindings(false); _changesMaster = new DataView(this.mDataSet.InvoiceMaster, null, null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); _changesDetail = new DataView(this.mDataSet.InvoiceDetail, null, null, DataViewRowState.Added | DataViewRowState.Deleted | DataViewRowState.ModifiedCurrent); }
public void Test_Write() { string tableName = "T_USER"; Table tableDetail = Tables.GetTableDetails(ConnString, tableName); MDataSet dataSet = new MDataSet(tableDetail.Name, tableDetail.Columns.Select(item => item.Name).ToArray()); dataSet.SetDataSource(Stores.Read(ConnString, tableName)); dataSet.Table = "T_USER_1"; Stores.Write(ConnString, dataSet); }
public UCProductAll(MDataSet source) { InitializeComponent(); productBindingSource.DataSource = source.Product; this.unitBindingSource.DataSource = source.Unit; this.storageConditionBindingSource.DataSource = source.StorageCondition; this.substanceBindingSource.DataSource = source.Substance; this.farmGroupLevel2BindingSource.DataSource = source.FarmGroupLevel2; this.packingBindingSource.DataSource = source.Packing; _changes = new DataView(source.Product, null, null, DataViewRowState.Added | DataViewRowState.ModifiedCurrent | DataViewRowState.Deleted); _changes.ListChanged += new ListChangedEventHandler(_changes_ListChanged); }
public InvoicePrintMar(MainForm mainForm, MDataSet.InvoiceMasterRow source, Maria301Printer printer) { InitializeComponent(); this.mDataSet = mainForm.mDataSet; _mainForm = mainForm; _printer = printer; this.remainsBindingSource.DataSource = new DataView(this.mDataSet.Remains, "QuantityRemains >0 ", null, DataViewRowState.CurrentRows); _invmasterRow = source; }
/// <summary> /// 传输存储数据 /// </summary> public override void ExecStorage() { IEnumerable <TableProfile> tableIncludeStorage = Profile.ImpTables.Where(item => item.IncludeStorage); foreach (var tableProfile in tableIncludeStorage) { try { if (MigrateLog[tableProfile.TableName].TableStruct != MigrateState.Finished) { UpdateMessage($"{tableProfile.TableName}的表结构创建失败,数据传输取消"); } else { Table tableDetail = Domain.Helper.Tables.GetTableDetails(Profile.SourceConnString, tableProfile.TableName); MDataSet dataSet = new MDataSet(tableDetail.Name, tableDetail.Columns.Select(item => item.Name).ToArray()); int total = Domain.Helper.Stores.Count(Profile.SourceConnString, tableProfile.TableName); int page = 0, pageSize = 100; while (true) { page++; int start = (page - 1) * pageSize + 1; if (start > total) { break; } System.Data.IDataReader dr = Domain.Helper.Stores.ReadPage(Profile.SourceConnString, tableProfile.TableName, start, pageSize); dataSet.SetDataSource(dr); Domain.Helper.Stores.Write(Profile.DestConnString, dataSet); } MigrateLog[tableProfile.TableName].Storage = MigrateState.Finished; UpdateMessage($"{tableProfile.TableName}数据传输完成"); } } catch (Exception ex) { UpdateMessage($"{tableProfile.TableName}数据传输失败:{ex.Message}"); } finally { IncreaseFinishedTask(); } } }
/// <summary> /// Write a dicom file object to a (persistent) Media Storage file. /// </summary> /// <param name="file">dicom file object to write</param> /// <param name="mediaFileName">file name to write to</param> /// <returns></returns> public static bool WriteDataSetToFile( DicomFile file, string mediaFileName) { if (file == null) { throw new System.ArgumentNullException("file"); } if (mediaFileName == null) { throw new System.ArgumentNullException("mediaFileName"); } return(MDataSet.WriteFile(file, mediaFileName)); }
public InvoiceClosed(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.invoiceMasterBindingSource.DataSource = new DataView(source.InvoiceMaster, "DocumentTypeRef=1", null, DataViewRowState.CurrentRows); this.organizationBindingSource.DataSource = this.mDataSet.Organization; this.organizationBindingSource.ResetBindings(false); this.PeriodsComboBox.ComboBox.DataSource = this.mDataSet.Periods; this.PeriodsComboBox.ComboBox.DisplayMember = "Name"; this.PeriodsComboBox.ComboBox.ValueMember = "ID"; }
public override void ExecStorage() { PartialWriter pw = writer.CreatePartial("storage", "数据"); int page_index = 0; IEnumerable <TableProfile> tableIncludeStorage = Profile.ImpTables.Where(item => item.IncludeStorage); foreach (var tableProfile in tableIncludeStorage) { try { Table tableDetail = Domain.Helper.Tables.GetTableDetails(Profile.SourceConnString, tableProfile.TableName); MDataSet dataSet = new MDataSet(tableDetail.Name, tableDetail.Columns.Select(item => item.Name).ToArray()); int total = Domain.Helper.Stores.Count(Profile.SourceConnString, tableProfile.TableName); int page = 0, pageSize = 100; while (true) { page++; int start = (page - 1) * pageSize + 1; if (start > total) { break; } System.Data.IDataReader dr = Domain.Helper.Stores.ReadPage(Profile.SourceConnString, tableProfile.TableName, start, pageSize); dataSet.SetDataSource(dr); pw.Append($"{page_index++}", dataSet); } MigrateLog[tableProfile.TableName].Storage = MigrateState.Finished; UpdateMessage($"{tableProfile.TableName}数据导出完成"); } catch (Exception ex) { UpdateMessage($"{tableProfile.TableName}数据导出失败:{ex.Message}"); } finally { IncreaseFinishedTask(); } } pw.Commit(); }
/// <summary> /// Write DICOM object to a (persistent) Media Storage file. /// </summary> /// <param name="dataSet">dicom object to write</param> /// <param name="mediaFileName">file name to write to</param> /// <param name="transferSyntax">with transfer syntax to write</param> /// <returns></returns> public static bool WriteDataSet( DataSet dataSet, string mediaFileName, string transferSyntax) { if (dataSet == null) { throw new System.ArgumentNullException("dataSet"); } if (mediaFileName == null) { throw new System.ArgumentNullException("mediaFileName"); } return(MDataSet.WriteDataSet(dataSet, mediaFileName, transferSyntax)); }
public ReceiptMasterStock(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.receiptMasterBindingSource.DataSource = new DataView(this.mDataSet.ReceiptMaster, "DocumentTypeRef>0", null, DataViewRowState.CurrentRows); this.receiptMasterBindingSource.ResetBindings(false); // this.productBindingSource.DataSource = this.mDataSet.Product; this.PariodsComboBox.ComboBox.DataSource = this.mDataSet.Periods; this.PariodsComboBox.ComboBox.DisplayMember = "ClosedDate"; this.PariodsComboBox.ComboBox.ValueMember = "ID"; }
public InvoiceClosed(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.invoiceMasterBindingSource.DataSource = new DataView(source.InvoiceMaster,"DocumentTypeRef=1",null,DataViewRowState.CurrentRows); this.organizationBindingSource.DataSource = this.mDataSet.Organization; this.organizationBindingSource.ResetBindings(false); this.PeriodsComboBox.ComboBox.DataSource = this.mDataSet.Periods; this.PeriodsComboBox.ComboBox.DisplayMember = "Name"; this.PeriodsComboBox.ComboBox.ValueMember = "ID"; }
public ReceiptDetailRowAdd(MDataSet.ReceiptDetailRow source,MDataSet.ProductRow product) { InitializeComponent(); _receiptDetailRow = source; _productRow = product; this.mDataSet = (source.Table.DataSet as MDataSet); this.receiptDetailBindingSource.DataSource = _receiptDetailRow; this.productBindingSource.DataSource = _productRow; this.productBindingSource.ResetBindings(false); this.receiptDetailBindingSource.ResetBindings(true); this.manufacturerBindingSource.DataSource = this.mDataSet.Manufacturer; this.errorProvider1.DataSource = this.receiptDetailBindingSource; this.errorProvider1.UpdateBinding(); }
public InvoiceReturn(MDataSet mdataset, MainForm mainform) { InitializeComponent(); this.mDataSet = mdataset; _mainForm = mainform; this.linkedInvoiceMasterBindingSource.DataSource = this.mDataSet.LinkedInvoiceMaster; this.linkedInvoiceMasterBindingSource.ResetBindings(true); this.cbTradePutlet.ComboBox.DataSource = new DataView(this.mDataSet.TradePutlet, "Id> 0", "Name", DataViewRowState.CurrentRows); this.cbTradePutlet.ComboBox.DisplayMember = "Name"; this.cbTradePutlet.ComboBox.ValueMember = "ID"; this.productBindingSource.DataSource = this.mDataSet.Product; this.manufacturerBindingSource.DataSource = this.mDataSet.Manufacturer; this.productBindingSource.ResetBindings(false); this.manufacturerBindingSource.ResetBindings(false); }
public InvoiceReturn(MDataSet mdataset,MainForm mainform) { InitializeComponent(); this.mDataSet = mdataset; _mainForm = mainform; this.linkedInvoiceMasterBindingSource.DataSource = this.mDataSet.LinkedInvoiceMaster; this.linkedInvoiceMasterBindingSource.ResetBindings(true); this.cbTradePutlet.ComboBox.DataSource = new DataView(this.mDataSet.TradePutlet,"Id> 0","Name",DataViewRowState.CurrentRows); this.cbTradePutlet.ComboBox.DisplayMember = "Name"; this.cbTradePutlet.ComboBox.ValueMember = "ID"; this.productBindingSource.DataSource = this.mDataSet.Product; this.manufacturerBindingSource.DataSource = this.mDataSet.Manufacturer; this.productBindingSource.ResetBindings(false); this.manufacturerBindingSource.ResetBindings(false); }
public DialogQuantityOrder(MDataSet.ProductRow source,MDataSet.OrdersRow newRow) { InitializeComponent(); newRow.ProductRef = source.ID; this.productBindingSource.DataSource = source; if (source.GetRemainsRows().Length != 0) { foreach (MDataSet.RemainsRow row in source.GetRemainsRows()) { _QauntityRemains += row.QuantityRemains; } } this.ordersBindingSource.DataSource = newRow; this.labelRem.DataBindings.Add(new Binding("Text", this, "QauntityRemains")); }
public InvoiceDetailDatecs(MainForm mainForm, MDataSet.InvoiceMasterRow sourcerow) { InitializeComponent(); this.mDataSet = mainForm.mDataSet; _mainForm = mainForm; _invmasterRow = sourcerow; this.CashBindingSource.DataSource = _mainForm.cashBindingSource.Current as MDataSet.CashRow; this.remainsBindingSource.DataSource = new DataView(this.mDataSet.Remains, "QuantityRemains >0 ", null, DataViewRowState.CurrentRows); if (_mainForm.LocalSettingRow.PrDiscount != 0) { btPayDiscount.Visible = true; cardDiscountButton.Visible = true; } }
public ReceiptMasterStock(MDataSet source) { InitializeComponent(); this.mDataSet = source; this.receiptMasterBindingSource.DataSource = new DataView(this.mDataSet.ReceiptMaster,"DocumentTypeRef>0", null, DataViewRowState.CurrentRows); this.receiptMasterBindingSource.ResetBindings(false); // this.productBindingSource.DataSource = this.mDataSet.Product; this.PariodsComboBox.ComboBox.DataSource = this.mDataSet.Periods; this.PariodsComboBox.ComboBox.DisplayMember = "ClosedDate"; this.PariodsComboBox.ComboBox.ValueMember = "ID"; }
public OrderAdd(MDataSet.OrdersRow source, MainForm mainForm) { InitializeComponent(); _mainForm = mainForm; this.mDataSet =source.Table.DataSet as MDataSet; this.ordersBindingSource.DataSource = source; this.errorProvider1.DataSource = this.ordersBindingSource.DataSource; this.tradePutletBindingSource.DataSource =new DataView( this.mDataSet.TradePutlet, "ID>0",null,DataViewRowState.CurrentRows); this.tradePutletBindingSource.ResetBindings(false); _product = _mainForm.fullDataSet.Product; this.productBindingSource.DataSource = _mainForm.fullDataSet.Product; this.productBindingSource.ResetBindings(false); }
public virtual int Update(MDataSet.ReceiptRemainsDataTable dataTable) { return this.Adapter.Update(dataTable); }
public virtual int Update(MDataSet.inventoryDetailsDataTable dataTable) { return this.Adapter.Update(dataTable); }
public virtual int Update(MDataSet dataSet) { return this.Adapter.Update(dataSet, "inventoryDetails"); }
public virtual int Update(MDataSet dataSet) { return this.Adapter.Update(dataSet, "Orders"); }
public virtual int Fill(MDataSet.inventoryDetailsDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int FillByStartPeriod(MDataSet.OrdersDataTable dataTable, System.Nullable<System.DateTime> begin) { this.Adapter.SelectCommand = this.CommandCollection[1]; if ((begin.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(begin.Value)); } else { this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value; } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int Update(MDataSet.OrdersDataTable dataTable) { return this.Adapter.Update(dataTable); }
public virtual int FillByReceiptDetailRef(MDataSet.RemainsDataTable dataTable, System.Nullable<int> id) { this.Adapter.SelectCommand = this.CommandCollection[2]; if ((id.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(id.Value)); } else { this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value; } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int FillNew(MDataSet.RemainsDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[3]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int FillOrders(MDataSet.ProductDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[4]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int FillById(MDataSet.ProductDataTable dataTable, System.Nullable<int> ProductRef) { this.Adapter.SelectCommand = this.CommandCollection[2]; if ((ProductRef.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ProductRef.Value)); } else { this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value; } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
/// <summary> /// 将数据写入到数据库 /// </summary> /// <param name="connString"></param> /// <param name="dataSet"></param> public static void Write(ConnectString connString, MDataSet dataSet) { new DataGateway().BatchInsert(connString, dataSet); }
public UCOrganizationAll(MDataSet source) { InitializeComponent(); organizationBindingSource.DataSource = source.Organization; _changes = new DataView(source.Organization, null, null, DataViewRowState.ModifiedCurrent); }
public virtual int FillByPeriodNum(MDataSet.ReceiptMasterDataTable dataTable, System.Nullable<int> num) { this.Adapter.SelectCommand = this.CommandCollection[2]; if ((num.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(num.Value)); } else { this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value; } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int Update(MDataSet dataSet) { return this.Adapter.Update(dataSet, "ReceiptRemains"); }
public UCTradePuplet(MDataSet source) { InitializeComponent(); this.tradePutletBindingSource.DataSource = source.TradePutlet; }