Beispiel #1
0
        private void LoadDataAktivnost(int maxRows)
        {
            int num = 0;

            if (this.RcdFound179 != 0)
            {
                this.ScanLoadAktivnost();
                while ((this.RcdFound179 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowAktivnost();
                    this.CreateNewRowAktivnost();
                    this.ScanNextAktivnost();
                }
            }
            if (num > 0)
            {
                this.RcdFound179 = 1;
            }
            this.ScanEndAktivnost();
            if (this.AKTIVNOSTSet.AKTIVNOST.Count > 0)
            {
                this.rowAKTIVNOST = this.AKTIVNOSTSet.AKTIVNOST[this.AKTIVNOSTSet.AKTIVNOST.Count - 1];
            }
        }
Beispiel #2
0
 public AKTIVNOSTDataSet.AKTIVNOSTRow AddAKTIVNOSTRow(int iDAKTIVNOST, string nAZIVAKTIVNOST)
 {
     AKTIVNOSTDataSet.AKTIVNOSTRow row = (AKTIVNOSTDataSet.AKTIVNOSTRow) this.NewRow();
     row["IDAKTIVNOST"]    = iDAKTIVNOST;
     row["NAZIVAKTIVNOST"] = nAZIVAKTIVNOST;
     this.Rows.Add(row);
     return(row);
 }
Beispiel #3
0
        private void LoadByIDAKTIVNOST(int startRow, int maxRows)
        {
            bool enforceConstraints = this.AKTIVNOSTSet.EnforceConstraints;

            this.AKTIVNOSTSet.AKTIVNOST.BeginLoadData();
            this.ScanByIDAKTIVNOST(startRow, maxRows);
            this.AKTIVNOSTSet.AKTIVNOST.EndLoadData();
            this.AKTIVNOSTSet.EnforceConstraints = enforceConstraints;
            if (this.AKTIVNOSTSet.AKTIVNOST.Count > 0)
            {
                this.rowAKTIVNOST = this.AKTIVNOSTSet.AKTIVNOST[this.AKTIVNOSTSet.AKTIVNOST.Count - 1];
            }
        }
Beispiel #4
0
 private void ReadRowAktivnost()
 {
     this.Gx_mode = Mode.FromRowState(this.rowAKTIVNOST.RowState);
     if (this.rowAKTIVNOST.RowState != DataRowState.Added)
     {
         this.m__NAZIVAKTIVNOSTOriginal = RuntimeHelpers.GetObjectValue(this.rowAKTIVNOST["NAZIVAKTIVNOST", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVAKTIVNOSTOriginal = RuntimeHelpers.GetObjectValue(this.rowAKTIVNOST["NAZIVAKTIVNOST"]);
     }
     this._Gxremove = this.rowAKTIVNOST.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowAKTIVNOST = (AKTIVNOSTDataSet.AKTIVNOSTRow)DataSetUtil.CloneOriginalDataRow(this.rowAKTIVNOST);
     }
 }
Beispiel #5
0
 public virtual bool FillByIDAKTIVNOST(AKTIVNOSTDataSet dataSet, int iDAKTIVNOST)
 {
     this.InitializeMembers();
     this.connDefault              = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.AKTIVNOSTSet             = dataSet;
     this.rowAKTIVNOST             = this.AKTIVNOSTSet.AKTIVNOST.NewAKTIVNOSTRow();
     this.rowAKTIVNOST.IDAKTIVNOST = iDAKTIVNOST;
     try
     {
         this.LoadByIDAKTIVNOST(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound179 == 0)
     {
         return(false);
     }
     return(true);
 }
Beispiel #6
0
 public AKTIVNOSTRowChangeEvent(AKTIVNOSTDataSet.AKTIVNOSTRow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Beispiel #7
0
 public void RemoveAKTIVNOSTRow(AKTIVNOSTDataSet.AKTIVNOSTRow row)
 {
     this.Rows.Remove(row);
 }
Beispiel #8
0
 public void AddAKTIVNOSTRow(AKTIVNOSTDataSet.AKTIVNOSTRow row)
 {
     this.Rows.Add(row);
 }
Beispiel #9
0
 public AKTIVNOSTEventArgs(AKTIVNOSTDataSet.AKTIVNOSTRow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Beispiel #10
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.AKTIVNOSTSet = (AKTIVNOSTDataSet)dataSet;
            this.connDefault  = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.AKTIVNOSTSet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.AKTIVNOSTSet.AKTIVNOST.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        AKTIVNOSTDataSet.AKTIVNOSTRow current = (AKTIVNOSTDataSet.AKTIVNOSTRow)enumerator.Current;
                        this.rowAKTIVNOST = current;
                        if (Helpers.IsRowChanged(this.rowAKTIVNOST))
                        {
                            this.ReadRowAktivnost();
                            if (this.rowAKTIVNOST.RowState == DataRowState.Added)
                            {
                                this.InsertAktivnost();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateAktivnost();
                            }
                        }
                    }
                }
                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);
        }
Beispiel #11
0
 private void CreateNewRowAktivnost()
 {
     this.rowAKTIVNOST = this.AKTIVNOSTSet.AKTIVNOST.NewAKTIVNOSTRow();
 }