Example #1
0
        private void LoadDataTipura(int maxRows)
        {
            int num = 0;

            if (this.RcdFound199 != 0)
            {
                this.ScanLoadTipura();
                while ((this.RcdFound199 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowTipura();
                    this.CreateNewRowTipura();
                    this.ScanNextTipura();
                }
            }
            if (num > 0)
            {
                this.RcdFound199 = 1;
            }
            this.ScanEndTipura();
            if (this.TIPURASet.TIPURA.Count > 0)
            {
                this.rowTIPURA = this.TIPURASet.TIPURA[this.TIPURASet.TIPURA.Count - 1];
            }
        }
Example #2
0
 public TIPURADataSet.TIPURARow AddTIPURARow(int iDTIPURA, string nAZIVTIPURA)
 {
     TIPURADataSet.TIPURARow row = (TIPURADataSet.TIPURARow) this.NewRow();
     row["IDTIPURA"]    = iDTIPURA;
     row["NAZIVTIPURA"] = nAZIVTIPURA;
     this.Rows.Add(row);
     return(row);
 }
Example #3
0
        private void LoadByIDTIPURA(int startRow, int maxRows)
        {
            bool enforceConstraints = this.TIPURASet.EnforceConstraints;

            this.TIPURASet.TIPURA.BeginLoadData();
            this.ScanByIDTIPURA(startRow, maxRows);
            this.TIPURASet.TIPURA.EndLoadData();
            this.TIPURASet.EnforceConstraints = enforceConstraints;
            if (this.TIPURASet.TIPURA.Count > 0)
            {
                this.rowTIPURA = this.TIPURASet.TIPURA[this.TIPURASet.TIPURA.Count - 1];
            }
        }
Example #4
0
 private void ReadRowTipura()
 {
     this.Gx_mode = Mode.FromRowState(this.rowTIPURA.RowState);
     if (this.rowTIPURA.RowState != DataRowState.Added)
     {
         this.m__NAZIVTIPURAOriginal = RuntimeHelpers.GetObjectValue(this.rowTIPURA["NAZIVTIPURA", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVTIPURAOriginal = RuntimeHelpers.GetObjectValue(this.rowTIPURA["NAZIVTIPURA"]);
     }
     this._Gxremove = this.rowTIPURA.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowTIPURA = (TIPURADataSet.TIPURARow)DataSetUtil.CloneOriginalDataRow(this.rowTIPURA);
     }
 }
Example #5
0
 public virtual bool FillByIDTIPURA(TIPURADataSet dataSet, int iDTIPURA)
 {
     this.InitializeMembers();
     this.connDefault        = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.TIPURASet          = dataSet;
     this.rowTIPURA          = this.TIPURASet.TIPURA.NewTIPURARow();
     this.rowTIPURA.IDTIPURA = iDTIPURA;
     try
     {
         this.LoadByIDTIPURA(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound199 == 0)
     {
         return(false);
     }
     return(true);
 }
Example #6
0
 public TIPURARowChangeEvent(TIPURADataSet.TIPURARow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Example #7
0
 public void RemoveTIPURARow(TIPURADataSet.TIPURARow row)
 {
     this.Rows.Remove(row);
 }
Example #8
0
 public void AddTIPURARow(TIPURADataSet.TIPURARow row)
 {
     this.Rows.Add(row);
 }
Example #9
0
 public TIPURAEventArgs(TIPURADataSet.TIPURARow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Example #10
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.TIPURASet   = (TIPURADataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.TIPURASet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.TIPURASet.TIPURA.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        TIPURADataSet.TIPURARow current = (TIPURADataSet.TIPURARow)enumerator.Current;
                        this.rowTIPURA = current;
                        if (Helpers.IsRowChanged(this.rowTIPURA))
                        {
                            this.ReadRowTipura();
                            if (this.rowTIPURA.RowState == DataRowState.Added)
                            {
                                this.InsertTipura();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateTipura();
                            }
                        }
                    }
                }
                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);
        }
Example #11
0
 private void CreateNewRowTipura()
 {
     this.rowTIPURA = this.TIPURASet.TIPURA.NewTIPURARow();
 }