Exemplo n.º 1
0
        private void LoadDataPorez(int maxRows)
        {
            int num = 0;

            if (this.RcdFound20 != 0)
            {
                this.ScanLoadPorez();
                while ((this.RcdFound20 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowPorez();
                    this.CreateNewRowPorez();
                    this.ScanNextPorez();
                }
            }
            if (num > 0)
            {
                this.RcdFound20 = 1;
            }
            this.ScanEndPorez();
            if (this.POREZSet.POREZ.Count > 0)
            {
                this.rowPOREZ = this.POREZSet.POREZ[this.POREZSet.POREZ.Count - 1];
            }
        }
Exemplo n.º 2
0
        private void LoadByIDPOREZ(int startRow, int maxRows)
        {
            bool enforceConstraints = this.POREZSet.EnforceConstraints;

            this.POREZSet.POREZ.BeginLoadData();
            this.ScanByIDPOREZ(startRow, maxRows);
            this.POREZSet.POREZ.EndLoadData();
            this.POREZSet.EnforceConstraints = enforceConstraints;
            if (this.POREZSet.POREZ.Count > 0)
            {
                this.rowPOREZ = this.POREZSet.POREZ[this.POREZSet.POREZ.Count - 1];
            }
        }
Exemplo n.º 3
0
 public virtual bool FillByIDPOREZ(POREZDataSet dataSet, int iDPOREZ)
 {
     this.InitializeMembers();
     this.connDefault      = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.POREZSet         = dataSet;
     this.rowPOREZ         = this.POREZSet.POREZ.NewPOREZRow();
     this.rowPOREZ.IDPOREZ = iDPOREZ;
     try
     {
         this.LoadByIDPOREZ(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound20 == 0)
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 4
0
 private void ReadRowPorez()
 {
     this.Gx_mode = Mode.FromRowState(this.rowPOREZ.RowState);
     if (this.rowPOREZ.RowState != DataRowState.Added)
     {
         this.m__NAZIVPOREZOriginal              = RuntimeHelpers.GetObjectValue(this.rowPOREZ["NAZIVPOREZ", DataRowVersion.Original]);
         this.m__POREZMJESECNOOriginal           = RuntimeHelpers.GetObjectValue(this.rowPOREZ["POREZMJESECNO", DataRowVersion.Original]);
         this.m__STOPAPOREZAOriginal             = RuntimeHelpers.GetObjectValue(this.rowPOREZ["STOPAPOREZA", DataRowVersion.Original]);
         this.m__MOPOREZOriginal                 = RuntimeHelpers.GetObjectValue(this.rowPOREZ["MOPOREZ", DataRowVersion.Original]);
         this.m__POPOREZOriginal                 = RuntimeHelpers.GetObjectValue(this.rowPOREZ["POPOREZ", DataRowVersion.Original]);
         this.m__MZPOREZOriginal                 = RuntimeHelpers.GetObjectValue(this.rowPOREZ["MZPOREZ", DataRowVersion.Original]);
         this.m__PZPOREZOriginal                 = RuntimeHelpers.GetObjectValue(this.rowPOREZ["PZPOREZ", DataRowVersion.Original]);
         this.m__PRIMATELJPOREZ1Original         = RuntimeHelpers.GetObjectValue(this.rowPOREZ["PRIMATELJPOREZ1", DataRowVersion.Original]);
         this.m__PRIMATELJPOREZ2Original         = RuntimeHelpers.GetObjectValue(this.rowPOREZ["PRIMATELJPOREZ2", DataRowVersion.Original]);
         this.m__SIFRAOPISAPLACANJAPOREZOriginal = RuntimeHelpers.GetObjectValue(this.rowPOREZ["SIFRAOPISAPLACANJAPOREZ", DataRowVersion.Original]);
         this.m__OPISPLACANJAPOREZOriginal       = RuntimeHelpers.GetObjectValue(this.rowPOREZ["OPISPLACANJAPOREZ", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVPOREZOriginal              = RuntimeHelpers.GetObjectValue(this.rowPOREZ["NAZIVPOREZ"]);
         this.m__POREZMJESECNOOriginal           = RuntimeHelpers.GetObjectValue(this.rowPOREZ["POREZMJESECNO"]);
         this.m__STOPAPOREZAOriginal             = RuntimeHelpers.GetObjectValue(this.rowPOREZ["STOPAPOREZA"]);
         this.m__MOPOREZOriginal                 = RuntimeHelpers.GetObjectValue(this.rowPOREZ["MOPOREZ"]);
         this.m__POPOREZOriginal                 = RuntimeHelpers.GetObjectValue(this.rowPOREZ["POPOREZ"]);
         this.m__MZPOREZOriginal                 = RuntimeHelpers.GetObjectValue(this.rowPOREZ["MZPOREZ"]);
         this.m__PZPOREZOriginal                 = RuntimeHelpers.GetObjectValue(this.rowPOREZ["PZPOREZ"]);
         this.m__PRIMATELJPOREZ1Original         = RuntimeHelpers.GetObjectValue(this.rowPOREZ["PRIMATELJPOREZ1"]);
         this.m__PRIMATELJPOREZ2Original         = RuntimeHelpers.GetObjectValue(this.rowPOREZ["PRIMATELJPOREZ2"]);
         this.m__SIFRAOPISAPLACANJAPOREZOriginal = RuntimeHelpers.GetObjectValue(this.rowPOREZ["SIFRAOPISAPLACANJAPOREZ"]);
         this.m__OPISPLACANJAPOREZOriginal       = RuntimeHelpers.GetObjectValue(this.rowPOREZ["OPISPLACANJAPOREZ"]);
     }
     this._Gxremove = this.rowPOREZ.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowPOREZ = (POREZDataSet.POREZRow)DataSetUtil.CloneOriginalDataRow(this.rowPOREZ);
     }
 }
Exemplo n.º 5
0
 public POREZEventArgs(POREZDataSet.POREZRow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Exemplo n.º 6
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.POREZSet    = (POREZDataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.POREZSet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.POREZSet.POREZ.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        POREZDataSet.POREZRow current = (POREZDataSet.POREZRow)enumerator.Current;
                        this.rowPOREZ = current;
                        if (Helpers.IsRowChanged(this.rowPOREZ))
                        {
                            this.ReadRowPorez();
                            if (this.rowPOREZ.RowState == DataRowState.Added)
                            {
                                this.InsertPorez();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdatePorez();
                            }
                        }
                    }
                }
                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);
        }
Exemplo n.º 7
0
 private void CreateNewRowPorez()
 {
     this.rowPOREZ = this.POREZSet.POREZ.NewPOREZRow();
 }