Пример #1
0
        public override DataSet Clone()
        {
            STRUKADataSet set = (STRUKADataSet)base.Clone();

            set.InitVars();
            return(set);
        }
Пример #2
0
 public virtual int Fill(STRUKADataSet dataSet, int iDSTRUKA)
 {
     if (!this.FillByIDSTRUKA(dataSet, iDSTRUKA))
     {
         throw new STRUKANotFoundException(string.Format(CultureInfo.InvariantCulture, this.resourceManager.GetString("inex"), new object[] { this.resourceManagerTables.GetString("STRUKA") }));
     }
     return(0);
 }
Пример #3
0
 public virtual int Fill(DataSet dataSet)
 {
     this.STRUKASet = (STRUKADataSet)dataSet;
     if (this.STRUKASet != null)
     {
         return(this.Fill(this.STRUKASet));
     }
     this.STRUKASet = new STRUKADataSet();
     this.Fill(this.STRUKASet);
     dataSet.Merge(this.STRUKASet);
     return(0);
 }
Пример #4
0
        public static XmlSchemaComplexType GetTypedDataSetSchema(XmlSchemaSet xs)
        {
            STRUKADataSet        set      = new STRUKADataSet();
            XmlSchemaComplexType type2    = new XmlSchemaComplexType();
            XmlSchemaSequence    sequence = new XmlSchemaSequence();

            xs.Add(set.GetSchemaSerializable());
            XmlSchemaAny item = new XmlSchemaAny {
                Namespace = set.Namespace
            };

            sequence.Items.Add(item);
            type2.Particle = sequence;
            return(type2);
        }
Пример #5
0
 public virtual int FillPage(STRUKADataSet dataSet, int startRow, int maxRows)
 {
     this.InitializeMembers();
     this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.STRUKASet   = dataSet;
     try
     {
         this.LoadChildStruka(startRow, maxRows);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     return(0);
 }
Пример #6
0
 public virtual bool FillByIDSTRUKA(STRUKADataSet dataSet, int iDSTRUKA)
 {
     this.InitializeMembers();
     this.connDefault        = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.STRUKASet          = dataSet;
     this.rowSTRUKA          = this.STRUKASet.STRUKA.NewSTRUKARow();
     this.rowSTRUKA.IDSTRUKA = iDSTRUKA;
     try
     {
         this.LoadByIDSTRUKA(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound35 == 0)
     {
         return(false);
     }
     return(true);
 }
Пример #7
0
            public static XmlSchemaComplexType GetTypedTableSchema(XmlSchemaSet xs)
            {
                XmlSchemaComplexType type2    = new XmlSchemaComplexType();
                XmlSchemaSequence    sequence = new XmlSchemaSequence();
                STRUKADataSet        set      = new STRUKADataSet();

                xs.Add(set.GetSchemaSerializable());
                XmlSchemaAny item = new XmlSchemaAny {
                    Namespace = "http://www.w3.org/2001/XMLSchema"
                };
                decimal num = new decimal(0);

                item.MinOccurs       = num;
                item.MaxOccurs       = 79228162514264337593543950335M;
                item.ProcessContents = XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(item);
                XmlSchemaAny any2 = new XmlSchemaAny {
                    Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
                };

                num                  = new decimal(1);
                any2.MinOccurs       = num;
                any2.ProcessContents = XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                XmlSchemaAttribute attribute = new XmlSchemaAttribute {
                    Name       = "namespace",
                    FixedValue = set.Namespace
                };

                type2.Attributes.Add(attribute);
                XmlSchemaAttribute attribute2 = new XmlSchemaAttribute {
                    Name       = "tableTypeName",
                    FixedValue = "InvoiceDataTable"
                };

                type2.Attributes.Add(attribute2);
                type2.Particle = sequence;
                return(type2);
            }
Пример #8
0
 public virtual int Fill(STRUKADataSet dataSet)
 {
     if (this.fillDataParameters != null)
     {
         this.Fill(dataSet, int.Parse(this.fillDataParameters[0].Value.ToString()));
     }
     else
     {
         try
         {
             this.InitializeMembers();
             this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
             this.STRUKASet   = dataSet;
             this.LoadChildStruka(0, -1);
             dataSet.AcceptChanges();
         }
         finally
         {
             this.Cleanup();
         }
     }
     return(0);
 }
Пример #9
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.STRUKASet   = (STRUKADataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.STRUKASet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.STRUKASet.STRUKA.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        STRUKADataSet.STRUKARow current = (STRUKADataSet.STRUKARow)enumerator.Current;
                        this.rowSTRUKA = current;
                        if (Helpers.IsRowChanged(this.rowSTRUKA))
                        {
                            this.ReadRowStruka();
                            if (this.rowSTRUKA.RowState == DataRowState.Added)
                            {
                                this.InsertStruka();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateStruka();
                            }
                        }
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        (enumerator as IDisposable).Dispose();
                    }
                }
                dataSet.AcceptChanges();
                this.connDefault.Commit();
            }
            catch (System.Exception exception1)
            {
                throw exception1;

                //this.connDefault.Rollback();
            }
            finally
            {
                this.Cleanup();
            }
            return(0);
        }
Пример #10
0
 private void InitializeMembers()
 {
     this.STRUKASet = new STRUKADataSet();
     this.Initialize();
     this.dsDefault = new DataStore(new SqlServer2005Handler(), "System.Data.SqlClient", Configuration.ConnectionString, DeklaritTransaction.TransactionSlotName);
 }
Пример #11
0
 public virtual int Fill(STRUKADataSet dataSet, IDataRecord dataRecord)
 {
     return(this.Fill(dataSet, Conversions.ToInteger(dataRecord["IDSTRUKA"])));
 }