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

            if (this.RcdFound17 != 0)
            {
                this.ScanLoadOrgdio();
                while ((this.RcdFound17 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowOrgdio();
                    this.CreateNewRowOrgdio();
                    this.ScanNextOrgdio();
                }
            }
            if (num > 0)
            {
                this.RcdFound17 = 1;
            }
            this.ScanEndOrgdio();
            if (this.ORGDIOSet.ORGDIO.Count > 0)
            {
                this.rowORGDIO = this.ORGDIOSet.ORGDIO[this.ORGDIOSet.ORGDIO.Count - 1];
            }
        }
Beispiel #2
0
 public ORGDIODataSet.ORGDIORow AddORGDIORow(int iDORGDIO, string oRGANIZACIJSKIDIO)
 {
     ORGDIODataSet.ORGDIORow row = (ORGDIODataSet.ORGDIORow) this.NewRow();
     row["IDORGDIO"]          = iDORGDIO;
     row["ORGANIZACIJSKIDIO"] = oRGANIZACIJSKIDIO;
     this.Rows.Add(row);
     return(row);
 }
Beispiel #3
0
        private void LoadByIDORGDIO(int startRow, int maxRows)
        {
            bool enforceConstraints = this.ORGDIOSet.EnforceConstraints;

            this.ORGDIOSet.ORGDIO.BeginLoadData();
            this.ScanByIDORGDIO(startRow, maxRows);
            this.ORGDIOSet.ORGDIO.EndLoadData();
            this.ORGDIOSet.EnforceConstraints = enforceConstraints;
            if (this.ORGDIOSet.ORGDIO.Count > 0)
            {
                this.rowORGDIO = this.ORGDIOSet.ORGDIO[this.ORGDIOSet.ORGDIO.Count - 1];
            }
        }
Beispiel #4
0
 private void ReadRowOrgdio()
 {
     this.Gx_mode = Mode.FromRowState(this.rowORGDIO.RowState);
     if (this.rowORGDIO.RowState != DataRowState.Added)
     {
         this.m__ORGANIZACIJSKIDIOOriginal = RuntimeHelpers.GetObjectValue(this.rowORGDIO["ORGANIZACIJSKIDIO", DataRowVersion.Original]);
     }
     else
     {
         this.m__ORGANIZACIJSKIDIOOriginal = RuntimeHelpers.GetObjectValue(this.rowORGDIO["ORGANIZACIJSKIDIO"]);
     }
     this._Gxremove = this.rowORGDIO.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowORGDIO = (ORGDIODataSet.ORGDIORow)DataSetUtil.CloneOriginalDataRow(this.rowORGDIO);
     }
 }
Beispiel #5
0
 public virtual bool FillByIDORGDIO(ORGDIODataSet dataSet, int iDORGDIO)
 {
     this.InitializeMembers();
     this.connDefault        = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.ORGDIOSet          = dataSet;
     this.rowORGDIO          = this.ORGDIOSet.ORGDIO.NewORGDIORow();
     this.rowORGDIO.IDORGDIO = iDORGDIO;
     try
     {
         this.LoadByIDORGDIO(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound17 == 0)
     {
         return(false);
     }
     return(true);
 }
Beispiel #6
0
 public ORGDIORowChangeEvent(ORGDIODataSet.ORGDIORow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Beispiel #7
0
 public void RemoveORGDIORow(ORGDIODataSet.ORGDIORow row)
 {
     this.Rows.Remove(row);
 }
Beispiel #8
0
 public void AddORGDIORow(ORGDIODataSet.ORGDIORow row)
 {
     this.Rows.Add(row);
 }
Beispiel #9
0
 public ORGDIOEventArgs(ORGDIODataSet.ORGDIORow 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.ORGDIOSet   = (ORGDIODataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.ORGDIOSet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.ORGDIOSet.ORGDIO.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        ORGDIODataSet.ORGDIORow current = (ORGDIODataSet.ORGDIORow)enumerator.Current;
                        this.rowORGDIO = current;
                        if (Helpers.IsRowChanged(this.rowORGDIO))
                        {
                            this.ReadRowOrgdio();
                            if (this.rowORGDIO.RowState == DataRowState.Added)
                            {
                                this.InsertOrgdio();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateOrgdio();
                            }
                        }
                    }
                }
                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 CreateNewRowOrgdio()
 {
     this.rowORGDIO = this.ORGDIOSet.ORGDIO.NewORGDIORow();
 }