Ejemplo n.º 1
0
        private void LoadDataIpident(int maxRows)
        {
            int num = 0;

            if (this.RcdFound58 != 0)
            {
                this.ScanLoadIpident();
                while ((this.RcdFound58 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowIpident();
                    this.CreateNewRowIpident();
                    this.ScanNextIpident();
                }
            }
            if (num > 0)
            {
                this.RcdFound58 = 1;
            }
            this.ScanEndIpident();
            if (this.IPIDENTSet.IPIDENT.Count > 0)
            {
                this.rowIPIDENT = this.IPIDENTSet.IPIDENT[this.IPIDENTSet.IPIDENT.Count - 1];
            }
        }
Ejemplo n.º 2
0
 public IPIDENTDataSet.IPIDENTRow AddIPIDENTRow(int iDIPIDENT, string nAZIVIPIDENT)
 {
     IPIDENTDataSet.IPIDENTRow row = (IPIDENTDataSet.IPIDENTRow) this.NewRow();
     row["IDIPIDENT"]    = iDIPIDENT;
     row["NAZIVIPIDENT"] = nAZIVIPIDENT;
     this.Rows.Add(row);
     return(row);
 }
Ejemplo n.º 3
0
        private void LoadByIDIPIDENT(int startRow, int maxRows)
        {
            bool enforceConstraints = this.IPIDENTSet.EnforceConstraints;

            this.IPIDENTSet.IPIDENT.BeginLoadData();
            this.ScanByIDIPIDENT(startRow, maxRows);
            this.IPIDENTSet.IPIDENT.EndLoadData();
            this.IPIDENTSet.EnforceConstraints = enforceConstraints;
            if (this.IPIDENTSet.IPIDENT.Count > 0)
            {
                this.rowIPIDENT = this.IPIDENTSet.IPIDENT[this.IPIDENTSet.IPIDENT.Count - 1];
            }
        }
Ejemplo n.º 4
0
 private void ReadRowIpident()
 {
     this.Gx_mode = Mode.FromRowState(this.rowIPIDENT.RowState);
     if (this.rowIPIDENT.RowState != DataRowState.Added)
     {
         this.m__NAZIVIPIDENTOriginal = RuntimeHelpers.GetObjectValue(this.rowIPIDENT["NAZIVIPIDENT", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVIPIDENTOriginal = RuntimeHelpers.GetObjectValue(this.rowIPIDENT["NAZIVIPIDENT"]);
     }
     this._Gxremove = this.rowIPIDENT.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowIPIDENT = (IPIDENTDataSet.IPIDENTRow)DataSetUtil.CloneOriginalDataRow(this.rowIPIDENT);
     }
 }
Ejemplo n.º 5
0
 public virtual bool FillByIDIPIDENT(IPIDENTDataSet dataSet, int iDIPIDENT)
 {
     this.InitializeMembers();
     this.connDefault          = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.IPIDENTSet           = dataSet;
     this.rowIPIDENT           = this.IPIDENTSet.IPIDENT.NewIPIDENTRow();
     this.rowIPIDENT.IDIPIDENT = iDIPIDENT;
     try
     {
         this.LoadByIDIPIDENT(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound58 == 0)
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 6
0
 public IPIDENTRowChangeEvent(IPIDENTDataSet.IPIDENTRow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Ejemplo n.º 7
0
 public void RemoveIPIDENTRow(IPIDENTDataSet.IPIDENTRow row)
 {
     this.Rows.Remove(row);
 }
Ejemplo n.º 8
0
 public void AddIPIDENTRow(IPIDENTDataSet.IPIDENTRow row)
 {
     this.Rows.Add(row);
 }
Ejemplo n.º 9
0
 public IPIDENTEventArgs(IPIDENTDataSet.IPIDENTRow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Ejemplo n.º 10
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.IPIDENTSet  = (IPIDENTDataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.IPIDENTSet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.IPIDENTSet.IPIDENT.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        IPIDENTDataSet.IPIDENTRow current = (IPIDENTDataSet.IPIDENTRow)enumerator.Current;
                        this.rowIPIDENT = current;
                        if (Helpers.IsRowChanged(this.rowIPIDENT))
                        {
                            this.ReadRowIpident();
                            if (this.rowIPIDENT.RowState == DataRowState.Added)
                            {
                                this.InsertIpident();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateIpident();
                            }
                        }
                    }
                }
                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);
        }
Ejemplo n.º 11
0
 private void CreateNewRowIpident()
 {
     this.rowIPIDENT = this.IPIDENTSet.IPIDENT.NewIPIDENTRow();
 }