Esempio n. 1
0
        private void LoadDataZaposleni(int maxRows)
        {
            int num = 0;

            if (this.RcdFound293 != 0)
            {
                this.ScanLoadZaposleni();
                while ((this.RcdFound293 != 0) && (num != maxRows))
                {
                    num++;
                    this.LoadRowZaposleni();
                    this.CreateNewRowZaposleni();
                    this.ScanNextZaposleni();
                }
            }
            if (num > 0)
            {
                this.RcdFound293 = 1;
            }
            this.ScanEndZaposleni();
            if (this.ZAPOSLENISet.ZAPOSLENI.Count > 0)
            {
                this.rowZAPOSLENI = this.ZAPOSLENISet.ZAPOSLENI[this.ZAPOSLENISet.ZAPOSLENI.Count - 1];
            }
        }
Esempio n. 2
0
 public ZAPOSLENIDataSet.ZAPOSLENIRow AddZAPOSLENIRow(int iDRADNIK, DateTime dATUMZAPOSLENJA)
 {
     ZAPOSLENIDataSet.ZAPOSLENIRow row = (ZAPOSLENIDataSet.ZAPOSLENIRow) this.NewRow();
     row["IDRADNIK"]        = iDRADNIK;
     row["DATUMZAPOSLENJA"] = dATUMZAPOSLENJA;
     this.Rows.Add(row);
     return(row);
 }
Esempio n. 3
0
        private void LoadByIDRADNIKDATUMZAPOSLENJA(int startRow, int maxRows)
        {
            bool enforceConstraints = this.ZAPOSLENISet.EnforceConstraints;

            this.ZAPOSLENISet.ZAPOSLENI.BeginLoadData();
            this.ScanByIDRADNIKDATUMZAPOSLENJA(startRow, maxRows);
            this.ZAPOSLENISet.ZAPOSLENI.EndLoadData();
            this.ZAPOSLENISet.EnforceConstraints = enforceConstraints;
            if (this.ZAPOSLENISet.ZAPOSLENI.Count > 0)
            {
                this.rowZAPOSLENI = this.ZAPOSLENISet.ZAPOSLENI[this.ZAPOSLENISet.ZAPOSLENI.Count - 1];
            }
        }
Esempio n. 4
0
 private void ReadRowZaposleni()
 {
     this.Gx_mode = Mode.FromRowState(this.rowZAPOSLENI.RowState);
     if (this.rowZAPOSLENI.RowState != DataRowState.Deleted)
     {
         this.rowZAPOSLENI["DATUMZAPOSLENJA"] = RuntimeHelpers.GetObjectValue(DateTimeUtil.ResetTimeObject(RuntimeHelpers.GetObjectValue(this.rowZAPOSLENI["DATUMZAPOSLENJA"])));
     }
     if (this.rowZAPOSLENI.RowState == DataRowState.Added)
     {
     }
     this._Gxremove = this.rowZAPOSLENI.RowState == DataRowState.Deleted;
     if (this._Gxremove)
     {
         this.rowZAPOSLENI = (ZAPOSLENIDataSet.ZAPOSLENIRow)DataSetUtil.CloneOriginalDataRow(this.rowZAPOSLENI);
     }
 }
Esempio n. 5
0
 public virtual int FillPageByIDRADNIK(ZAPOSLENIDataSet dataSet, int iDRADNIK, int startRow, int maxRows)
 {
     this.InitializeMembers();
     this.connDefault           = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.ZAPOSLENISet          = dataSet;
     this.rowZAPOSLENI          = this.ZAPOSLENISet.ZAPOSLENI.NewZAPOSLENIRow();
     this.rowZAPOSLENI.IDRADNIK = iDRADNIK;
     try
     {
         this.LoadByIDRADNIK(startRow, maxRows);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     return(0);
 }
Esempio n. 6
0
 public virtual bool FillByIDRADNIKDATUMZAPOSLENJA(ZAPOSLENIDataSet dataSet, int iDRADNIK, DateTime dATUMZAPOSLENJA)
 {
     this.InitializeMembers();
     this.connDefault                  = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.ZAPOSLENISet                 = dataSet;
     this.rowZAPOSLENI                 = this.ZAPOSLENISet.ZAPOSLENI.NewZAPOSLENIRow();
     this.rowZAPOSLENI.IDRADNIK        = iDRADNIK;
     this.rowZAPOSLENI.DATUMZAPOSLENJA = DateTimeUtil.ResetTime(dATUMZAPOSLENJA);
     try
     {
         this.LoadByIDRADNIKDATUMZAPOSLENJA(0, -1);
         dataSet.AcceptChanges();
     }
     finally
     {
         this.Cleanup();
     }
     if (this.RcdFound293 == 0)
     {
         return(false);
     }
     return(true);
 }
Esempio n. 7
0
 public ZAPOSLENIRowChangeEvent(ZAPOSLENIDataSet.ZAPOSLENIRow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Esempio n. 8
0
 public void RemoveZAPOSLENIRow(ZAPOSLENIDataSet.ZAPOSLENIRow row)
 {
     this.Rows.Remove(row);
 }
Esempio n. 9
0
 public void AddZAPOSLENIRow(ZAPOSLENIDataSet.ZAPOSLENIRow row)
 {
     this.Rows.Add(row);
 }
Esempio n. 10
0
 public ZAPOSLENIEventArgs(ZAPOSLENIDataSet.ZAPOSLENIRow row, System.Data.StatementType statementType)
 {
     this.m_dataRow       = row;
     this.m_statementType = statementType;
 }
Esempio n. 11
0
        public virtual int Update(DataSet dataSet)
        {
            this.InitializeMembers();
            this.ZAPOSLENISet = (ZAPOSLENIDataSet)dataSet;
            this.connDefault  = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
            if (this.ZAPOSLENISet == null)
            {
                throw new ArgumentException(this.resourceManager.GetString("nulldset"));
            }
            try
            {
                IEnumerator enumerator = null;
                this.connDefault.BeginTransaction();
                try
                {
                    enumerator = this.ZAPOSLENISet.ZAPOSLENI.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        ZAPOSLENIDataSet.ZAPOSLENIRow current = (ZAPOSLENIDataSet.ZAPOSLENIRow)enumerator.Current;
                        this.rowZAPOSLENI = current;
                        if (Helpers.IsRowChanged(this.rowZAPOSLENI))
                        {
                            this.ReadRowZaposleni();
                            if (this.rowZAPOSLENI.RowState == DataRowState.Added)
                            {
                                this.InsertZaposleni();
                            }
                            else
                            {
                                if (this._Gxremove)
                                {
                                    this.Delete();
                                    continue;
                                }
                                this.UpdateZaposleni();
                            }
                        }
                    }
                }
                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);
        }
Esempio n. 12
0
 private void CreateNewRowZaposleni()
 {
     this.rowZAPOSLENI = this.ZAPOSLENISet.ZAPOSLENI.NewZAPOSLENIRow();
 }