示例#1
0
        private void LoadDataOsvrsta(int maxRows)
        {
            int num = 0;

            if (this.RcdFound255 != 0)
            {
                this.ScanLoadOsvrsta();
                while ((this.RcdFound255 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowOsvrsta();
                    this.CreateNewRowOsvrsta();
                    this.ScanNextOsvrsta();
                }
            }
            if (num > 0)
            {
                this.RcdFound255 = 1;
            }
            this.ScanEndOsvrsta();
            if (this.OSVRSTASet.OSVRSTA.Count > 0)
            {
                this.rowOSVRSTA = this.OSVRSTASet.OSVRSTA[this.OSVRSTASet.OSVRSTA.Count - 1];
            }
        }
示例#2
0
 public OSVRSTADataSet.OSVRSTARow AddOSVRSTARow(int iDOSVRSTA, string oPISOSVRSTA)
 {
     OSVRSTADataSet.OSVRSTARow row = (OSVRSTADataSet.OSVRSTARow) this.NewRow();
     row["IDOSVRSTA"]   = iDOSVRSTA;
     row["OPISOSVRSTA"] = oPISOSVRSTA;
     this.Rows.Add(row);
     return(row);
 }
示例#3
0
        private void LoadByIDOSVRSTA(int startRow, int maxRows)
        {
            bool enforceConstraints = this.OSVRSTASet.EnforceConstraints;

            this.OSVRSTASet.OSVRSTA.BeginLoadData();
            this.ScanByIDOSVRSTA(startRow, maxRows);
            this.OSVRSTASet.OSVRSTA.EndLoadData();
            this.OSVRSTASet.EnforceConstraints = enforceConstraints;
            if (this.OSVRSTASet.OSVRSTA.Count > 0)
            {
                this.rowOSVRSTA = this.OSVRSTASet.OSVRSTA[this.OSVRSTASet.OSVRSTA.Count - 1];
            }
        }
示例#4
0
 private void ReadRowOsvrsta()
 {
     this.Gx_mode = Mode.FromRowState(this.rowOSVRSTA.RowState);
     if (this.rowOSVRSTA.RowState != DataRowState.Added)
     {
         this.m__OPISOSVRSTAOriginal = RuntimeHelpers.GetObjectValue(this.rowOSVRSTA["OPISOSVRSTA", DataRowVersion.Original]);
     }
     else
     {
         this.m__OPISOSVRSTAOriginal = RuntimeHelpers.GetObjectValue(this.rowOSVRSTA["OPISOSVRSTA"]);
     }
     this._Gxremove = this.rowOSVRSTA.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowOSVRSTA = (OSVRSTADataSet.OSVRSTARow)DataSetUtil.CloneOriginalDataRow(this.rowOSVRSTA);
     }
 }
示例#5
0
 public virtual bool FillByIDOSVRSTA(OSVRSTADataSet dataSet, int iDOSVRSTA)
 {
     this.InitializeMembers();
     this.connDefault          = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.OSVRSTASet           = dataSet;
     this.rowOSVRSTA           = this.OSVRSTASet.OSVRSTA.NewOSVRSTARow();
     this.rowOSVRSTA.IDOSVRSTA = iDOSVRSTA;
     try
     {
         this.LoadByIDOSVRSTA(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound255 == 0)
     {
         return(false);
     }
     return(true);
 }
示例#6
0
 public OSVRSTARowChangeEvent(OSVRSTADataSet.OSVRSTARow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
示例#7
0
 public void RemoveOSVRSTARow(OSVRSTADataSet.OSVRSTARow row)
 {
     this.Rows.Remove(row);
 }
示例#8
0
 public void AddOSVRSTARow(OSVRSTADataSet.OSVRSTARow row)
 {
     this.Rows.Add(row);
 }
示例#9
0
 public OSVRSTAEventArgs(OSVRSTADataSet.OSVRSTARow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
示例#10
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.OSVRSTASet  = (OSVRSTADataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.OSVRSTASet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.OSVRSTASet.OSVRSTA.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        OSVRSTADataSet.OSVRSTARow current = (OSVRSTADataSet.OSVRSTARow)enumerator.Current;
                        this.rowOSVRSTA = current;
                        if (Helpers.IsRowChanged(this.rowOSVRSTA))
                        {
                            this.ReadRowOsvrsta();
                            if (this.rowOSVRSTA.RowState == DataRowState.Added)
                            {
                                this.InsertOsvrsta();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateOsvrsta();
                            }
                        }
                    }
                }
                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);
        }
示例#11
0
 private void CreateNewRowOsvrsta()
 {
     this.rowOSVRSTA = this.OSVRSTASet.OSVRSTA.NewOSVRSTARow();
 }