Пример #1
0
        private void LoadDataOtisli(int maxRows)
        {
            int num = 0;

            if (this.RcdFound294 != 0)
            {
                this.ScanLoadOtisli();
                while ((this.RcdFound294 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowOtisli();
                    this.CreateNewRowOtisli();
                    this.ScanNextOtisli();
                }
            }
            if (num > 0)
            {
                this.RcdFound294 = 1;
            }
            this.ScanEndOtisli();
            if (this.OTISLISet.OTISLI.Count > 0)
            {
                this.rowOTISLI = this.OTISLISet.OTISLI[this.OTISLISet.OTISLI.Count - 1];
            }
        }
Пример #2
0
 public OTISLIDataSet.OTISLIRow AddOTISLIRow(int iDRADNIK, DateTime dATUMODLASKA)
 {
     OTISLIDataSet.OTISLIRow row = (OTISLIDataSet.OTISLIRow) this.NewRow();
     row["IDRADNIK"]     = iDRADNIK;
     row["DATUMODLASKA"] = dATUMODLASKA;
     this.Rows.Add(row);
     return(row);
 }
Пример #3
0
        private void LoadByIDRADNIKDATUMODLASKA(int startRow, int maxRows)
        {
            bool enforceConstraints = this.OTISLISet.EnforceConstraints;

            this.OTISLISet.OTISLI.BeginLoadData();
            this.ScanByIDRADNIKDATUMODLASKA(startRow, maxRows);
            this.OTISLISet.OTISLI.EndLoadData();
            this.OTISLISet.EnforceConstraints = enforceConstraints;
            if (this.OTISLISet.OTISLI.Count > 0)
            {
                this.rowOTISLI = this.OTISLISet.OTISLI[this.OTISLISet.OTISLI.Count - 1];
            }
        }
Пример #4
0
 private void ReadRowOtisli()
 {
     this.Gx_mode = Mode.FromRowState(this.rowOTISLI.RowState);
     if (this.rowOTISLI.RowState != DataRowState.Deleted)
     {
         this.rowOTISLI["DATUMODLASKA"] = RuntimeHelpers.GetObjectValue(DateTimeUtil.ResetTimeObject(RuntimeHelpers.GetObjectValue(this.rowOTISLI["DATUMODLASKA"])));
     }
     if (this.rowOTISLI.RowState == DataRowState.Added)
     {
     }
     this._Gxremove = this.rowOTISLI.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowOTISLI = (OTISLIDataSet.OTISLIRow)DataSetUtil.CloneOriginalDataRow(this.rowOTISLI);
     }
 }
Пример #5
0
 public virtual int FillPageByIDRADNIK(OTISLIDataSet dataSet, int iDRADNIK, int startRow, int maxRows)
 {
     this.InitializeMembers();
     this.connDefault        = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.OTISLISet          = dataSet;
     this.rowOTISLI          = this.OTISLISet.OTISLI.NewOTISLIRow();
     this.rowOTISLI.IDRADNIK = iDRADNIK;
     try
     {
         this.LoadByIDRADNIK(startRow, maxRows);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     return(0);
 }
Пример #6
0
 public virtual bool FillByIDRADNIKDATUMODLASKA(OTISLIDataSet dataSet, int iDRADNIK, DateTime dATUMODLASKA)
 {
     this.InitializeMembers();
     this.connDefault            = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.OTISLISet              = dataSet;
     this.rowOTISLI              = this.OTISLISet.OTISLI.NewOTISLIRow();
     this.rowOTISLI.IDRADNIK     = iDRADNIK;
     this.rowOTISLI.DATUMODLASKA = DateTimeUtil.ResetTime(dATUMODLASKA);
     try
     {
         this.LoadByIDRADNIKDATUMODLASKA(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound294 == 0)
     {
         return(false);
     }
     return(true);
 }
Пример #7
0
 public OTISLIEventArgs(OTISLIDataSet.OTISLIRow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Пример #8
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.OTISLISet   = (OTISLIDataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.OTISLISet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.OTISLISet.OTISLI.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        OTISLIDataSet.OTISLIRow current = (OTISLIDataSet.OTISLIRow)enumerator.Current;
                        this.rowOTISLI = current;
                        if (Helpers.IsRowChanged(this.rowOTISLI))
                        {
                            this.ReadRowOtisli();
                            if (this.rowOTISLI.RowState == DataRowState.Added)
                            {
                                this.InsertOtisli();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateOtisli();
                            }
                        }
                    }
                }
                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);
        }
Пример #9
0
 private void CreateNewRowOtisli()
 {
     this.rowOTISLI = this.OTISLISet.OTISLI.NewOTISLIRow();
 }
Пример #10
0
 public OTISLIRowChangeEvent(OTISLIDataSet.OTISLIRow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Пример #11
0
 public void RemoveOTISLIRow(OTISLIDataSet.OTISLIRow row)
 {
     this.Rows.Remove(row);
 }
Пример #12
0
 public void AddOTISLIRow(OTISLIDataSet.OTISLIRow row)
 {
     this.Rows.Add(row);
 }