public virtual int FillPage(S_FIN_DNEVNIKDataSet dataSet, int oRG, int mT, int dOK, int bROJDOK, DateTime rAZDOBLJEOD, DateTime rAZDOBLJEDO, string pOCETNIKONTO, string zAVRSNIKONTO, bool sTATUS, int startRow, int maxRows) { this.Initialize(); this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.S_FIN_DNEVNIKSet = dataSet; this.rowS_FIN_DNEVNIK = this.S_FIN_DNEVNIKSet.S_FIN_DNEVNIK.NewS_FIN_DNEVNIKRow(); this.SetFillParameters(oRG, mT, dOK, bROJDOK, rAZDOBLJEOD, rAZDOBLJEDO, pOCETNIKONTO, zAVRSNIKONTO, sTATUS); this.AV8ORG = oRG; this.AV9MT = mT; this.AV10DOK = dOK; this.AV11BROJDO = bROJDOK; this.AV12RAZDOB = DateTimeUtil.ResetTime(rAZDOBLJEOD); this.AV13RAZDOB = DateTimeUtil.ResetTime(rAZDOBLJEDO); this.AV14POCETN = pOCETNIKONTO; this.AV15ZAVRSN = zAVRSNIKONTO; this.AV16STATUS = sTATUS; try { this.executePrivate(startRow, maxRows); } finally { this.Cleanup(); } return(0); }
public void executePrivate(int startRow, int maxRows) { this.cmS_FIN_DNEVNIKSelect2 = this.connDefault.GetCommand("S_FIN_DNEVNIK", true); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Clear(); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@ORG", this.AV8ORG)); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@MT", this.AV9MT)); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@DOK", this.AV10DOK)); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@BROJDOK", this.AV11BROJDO)); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@RAZDOBLJEOD", this.AV12RAZDOB)); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@RAZDOBLJEDO", this.AV13RAZDOB)); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@POCETNIKONTO", this.AV14POCETN)); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@ZAVRSNIKONTO", this.AV15ZAVRSN)); this.cmS_FIN_DNEVNIKSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@STATUS", this.AV16STATUS)); this.cmS_FIN_DNEVNIKSelect2.ErrorMask |= ErrorMask.Lock; this.S_FIN_DNEVNIKSelect2 = this.cmS_FIN_DNEVNIKSelect2.FetchData(); while (this.cmS_FIN_DNEVNIKSelect2.HasMoreRows && (startRow > 0)) { startRow--; this.cmS_FIN_DNEVNIKSelect2.HasMoreRows = this.S_FIN_DNEVNIKSelect2.Read(); } int num = 0; while (this.cmS_FIN_DNEVNIKSelect2.HasMoreRows && (num != maxRows)) { this.rowS_FIN_DNEVNIK["duguje"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["DUGUJE"]); this.rowS_FIN_DNEVNIK["POTRAZUJE"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["POTRAZUJE"]); this.rowS_FIN_DNEVNIK["konto"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["KONTO"]); this.rowS_FIN_DNEVNIK["DATUMDOK"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["DATUMDOK"]); this.rowS_FIN_DNEVNIK["SKRACENI"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["SKRACENI"]); this.rowS_FIN_DNEVNIK["BROJDOK"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["BROJDOK"]); this.rowS_FIN_DNEVNIK["BROJSTAVKE"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["BROJSTAVKE"]); this.rowS_FIN_DNEVNIK["OPISKNJIZENJA"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["OPISKNJIZENJA"]); this.rowS_FIN_DNEVNIK["NAZIVKONTO"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["NAZIVKONTO"]); this.rowS_FIN_DNEVNIK["IDDOKUMENT"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["IDDOKUMENT"]); this.rowS_FIN_DNEVNIK["IDORGJED"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["IDORGJED"]); this.rowS_FIN_DNEVNIK["IDMJESTOTROSKA"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["IDMJESTOTROSKA"]); this.rowS_FIN_DNEVNIK["IDPARTNER"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["IDPARTNER"]); this.rowS_FIN_DNEVNIK["NAZIVPARTNER"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["NAZIVPARTNER"]); this.rowS_FIN_DNEVNIK["ORIGINALNIDOKUMENT"] = RuntimeHelpers.GetObjectValue(this.S_FIN_DNEVNIKSelect2["ORIGINALNIDOKUMENT"]); this.AddRowS_fin_dnevnik(); num++; this.rowS_FIN_DNEVNIK = this.S_FIN_DNEVNIKSet.S_FIN_DNEVNIK.NewS_FIN_DNEVNIKRow(); this.cmS_FIN_DNEVNIKSelect2.HasMoreRows = this.S_FIN_DNEVNIKSelect2.Read(); } this.S_FIN_DNEVNIKSelect2.Close(); this.Cleanup(); }