コード例 #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);
 }