예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);


        }
예제 #4
0
파일: OrdersAll.cs 프로젝트: vpjulia/Salvia
        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 = 

        }
예제 #5
0
        /// <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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        /// <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));
        }
예제 #8
0
        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);
        }
예제 #9
0
        public RemainsLocal(MDataSet.RemainsDataTable source)
        {
            InitializeComponent();

           
            this.remainsBindingSource.DataSource = new DataView(source,"quantityRemains<>0",null,DataViewRowState.CurrentRows);

        }
예제 #10
0
        public InvoiceRow(MDataSet.InvoiceMasterRow source)
        {
            InitializeComponent();

            _curentMasterRow = source;

            mainDataset = source.Table.DataSet as MDataSet;
        }
예제 #11
0
        public InvoiceRow(MDataSet.InvoiceMasterRow source)
        {
            InitializeComponent();

            _curentMasterRow = source;

             mainDataset= source.Table.DataSet as MDataSet;
        }
예제 #12
0
        /// <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));
        }
예제 #13
0
        /// <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));
        }
예제 #14
0
 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);
 }
예제 #15
0
        /// <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));
        }
예제 #16
0
        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"));

        }
예제 #17
0
 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);
 }
예제 #18
0
        /// <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));
        }
예제 #19
0
 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);
 }
예제 #20
0
파일: OrdersAll.cs 프로젝트: vpjulia/Salvia
        public OrdersAll(MDataSet source)
        {
            InitializeComponent();
            this.mDataSet = source;

            this.ordersBindingSource.DataSource = this.mDataSet.Orders;

            this.productBindingSource.DataSource = this.mDataSet.Product;

            this.productBindingSource.ResetBindings(true);
        }
예제 #21
0
        /// <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));
        }
예제 #22
0
파일: Payment.cs 프로젝트: vpjulia/Salvia
        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"));
        }
예제 #23
0
        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);
        }
예제 #24
0
파일: OrdersAll.cs 프로젝트: vpjulia/Salvia
        public OrdersAll(MDataSet source)
        {
            InitializeComponent();
            this.mDataSet = source;

            this.ordersBindingSource.DataSource = this.mDataSet.Orders;

            this.productBindingSource.DataSource = this.mDataSet.Product;
            
            this.productBindingSource.ResetBindings(true);

        }
예제 #25
0
        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);
        }
예제 #26
0
        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);
        }
예제 #27
0
        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;
        }
예제 #28
0
        /// <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();
                }
            }
        }
예제 #29
0
        /// <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));
        }
예제 #30
0
        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";
        }
예제 #31
0
        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();
        }
예제 #32
0
        /// <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));
        }
예제 #33
0
        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";
        }
예제 #34
0
        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";

        }
예제 #35
0
        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();
        }
예제 #36
0
        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);
        }
예제 #37
0
        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);

        }
예제 #38
0
        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"));
        }
예제 #39
0
        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;
            }

        }
예제 #40
0
        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";

            

        }
예제 #41
0
파일: OrderAdd.cs 프로젝트: vpjulia/Salvia
        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);

        
        }
예제 #42
0
 public virtual int Update(MDataSet.ReceiptRemainsDataTable dataTable) {
     return this.Adapter.Update(dataTable);
 }
예제 #43
0
 public virtual int Update(MDataSet.inventoryDetailsDataTable dataTable) {
     return this.Adapter.Update(dataTable);
 }
예제 #44
0
 public virtual int Update(MDataSet dataSet) {
     return this.Adapter.Update(dataSet, "inventoryDetails");
 }
예제 #45
0
 public virtual int Update(MDataSet dataSet) {
     return this.Adapter.Update(dataSet, "Orders");
 }
예제 #46
0
 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;
 }
예제 #47
0
 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;
 }
예제 #48
0
 public virtual int Update(MDataSet.OrdersDataTable dataTable) {
     return this.Adapter.Update(dataTable);
 }
예제 #49
0
 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;
 }
예제 #50
0
 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;
 }
예제 #51
0
 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;
 }
예제 #52
0
 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;
 }
예제 #53
0
 /// <summary>
 /// 将数据写入到数据库
 /// </summary>
 /// <param name="connString"></param>
 /// <param name="dataSet"></param>
 public static void Write(ConnectString connString, MDataSet dataSet)
 {
     new DataGateway().BatchInsert(connString, dataSet);
 }
예제 #54
0
 public UCOrganizationAll(MDataSet source)
 {
     InitializeComponent();
     organizationBindingSource.DataSource = source.Organization;
     _changes = new DataView(source.Organization, null, null, DataViewRowState.ModifiedCurrent);
 }
예제 #55
0
 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;
 }
예제 #56
0
 public virtual int Update(MDataSet dataSet) {
     return this.Adapter.Update(dataSet, "ReceiptRemains");
 }
예제 #57
0
 public UCTradePuplet(MDataSet source)
 {
     InitializeComponent();
     this.tradePutletBindingSource.DataSource = source.TradePutlet;
 }