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

            if (this.RcdFound273 != 0)
            {
                this.ScanLoadOsdokument();
                while ((this.RcdFound273 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowOsdokument();
                    this.CreateNewRowOsdokument();
                    this.ScanNextOsdokument();
                }
            }
            if (num > 0)
            {
                this.RcdFound273 = 1;
            }
            this.ScanEndOsdokument();
            if (this.OSDOKUMENTSet.OSDOKUMENT.Count > 0)
            {
                this.rowOSDOKUMENT = this.OSDOKUMENTSet.OSDOKUMENT[this.OSDOKUMENTSet.OSDOKUMENT.Count - 1];
            }
        }
Example #2
0
 public OSDOKUMENTDataSet.OSDOKUMENTRow AddOSDOKUMENTRow(int iDOSDOKUMENT, string nAZIVOSDOKUMENT)
 {
     OSDOKUMENTDataSet.OSDOKUMENTRow row = (OSDOKUMENTDataSet.OSDOKUMENTRow) this.NewRow();
     row["IDOSDOKUMENT"]    = iDOSDOKUMENT;
     row["NAZIVOSDOKUMENT"] = nAZIVOSDOKUMENT;
     this.Rows.Add(row);
     return(row);
 }
Example #3
0
        private void LoadByIDOSDOKUMENT(int startRow, int maxRows)
        {
            bool enforceConstraints = this.OSDOKUMENTSet.EnforceConstraints;

            this.OSDOKUMENTSet.OSDOKUMENT.BeginLoadData();
            this.ScanByIDOSDOKUMENT(startRow, maxRows);
            this.OSDOKUMENTSet.OSDOKUMENT.EndLoadData();
            this.OSDOKUMENTSet.EnforceConstraints = enforceConstraints;
            if (this.OSDOKUMENTSet.OSDOKUMENT.Count > 0)
            {
                this.rowOSDOKUMENT = this.OSDOKUMENTSet.OSDOKUMENT[this.OSDOKUMENTSet.OSDOKUMENT.Count - 1];
            }
        }
Example #4
0
 private void ReadRowOsdokument()
 {
     this.Gx_mode = Mode.FromRowState(this.rowOSDOKUMENT.RowState);
     if (this.rowOSDOKUMENT.RowState != DataRowState.Added)
     {
         this.m__NAZIVOSDOKUMENTOriginal = RuntimeHelpers.GetObjectValue(this.rowOSDOKUMENT["NAZIVOSDOKUMENT", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVOSDOKUMENTOriginal = RuntimeHelpers.GetObjectValue(this.rowOSDOKUMENT["NAZIVOSDOKUMENT"]);
     }
     this._Gxremove = this.rowOSDOKUMENT.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowOSDOKUMENT = (OSDOKUMENTDataSet.OSDOKUMENTRow)DataSetUtil.CloneOriginalDataRow(this.rowOSDOKUMENT);
     }
 }
Example #5
0
 public virtual bool FillByIDOSDOKUMENT(OSDOKUMENTDataSet dataSet, int iDOSDOKUMENT)
 {
     this.InitializeMembers();
     this.connDefault   = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.OSDOKUMENTSet = dataSet;
     this.rowOSDOKUMENT = this.OSDOKUMENTSet.OSDOKUMENT.NewOSDOKUMENTRow();
     this.rowOSDOKUMENT.IDOSDOKUMENT = iDOSDOKUMENT;
     try
     {
         this.LoadByIDOSDOKUMENT(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound273 == 0)
     {
         return(false);
     }
     return(true);
 }
Example #6
0
 public OSDOKUMENTRowChangeEvent(OSDOKUMENTDataSet.OSDOKUMENTRow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Example #7
0
 public void RemoveOSDOKUMENTRow(OSDOKUMENTDataSet.OSDOKUMENTRow row)
 {
     this.Rows.Remove(row);
 }
Example #8
0
 public void AddOSDOKUMENTRow(OSDOKUMENTDataSet.OSDOKUMENTRow row)
 {
     this.Rows.Add(row);
 }
Example #9
0
 public OSDOKUMENTEventArgs(OSDOKUMENTDataSet.OSDOKUMENTRow 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.OSDOKUMENTSet = (OSDOKUMENTDataSet)dataSet;
            this.connDefault   = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.OSDOKUMENTSet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.OSDOKUMENTSet.OSDOKUMENT.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        OSDOKUMENTDataSet.OSDOKUMENTRow current = (OSDOKUMENTDataSet.OSDOKUMENTRow)enumerator.Current;
                        this.rowOSDOKUMENT = current;
                        if (Helpers.IsRowChanged(this.rowOSDOKUMENT))
                        {
                            this.ReadRowOsdokument();
                            if (this.rowOSDOKUMENT.RowState == DataRowState.Added)
                            {
                                this.InsertOsdokument();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateOsdokument();
                            }
                        }
                    }
                }
                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 CreateNewRowOsdokument()
 {
     this.rowOSDOKUMENT = this.OSDOKUMENTSet.OSDOKUMENT.NewOSDOKUMENTRow();
 }