private void LoadDataSpol(int maxRows) { int num = 0; if (this.RcdFound57 != 0) { this.ScanLoadSpol(); while ((this.RcdFound57 != 0) && (num != maxRows)) { num++; this.LoadRowSpol(); this.CreateNewRowSpol(); this.ScanNextSpol(); } } if (num > 0) { this.RcdFound57 = 1; } this.ScanEndSpol(); if (this.SPOLSet.SPOL.Count > 0) { this.rowSPOL = this.SPOLSet.SPOL[this.SPOLSet.SPOL.Count - 1]; } }
public SPOLDataSet.SPOLRow AddSPOLRow(int iDSPOL, string nAZIVSPOL) { SPOLDataSet.SPOLRow row = (SPOLDataSet.SPOLRow) this.NewRow(); row["IDSPOL"] = iDSPOL; row["NAZIVSPOL"] = nAZIVSPOL; this.Rows.Add(row); return(row); }
private void LoadByIDSPOL(int startRow, int maxRows) { bool enforceConstraints = this.SPOLSet.EnforceConstraints; this.SPOLSet.SPOL.BeginLoadData(); this.ScanByIDSPOL(startRow, maxRows); this.SPOLSet.SPOL.EndLoadData(); this.SPOLSet.EnforceConstraints = enforceConstraints; if (this.SPOLSet.SPOL.Count > 0) { this.rowSPOL = this.SPOLSet.SPOL[this.SPOLSet.SPOL.Count - 1]; } }
private void ReadRowSpol() { this.Gx_mode = Mode.FromRowState(this.rowSPOL.RowState); if (this.rowSPOL.RowState != DataRowState.Added) { this.m__NAZIVSPOLOriginal = RuntimeHelpers.GetObjectValue(this.rowSPOL["NAZIVSPOL", DataRowVersion.Original]); } else { this.m__NAZIVSPOLOriginal = RuntimeHelpers.GetObjectValue(this.rowSPOL["NAZIVSPOL"]); } this._Gxremove = this.rowSPOL.RowState == DataRowState.Deleted; if (this._Gxremove) { this.rowSPOL = (SPOLDataSet.SPOLRow)DataSetUtil.CloneOriginalDataRow(this.rowSPOL); } }
public virtual bool FillByIDSPOL(SPOLDataSet dataSet, int iDSPOL) { this.InitializeMembers(); this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.SPOLSet = dataSet; this.rowSPOL = this.SPOLSet.SPOL.NewSPOLRow(); this.rowSPOL.IDSPOL = iDSPOL; try { this.LoadByIDSPOL(0, -1); dataSet.AcceptChanges(); } finally { this.Cleanup(); } if (this.RcdFound57 == 0) { return(false); } return(true); }
public SPOLRowChangeEvent(SPOLDataSet.SPOLRow row, DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void RemoveSPOLRow(SPOLDataSet.SPOLRow row) { this.Rows.Remove(row); }
public void AddSPOLRow(SPOLDataSet.SPOLRow row) { this.Rows.Add(row); }
public SPOLEventArgs(SPOLDataSet.SPOLRow row, System.Data.StatementType statementType) { this.m_dataRow = row; this.m_statementType = statementType; }
public virtual int Update(DataSet dataSet) { this.InitializeMembers(); this.SPOLSet = (SPOLDataSet)dataSet; this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); if (this.SPOLSet == null) { throw new ArgumentException(this.resourceManager.GetString("nulldset")); } try { IEnumerator enumerator = null; this.connDefault.BeginTransaction(); try { enumerator = this.SPOLSet.SPOL.GetEnumerator(); while (enumerator.MoveNext()) { SPOLDataSet.SPOLRow current = (SPOLDataSet.SPOLRow)enumerator.Current; this.rowSPOL = current; if (Helpers.IsRowChanged(this.rowSPOL)) { this.ReadRowSpol(); if (this.rowSPOL.RowState == DataRowState.Added) { this.InsertSpol(); } else { if (this._Gxremove) { this.Delete(); continue; } this.UpdateSpol(); } } } } 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); }
private void CreateNewRowSpol() { this.rowSPOL = this.SPOLSet.SPOL.NewSPOLRow(); }