Exemplo n.º 1
0
        private void LoadDataTipira(int maxRows)
        {
            int num = 0;

            if (this.RcdFound198 != 0)
            {
                this.ScanLoadTipira();
                while ((this.RcdFound198 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowTipira();
                    this.CreateNewRowTipira();
                    this.ScanNextTipira();
                }
            }
            if (num > 0)
            {
                this.RcdFound198 = 1;
            }
            this.ScanEndTipira();
            if (this.TIPIRASet.TIPIRA.Count > 0)
            {
                this.rowTIPIRA = this.TIPIRASet.TIPIRA[this.TIPIRASet.TIPIRA.Count - 1];
            }
        }
Exemplo n.º 2
0
 public TIPIRADataSet.TIPIRARow AddTIPIRARow(int iDTIPIRA, string nAZIVTIPIRA)
 {
     TIPIRADataSet.TIPIRARow row = (TIPIRADataSet.TIPIRARow) this.NewRow();
     row["IDTIPIRA"]    = iDTIPIRA;
     row["NAZIVTIPIRA"] = nAZIVTIPIRA;
     this.Rows.Add(row);
     return(row);
 }
Exemplo n.º 3
0
        private void LoadByIDTIPIRA(int startRow, int maxRows)
        {
            bool enforceConstraints = this.TIPIRASet.EnforceConstraints;

            this.TIPIRASet.TIPIRA.BeginLoadData();
            this.ScanByIDTIPIRA(startRow, maxRows);
            this.TIPIRASet.TIPIRA.EndLoadData();
            this.TIPIRASet.EnforceConstraints = enforceConstraints;
            if (this.TIPIRASet.TIPIRA.Count > 0)
            {
                this.rowTIPIRA = this.TIPIRASet.TIPIRA[this.TIPIRASet.TIPIRA.Count - 1];
            }
        }
Exemplo n.º 4
0
 private void ReadRowTipira()
 {
     this.Gx_mode = Mode.FromRowState(this.rowTIPIRA.RowState);
     if (this.rowTIPIRA.RowState != DataRowState.Added)
     {
         this.m__NAZIVTIPIRAOriginal = RuntimeHelpers.GetObjectValue(this.rowTIPIRA["NAZIVTIPIRA", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVTIPIRAOriginal = RuntimeHelpers.GetObjectValue(this.rowTIPIRA["NAZIVTIPIRA"]);
     }
     this._Gxremove = this.rowTIPIRA.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowTIPIRA = (TIPIRADataSet.TIPIRARow)DataSetUtil.CloneOriginalDataRow(this.rowTIPIRA);
     }
 }
Exemplo n.º 5
0
 public virtual bool FillByIDTIPIRA(TIPIRADataSet dataSet, int iDTIPIRA)
 {
     this.InitializeMembers();
     this.connDefault        = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.TIPIRASet          = dataSet;
     this.rowTIPIRA          = this.TIPIRASet.TIPIRA.NewTIPIRARow();
     this.rowTIPIRA.IDTIPIRA = iDTIPIRA;
     try
     {
         this.LoadByIDTIPIRA(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound198 == 0)
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 6
0
 public TIPIRARowChangeEvent(TIPIRADataSet.TIPIRARow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Exemplo n.º 7
0
 public void RemoveTIPIRARow(TIPIRADataSet.TIPIRARow row)
 {
     this.Rows.Remove(row);
 }
Exemplo n.º 8
0
 public void AddTIPIRARow(TIPIRADataSet.TIPIRARow row)
 {
     this.Rows.Add(row);
 }
Exemplo n.º 9
0
 public TIPIRAEventArgs(TIPIRADataSet.TIPIRARow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Exemplo n.º 10
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.TIPIRASet   = (TIPIRADataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.TIPIRASet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.TIPIRASet.TIPIRA.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        TIPIRADataSet.TIPIRARow current = (TIPIRADataSet.TIPIRARow)enumerator.Current;
                        this.rowTIPIRA = current;
                        if (Helpers.IsRowChanged(this.rowTIPIRA))
                        {
                            this.ReadRowTipira();
                            if (this.rowTIPIRA.RowState == DataRowState.Added)
                            {
                                this.InsertTipira();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateTipira();
                            }
                        }
                    }
                }
                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);
        }
Exemplo n.º 11
0
 private void CreateNewRowTipira()
 {
     this.rowTIPIRA = this.TIPIRASet.TIPIRA.NewTIPIRARow();
 }