public virtual int FillPage(S_OD_KONACNIDataSet dataSet, int gODINA, string iDOBRACUN, int startRow, int maxRows) { this.Initialize(); this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.S_OD_KONACNISet = dataSet; this.rowS_OD_KONACNI = this.S_OD_KONACNISet.S_OD_KONACNI.NewS_OD_KONACNIRow(); this.SetFillParameters(gODINA, iDOBRACUN); this.AV8GODINA = gODINA; this.AV9IDOBRAC = iDOBRACUN; try { this.executePrivate(startRow, maxRows); } finally { this.Cleanup(); } return(0); }
public void executePrivate(int startRow, int maxRows) { this.cmS_OD_KONACNISelect2 = this.connDefault.GetCommand("S_PLACA_KONACNI", true); this.cmS_OD_KONACNISelect2.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_OD_KONACNISelect2.IDbCommand.Parameters.Clear(); this.cmS_OD_KONACNISelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@GODINA", this.AV8GODINA)); this.cmS_OD_KONACNISelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDOBRACUN", this.AV9IDOBRAC)); this.cmS_OD_KONACNISelect2.ErrorMask |= ErrorMask.Lock; this.S_OD_KONACNISelect2 = this.cmS_OD_KONACNISelect2.FetchData(); while (this.cmS_OD_KONACNISelect2.HasMoreRows && (startRow > 0)) { startRow--; this.cmS_OD_KONACNISelect2.HasMoreRows = this.S_OD_KONACNISelect2.Read(); } int num = 0; while (this.cmS_OD_KONACNISelect2.HasMoreRows && (num != maxRows)) { this.rowS_OD_KONACNI["poreznaosnovica"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["POREZNAOSNOVICA"]); this.rowS_OD_KONACNI["POREZIPRIREZ"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["POREZIPRIREZ"]); this.rowS_OD_KONACNI["OPCINA"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["OPCINA"]); this.rowS_OD_KONACNI["OIB"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["OIB"]); this.rowS_OD_KONACNI["IP"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["IP"]); this.rowS_OD_KONACNI["BROJMJESECISAISPLATAMA"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["BROJMJESECISAISPLATAMA"]); this.rowS_OD_KONACNI["STOPAPRIREZA"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["STOPAPRIREZA"]); this.rowS_OD_KONACNI["ODBITAK"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["ODBITAK"]); this.rowS_OD_KONACNI["dohodak"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["DOHODAK"]); this.rowS_OD_KONACNI["OLAKSICE"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["OLAKSICE"]); this.rowS_OD_KONACNI["BRUTO"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["BRUTO"]); this.rowS_OD_KONACNI["DOPRINOSI"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["DOPRINOSI"]); this.rowS_OD_KONACNI["FAKTOR"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["FAKTOR"]); this.rowS_OD_KONACNI["POREZ"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["POREZ"]); this.rowS_OD_KONACNI["PRIREZ"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["PRIREZ"]); this.rowS_OD_KONACNI["KRIZNIPOREZ"] = RuntimeHelpers.GetObjectValue(this.S_OD_KONACNISelect2["KRIZNIPOREZ"]); this.AddRowS_od_konacni(); num++; this.rowS_OD_KONACNI = this.S_OD_KONACNISet.S_OD_KONACNI.NewS_OD_KONACNIRow(); this.cmS_OD_KONACNISelect2.HasMoreRows = this.S_OD_KONACNISelect2.Read(); } this.S_OD_KONACNISelect2.Close(); this.Cleanup(); }