示例#1
0
        private void LoadDataOpcina(int maxRows)
        {
            int num = 0;

            if (this.RcdFound16 != 0)
            {
                this.ScanLoadOpcina();
                while ((this.RcdFound16 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowOpcina();
                    this.CreateNewRowOpcina();
                    this.ScanNextOpcina();
                }
            }
            if (num > 0)
            {
                this.RcdFound16 = 1;
            }
            this.ScanEndOpcina();
            if (this.OPCINASet.OPCINA.Count > 0)
            {
                this.rowOPCINA = this.OPCINASet.OPCINA[this.OPCINASet.OPCINA.Count - 1];
            }
        }
示例#2
0
 public OPCINADataSet.OPCINARow AddOPCINARow(string iDOPCINE, string nAZIVOPCINE, decimal pRIREZ, string vBDIOPCINA, string zRNOPCINA)
 {
     OPCINADataSet.OPCINARow row = (OPCINADataSet.OPCINARow) this.NewRow();
     row["IDOPCINE"]    = iDOPCINE;
     row["NAZIVOPCINE"] = nAZIVOPCINE;
     row["PRIREZ"]      = pRIREZ;
     row["VBDIOPCINA"]  = vBDIOPCINA;
     row["ZRNOPCINA"]   = zRNOPCINA;
     this.Rows.Add(row);
     return(row);
 }
示例#3
0
        private void LoadByIDOPCINE(int startRow, int maxRows)
        {
            bool enforceConstraints = this.OPCINASet.EnforceConstraints;

            this.OPCINASet.OPCINA.BeginLoadData();
            this.ScanByIDOPCINE(startRow, maxRows);
            this.OPCINASet.OPCINA.EndLoadData();
            this.OPCINASet.EnforceConstraints = enforceConstraints;
            if (this.OPCINASet.OPCINA.Count > 0)
            {
                this.rowOPCINA = this.OPCINASet.OPCINA[this.OPCINASet.OPCINA.Count - 1];
            }
        }
示例#4
0
 public virtual bool FillByIDOPCINE(OPCINADataSet dataSet, string iDOPCINE)
 {
     this.InitializeMembers();
     this.connDefault        = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.OPCINASet          = dataSet;
     this.rowOPCINA          = this.OPCINASet.OPCINA.NewOPCINARow();
     this.rowOPCINA.IDOPCINE = iDOPCINE;
     try
     {
         this.LoadByIDOPCINE(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound16 == 0)
     {
         return(false);
     }
     return(true);
 }
示例#5
0
 private void ReadRowOpcina()
 {
     this.Gx_mode = Mode.FromRowState(this.rowOPCINA.RowState);
     if (this.rowOPCINA.RowState != DataRowState.Added)
     {
         this.m__NAZIVOPCINEOriginal = RuntimeHelpers.GetObjectValue(this.rowOPCINA["NAZIVOPCINE", DataRowVersion.Original]);
         this.m__PRIREZOriginal      = RuntimeHelpers.GetObjectValue(this.rowOPCINA["PRIREZ", DataRowVersion.Original]);
         this.m__VBDIOPCINAOriginal  = RuntimeHelpers.GetObjectValue(this.rowOPCINA["VBDIOPCINA", DataRowVersion.Original]);
         this.m__ZRNOPCINAOriginal   = RuntimeHelpers.GetObjectValue(this.rowOPCINA["ZRNOPCINA", DataRowVersion.Original]);
     }
     else
     {
         this.m__NAZIVOPCINEOriginal = RuntimeHelpers.GetObjectValue(this.rowOPCINA["NAZIVOPCINE"]);
         this.m__PRIREZOriginal      = RuntimeHelpers.GetObjectValue(this.rowOPCINA["PRIREZ"]);
         this.m__VBDIOPCINAOriginal  = RuntimeHelpers.GetObjectValue(this.rowOPCINA["VBDIOPCINA"]);
         this.m__ZRNOPCINAOriginal   = RuntimeHelpers.GetObjectValue(this.rowOPCINA["ZRNOPCINA"]);
     }
     this._Gxremove = this.rowOPCINA.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowOPCINA = (OPCINADataSet.OPCINARow)DataSetUtil.CloneOriginalDataRow(this.rowOPCINA);
     }
 }
示例#6
0
 public OPCINAEventArgs(OPCINADataSet.OPCINARow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
示例#7
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.OPCINASet   = (OPCINADataSet)dataSet;
            this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.OPCINASet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.OPCINASet.OPCINA.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        OPCINADataSet.OPCINARow current = (OPCINADataSet.OPCINARow)enumerator.Current;
                        this.rowOPCINA = current;
                        if (Helpers.IsRowChanged(this.rowOPCINA))
                        {
                            this.ReadRowOpcina();
                            if (this.rowOPCINA.RowState == DataRowState.Added)
                            {
                                this.InsertOpcina();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateOpcina();
                            }
                        }
                    }
                }
                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);
        }
示例#8
0
 private void CreateNewRowOpcina()
 {
     this.rowOPCINA = this.OPCINASet.OPCINA.NewOPCINARow();
 }
示例#9
0
 public OPCINARowChangeEvent(OPCINADataSet.OPCINARow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
示例#10
0
 public void RemoveOPCINARow(OPCINADataSet.OPCINARow row)
 {
     this.Rows.Remove(row);
 }
示例#11
0
 public void AddOPCINARow(OPCINADataSet.OPCINARow row)
 {
     this.Rows.Add(row);
 }