Esempio n. 1
0
        private void LoadDataValute(int maxRows)
        {
            int num = 0;

            if (this.RcdFound39 != 0)
            {
                this.ScanLoadValute();
                while ((this.RcdFound39 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowValute();
                    this.CreateNewRowValute();
                    this.ScanNextValute();
                }
            }
            if (num > 0)
            {
                this.RcdFound39 = 1;
            }
            this.ScanEndValute();
            if (this.VALUTESet.VALUTE.Count > 0)
            {
                this.rowVALUTE = this.VALUTESet.VALUTE[this.VALUTESet.VALUTE.Count - 1];
            }
        }
Esempio n. 2
0
 public VALUTEDataSet.VALUTERow AddVALUTERow(int iDVALUTA, string nAZIVVALUTA, decimal tECAJ)
 {
     VALUTEDataSet.VALUTERow row = (VALUTEDataSet.VALUTERow) this.NewRow();
     row["IDVALUTA"]    = iDVALUTA;
     row["NAZIVVALUTA"] = nAZIVVALUTA;
     row["TECAJ"]       = tECAJ;
     this.Rows.Add(row);
     return(row);
 }
Esempio n. 3
0
        private void LoadByIDVALUTA(int startRow, int maxRows)
        {
            bool enforceConstraints = this.VALUTESet.EnforceConstraints;

            this.VALUTESet.VALUTE.BeginLoadData();
            this.ScanByIDVALUTA(startRow, maxRows);
            this.VALUTESet.VALUTE.EndLoadData();
            this.VALUTESet.EnforceConstraints = enforceConstraints;
            if (this.VALUTESet.VALUTE.Count > 0)
            {
                this.rowVALUTE = this.VALUTESet.VALUTE[this.VALUTESet.VALUTE.Count - 1];
            }
        }
Esempio n. 4
0
 private void ReadRowValute()
 {
     this.Gx_mode = Mode.FromRowState(this.rowVALUTE.RowState);
     if (this.rowVALUTE.RowState != DataRowState.Added)
     {
         this.m__NAZIVVALUTAOriginal = RuntimeHelpers.GetObjectValue(this.rowVALUTE["NAZIVVALUTA", DataRowVersion.Original]);
         this.m__TECAJOriginal       = RuntimeHelpers.GetObjectValue(this.rowVALUTE["TECAJ", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVVALUTAOriginal = RuntimeHelpers.GetObjectValue(this.rowVALUTE["NAZIVVALUTA"]);
         this.m__TECAJOriginal       = RuntimeHelpers.GetObjectValue(this.rowVALUTE["TECAJ"]);
     }
     this._Gxremove = this.rowVALUTE.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowVALUTE = (VALUTEDataSet.VALUTERow)DataSetUtil.CloneOriginalDataRow(this.rowVALUTE);
     }
 }
Esempio n. 5
0
 public virtual bool FillByIDVALUTA(VALUTEDataSet dataSet, int iDVALUTA)
 {
     this.InitializeMembers();
     this.connDefault        = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.VALUTESet          = dataSet;
     this.rowVALUTE          = this.VALUTESet.VALUTE.NewVALUTERow();
     this.rowVALUTE.IDVALUTA = iDVALUTA;
     try
     {
         this.LoadByIDVALUTA(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound39 == 0)
     {
         return(false);
     }
     return(true);
 }
Esempio n. 6
0
 public VALUTERowChangeEvent(VALUTEDataSet.VALUTERow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Esempio n. 7
0
 public void RemoveVALUTERow(VALUTEDataSet.VALUTERow row)
 {
     this.Rows.Remove(row);
 }
Esempio n. 8
0
 public void AddVALUTERow(VALUTEDataSet.VALUTERow row)
 {
     this.Rows.Add(row);
 }
Esempio n. 9
0
 private void CreateNewRowValute()
 {
     this.rowVALUTE = this.VALUTESet.VALUTE.NewVALUTERow();
 }
Esempio n. 10
0
 public VALUTEEventArgs(VALUTEDataSet.VALUTERow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Esempio n. 11
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.VALUTESet   = (VALUTEDataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.VALUTESet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.VALUTESet.VALUTE.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        VALUTEDataSet.VALUTERow current = (VALUTEDataSet.VALUTERow)enumerator.Current;
                        this.rowVALUTE = current;
                        if (Helpers.IsRowChanged(this.rowVALUTE))
                        {
                            this.ReadRowValute();
                            if (this.rowVALUTE.RowState == DataRowState.Added)
                            {
                                this.InsertValute();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateValute();
                            }
                        }
                    }
                }
                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);
        }