Exemple #1
0
        private void LoadDataStrucnasprema(int maxRows)
        {
            int num = 0;

            if (this.RcdFound34 != 0)
            {
                this.ScanLoadStrucnasprema();
                while ((this.RcdFound34 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowStrucnasprema();
                    this.CreateNewRowStrucnasprema();
                    this.ScanNextStrucnasprema();
                }
            }
            if (num > 0)
            {
                this.RcdFound34 = 1;
            }
            this.ScanEndStrucnasprema();
            if (this.STRUCNASPREMASet.STRUCNASPREMA.Count > 0)
            {
                this.rowSTRUCNASPREMA = this.STRUCNASPREMASet.STRUCNASPREMA[this.STRUCNASPREMASet.STRUCNASPREMA.Count - 1];
            }
        }
Exemple #2
0
 public STRUCNASPREMADataSet.STRUCNASPREMARow AddSTRUCNASPREMARow(int iDSTRUCNASPREMA, string nAZIVSTRUCNASPREMA)
 {
     STRUCNASPREMADataSet.STRUCNASPREMARow row = (STRUCNASPREMADataSet.STRUCNASPREMARow) this.NewRow();
     row["IDSTRUCNASPREMA"]    = iDSTRUCNASPREMA;
     row["NAZIVSTRUCNASPREMA"] = nAZIVSTRUCNASPREMA;
     this.Rows.Add(row);
     return(row);
 }
Exemple #3
0
        private void LoadByIDSTRUCNASPREMA(int startRow, int maxRows)
        {
            bool enforceConstraints = this.STRUCNASPREMASet.EnforceConstraints;

            this.STRUCNASPREMASet.STRUCNASPREMA.BeginLoadData();
            this.ScanByIDSTRUCNASPREMA(startRow, maxRows);
            this.STRUCNASPREMASet.STRUCNASPREMA.EndLoadData();
            this.STRUCNASPREMASet.EnforceConstraints = enforceConstraints;
            if (this.STRUCNASPREMASet.STRUCNASPREMA.Count > 0)
            {
                this.rowSTRUCNASPREMA = this.STRUCNASPREMASet.STRUCNASPREMA[this.STRUCNASPREMASet.STRUCNASPREMA.Count - 1];
            }
        }
Exemple #4
0
 private void ReadRowStrucnasprema()
 {
     this.Gx_mode = Mode.FromRowState(this.rowSTRUCNASPREMA.RowState);
     if (this.rowSTRUCNASPREMA.RowState != DataRowState.Added)
     {
         this.m__NAZIVSTRUCNASPREMAOriginal = RuntimeHelpers.GetObjectValue(this.rowSTRUCNASPREMA["NAZIVSTRUCNASPREMA", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVSTRUCNASPREMAOriginal = RuntimeHelpers.GetObjectValue(this.rowSTRUCNASPREMA["NAZIVSTRUCNASPREMA"]);
     }
     this._Gxremove = this.rowSTRUCNASPREMA.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowSTRUCNASPREMA = (STRUCNASPREMADataSet.STRUCNASPREMARow)DataSetUtil.CloneOriginalDataRow(this.rowSTRUCNASPREMA);
     }
 }
Exemple #5
0
 public virtual bool FillByIDSTRUCNASPREMA(STRUCNASPREMADataSet dataSet, int iDSTRUCNASPREMA)
 {
     this.InitializeMembers();
     this.connDefault      = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.STRUCNASPREMASet = dataSet;
     this.rowSTRUCNASPREMA = this.STRUCNASPREMASet.STRUCNASPREMA.NewSTRUCNASPREMARow();
     this.rowSTRUCNASPREMA.IDSTRUCNASPREMA = iDSTRUCNASPREMA;
     try
     {
         this.LoadByIDSTRUCNASPREMA(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound34 == 0)
     {
         return(false);
     }
     return(true);
 }
Exemple #6
0
 public STRUCNASPREMAEventArgs(STRUCNASPREMADataSet.STRUCNASPREMARow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Exemple #7
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.STRUCNASPREMASet = (STRUCNASPREMADataSet)dataSet;
            this.connDefault      = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.STRUCNASPREMASet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.STRUCNASPREMASet.STRUCNASPREMA.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        STRUCNASPREMADataSet.STRUCNASPREMARow current = (STRUCNASPREMADataSet.STRUCNASPREMARow)enumerator.Current;
                        this.rowSTRUCNASPREMA = current;
                        if (Helpers.IsRowChanged(this.rowSTRUCNASPREMA))
                        {
                            this.ReadRowStrucnasprema();
                            if (this.rowSTRUCNASPREMA.RowState == DataRowState.Added)
                            {
                                this.InsertStrucnasprema();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateStrucnasprema();
                            }
                        }
                    }
                }
                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);
        }
Exemple #8
0
 private void CreateNewRowStrucnasprema()
 {
     this.rowSTRUCNASPREMA = this.STRUCNASPREMASet.STRUCNASPREMA.NewSTRUCNASPREMARow();
 }
Exemple #9
0
 public STRUCNASPREMARowChangeEvent(STRUCNASPREMADataSet.STRUCNASPREMARow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Exemple #10
0
 public void RemoveSTRUCNASPREMARow(STRUCNASPREMADataSet.STRUCNASPREMARow row)
 {
     this.Rows.Remove(row);
 }
Exemple #11
0
 public void AddSTRUCNASPREMARow(STRUCNASPREMADataSet.STRUCNASPREMARow row)
 {
     this.Rows.Add(row);
 }