Example #1
0
        private void LoadDataPostanskibrojevi(int maxRows)
        {
            int num = 0;

            if (this.RcdFound299 != 0)
            {
                this.ScanLoadPostanskibrojevi();
                while ((this.RcdFound299 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowPostanskibrojevi();
                    this.CreateNewRowPostanskibrojevi();
                    this.ScanNextPostanskibrojevi();
                }
            }
            if (num > 0)
            {
                this.RcdFound299 = 1;
            }
            this.ScanEndPostanskibrojevi();
            if (this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI.Count > 0)
            {
                this.rowPOSTANSKIBROJEVI = this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI[this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI.Count - 1];
            }
        }
Example #2
0
 public POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow AddPOSTANSKIBROJEVIRow(string pOSTANSKIBROJ, string nAZIVPOSTE)
 {
     POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow row = (POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow) this.NewRow();
     row["POSTANSKIBROJ"] = pOSTANSKIBROJ;
     row["NAZIVPOSTE"]    = nAZIVPOSTE;
     this.Rows.Add(row);
     return(row);
 }
Example #3
0
        private void LoadByPOSTANSKIBROJ(int startRow, int maxRows)
        {
            bool enforceConstraints = this.POSTANSKIBROJEVISet.EnforceConstraints;

            this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI.BeginLoadData();
            this.ScanByPOSTANSKIBROJ(startRow, maxRows);
            this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI.EndLoadData();
            this.POSTANSKIBROJEVISet.EnforceConstraints = enforceConstraints;
            if (this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI.Count > 0)
            {
                this.rowPOSTANSKIBROJEVI = this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI[this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI.Count - 1];
            }
        }
Example #4
0
 private void ReadRowPostanskibrojevi()
 {
     this.Gx_mode = Mode.FromRowState(this.rowPOSTANSKIBROJEVI.RowState);
     if (this.rowPOSTANSKIBROJEVI.RowState != DataRowState.Added)
     {
         this.m__NAZIVPOSTEOriginal = RuntimeHelpers.GetObjectValue(this.rowPOSTANSKIBROJEVI["NAZIVPOSTE", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVPOSTEOriginal = RuntimeHelpers.GetObjectValue(this.rowPOSTANSKIBROJEVI["NAZIVPOSTE"]);
     }
     this._Gxremove = this.rowPOSTANSKIBROJEVI.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowPOSTANSKIBROJEVI = (POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow)DataSetUtil.CloneOriginalDataRow(this.rowPOSTANSKIBROJEVI);
     }
 }
Example #5
0
 public virtual bool FillByPOSTANSKIBROJ(POSTANSKIBROJEVIDataSet dataSet, string pOSTANSKIBROJ)
 {
     this.InitializeMembers();
     this.connDefault         = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.POSTANSKIBROJEVISet = dataSet;
     this.rowPOSTANSKIBROJEVI = this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI.NewPOSTANSKIBROJEVIRow();
     this.rowPOSTANSKIBROJEVI.POSTANSKIBROJ = pOSTANSKIBROJ;
     try
     {
         this.LoadByPOSTANSKIBROJ(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound299 == 0)
     {
         return(false);
     }
     return(true);
 }
Example #6
0
 public POSTANSKIBROJEVIRowChangeEvent(POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Example #7
0
 public void RemovePOSTANSKIBROJEVIRow(POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow row)
 {
     this.Rows.Remove(row);
 }
Example #8
0
 public void AddPOSTANSKIBROJEVIRow(POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow row)
 {
     this.Rows.Add(row);
 }
Example #9
0
 public POSTANSKIBROJEVIEventArgs(POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Example #10
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.POSTANSKIBROJEVISet = (POSTANSKIBROJEVIDataSet)dataSet;
            this.connDefault         = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.POSTANSKIBROJEVISet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow current = (POSTANSKIBROJEVIDataSet.POSTANSKIBROJEVIRow)enumerator.Current;
                        this.rowPOSTANSKIBROJEVI = current;
                        if (Helpers.IsRowChanged(this.rowPOSTANSKIBROJEVI))
                        {
                            this.ReadRowPostanskibrojevi();
                            if (this.rowPOSTANSKIBROJEVI.RowState == DataRowState.Added)
                            {
                                this.InsertPostanskibrojevi();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdatePostanskibrojevi();
                            }
                        }
                    }
                }
                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);
        }
Example #11
0
 private void CreateNewRowPostanskibrojevi()
 {
     this.rowPOSTANSKIBROJEVI = this.POSTANSKIBROJEVISet.POSTANSKIBROJEVI.NewPOSTANSKIBROJEVIRow();
 }