Exemple #1
0
        private void LoadDataOsrazmjestaj(int maxRows)
        {
            int num = 0;

            if (this.RcdFound279 != 0)
            {
                this.ScanLoadOsrazmjestaj();
                while ((this.RcdFound279 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowOsrazmjestaj();
                    this.CreateNewRowOsrazmjestaj();
                    this.ScanNextOsrazmjestaj();
                }
            }
            if (num > 0)
            {
                this.RcdFound279 = 1;
            }
            this.ScanEndOsrazmjestaj();
            if (this.OSRAZMJESTAJSet.OSRAZMJESTAJ.Count > 0)
            {
                this.rowOSRAZMJESTAJ = this.OSRAZMJESTAJSet.OSRAZMJESTAJ[this.OSRAZMJESTAJSet.OSRAZMJESTAJ.Count - 1];
            }
        }
Exemple #2
0
 public OSRAZMJESTAJDataSet.OSRAZMJESTAJRow AddOSRAZMJESTAJRow(int iDLOKACIJE, long iNVBROJ, decimal kOLICINAULAZA, decimal kOLICINARASHODA)
 {
     OSRAZMJESTAJDataSet.OSRAZMJESTAJRow row = (OSRAZMJESTAJDataSet.OSRAZMJESTAJRow) this.NewRow();
     row["IDLOKACIJE"]      = iDLOKACIJE;
     row["INVBROJ"]         = iNVBROJ;
     row["KOLICINAULAZA"]   = kOLICINAULAZA;
     row["KOLICINARASHODA"] = kOLICINARASHODA;
     this.Rows.Add(row);
     return(row);
 }
Exemple #3
0
        private void LoadByINVBROJ(int startRow, int maxRows)
        {
            bool enforceConstraints = this.OSRAZMJESTAJSet.EnforceConstraints;

            this.OSRAZMJESTAJSet.OSRAZMJESTAJ.BeginLoadData();
            this.ScanByINVBROJ(startRow, maxRows);
            this.OSRAZMJESTAJSet.OSRAZMJESTAJ.EndLoadData();
            this.OSRAZMJESTAJSet.EnforceConstraints = enforceConstraints;
            if (this.OSRAZMJESTAJSet.OSRAZMJESTAJ.Count > 0)
            {
                this.rowOSRAZMJESTAJ = this.OSRAZMJESTAJSet.OSRAZMJESTAJ[this.OSRAZMJESTAJSet.OSRAZMJESTAJ.Count - 1];
            }
        }
Exemple #4
0
 public virtual int FillPageByINVBROJ(OSRAZMJESTAJDataSet dataSet, long iNVBROJ, int startRow, int maxRows)
 {
     this.InitializeMembers();
     this.connDefault             = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.OSRAZMJESTAJSet         = dataSet;
     this.rowOSRAZMJESTAJ         = this.OSRAZMJESTAJSet.OSRAZMJESTAJ.NewOSRAZMJESTAJRow();
     this.rowOSRAZMJESTAJ.INVBROJ = iNVBROJ;
     try
     {
         this.LoadByINVBROJ(startRow, maxRows);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     return(0);
 }
Exemple #5
0
 public virtual int FillByIDLOKACIJE(OSRAZMJESTAJDataSet dataSet, int iDLOKACIJE)
 {
     this.InitializeMembers();
     this.connDefault                = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.OSRAZMJESTAJSet            = dataSet;
     this.rowOSRAZMJESTAJ            = this.OSRAZMJESTAJSet.OSRAZMJESTAJ.NewOSRAZMJESTAJRow();
     this.rowOSRAZMJESTAJ.IDLOKACIJE = iDLOKACIJE;
     try
     {
         this.LoadByIDLOKACIJE(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     return(0);
 }
Exemple #6
0
 public virtual bool FillByIDOSRAZMJESTAJ(OSRAZMJESTAJDataSet dataSet, Guid iDOSRAZMJESTAJ)
 {
     this.InitializeMembers();
     this.connDefault     = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.OSRAZMJESTAJSet = dataSet;
     this.rowOSRAZMJESTAJ = this.OSRAZMJESTAJSet.OSRAZMJESTAJ.NewOSRAZMJESTAJRow();
     this.rowOSRAZMJESTAJ.IDOSRAZMJESTAJ = iDOSRAZMJESTAJ;
     try
     {
         this.LoadByIDOSRAZMJESTAJ(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound279 == 0)
     {
         return(false);
     }
     return(true);
 }
Exemple #7
0
 private void ReadRowOsrazmjestaj()
 {
     this.Gx_mode = Mode.FromRowState(this.rowOSRAZMJESTAJ.RowState);
     if (this.rowOSRAZMJESTAJ.RowState != DataRowState.Added)
     {
         this.m__KOLICINAULAZAOriginal   = RuntimeHelpers.GetObjectValue(this.rowOSRAZMJESTAJ["KOLICINAULAZA", DataRowVersion.Original]);
         this.m__KOLICINARASHODAOriginal = RuntimeHelpers.GetObjectValue(this.rowOSRAZMJESTAJ["KOLICINARASHODA", DataRowVersion.Original]);
         this.m__IDLOKACIJEOriginal      = RuntimeHelpers.GetObjectValue(this.rowOSRAZMJESTAJ["IDLOKACIJE", DataRowVersion.Original]);
         this.m__INVBROJOriginal         = RuntimeHelpers.GetObjectValue(this.rowOSRAZMJESTAJ["INVBROJ", DataRowVersion.Original]);
     }
     else
     {
         this.m__KOLICINAULAZAOriginal   = RuntimeHelpers.GetObjectValue(this.rowOSRAZMJESTAJ["KOLICINAULAZA"]);
         this.m__KOLICINARASHODAOriginal = RuntimeHelpers.GetObjectValue(this.rowOSRAZMJESTAJ["KOLICINARASHODA"]);
         this.m__IDLOKACIJEOriginal      = RuntimeHelpers.GetObjectValue(this.rowOSRAZMJESTAJ["IDLOKACIJE"]);
         this.m__INVBROJOriginal         = RuntimeHelpers.GetObjectValue(this.rowOSRAZMJESTAJ["INVBROJ"]);
     }
     this._Gxremove = this.rowOSRAZMJESTAJ.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowOSRAZMJESTAJ = (OSRAZMJESTAJDataSet.OSRAZMJESTAJRow)DataSetUtil.CloneOriginalDataRow(this.rowOSRAZMJESTAJ);
     }
 }
Exemple #8
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.OSRAZMJESTAJSet = (OSRAZMJESTAJDataSet)dataSet;
            this.connDefault     = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.OSRAZMJESTAJSet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.OSRAZMJESTAJSet.OSRAZMJESTAJ.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        OSRAZMJESTAJDataSet.OSRAZMJESTAJRow current = (OSRAZMJESTAJDataSet.OSRAZMJESTAJRow)enumerator.Current;
                        this.rowOSRAZMJESTAJ = current;
                        if (Helpers.IsRowChanged(this.rowOSRAZMJESTAJ))
                        {
                            this.ReadRowOsrazmjestaj();
                            if (this.rowOSRAZMJESTAJ.RowState == DataRowState.Added)
                            {
                                this.InsertOsrazmjestaj();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateOsrazmjestaj();
                            }
                        }
                    }
                }
                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);
        }
Exemple #9
0
 private void CreateNewRowOsrazmjestaj()
 {
     this.rowOSRAZMJESTAJ = this.OSRAZMJESTAJSet.OSRAZMJESTAJ.NewOSRAZMJESTAJRow();
 }
Exemple #10
0
 public OSRAZMJESTAJEventArgs(OSRAZMJESTAJDataSet.OSRAZMJESTAJRow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Exemple #11
0
 public OSRAZMJESTAJRowChangeEvent(OSRAZMJESTAJDataSet.OSRAZMJESTAJRow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Exemple #12
0
 public void RemoveOSRAZMJESTAJRow(OSRAZMJESTAJDataSet.OSRAZMJESTAJRow row)
 {
     this.Rows.Remove(row);
 }
Exemple #13
0
 public void AddOSRAZMJESTAJRow(OSRAZMJESTAJDataSet.OSRAZMJESTAJRow row)
 {
     this.Rows.Add(row);
 }