private void CheckDeleteErrorsAktivnost() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT TOP 1 [IDKONTO] FROM [KONTO] WITH (NOLOCK) WHERE [IDAKTIVNOST] = @IDAKTIVNOST ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDAKTIVNOST", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowAKTIVNOST["IDAKTIVNOST"])); IDataReader reader = command.FetchData(); if (command.HasMoreRows) { reader.Close(); throw new KONTOInvalidDeleteException(string.Format(this.resourceManager.GetString("del"), new object[] { "Kontni plan" })); } reader.Close(); }
private void CheckDeleteErrorsIzvordokumenta() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT TOP 1 [IDKORISNIK], [IDZIRO] FROM [KORISNIKLevel1] WITH (NOLOCK) WHERE [SIFRAIZVORA] = @SIFRAIZVORA ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@SIFRAIZVORA", DbType.String, 3)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowIZVORDOKUMENTA["SIFRAIZVORA"])); IDataReader reader = command.FetchData(); if (command.HasMoreRows) { reader.Close(); throw new KORISNIKLevel1InvalidDeleteException(string.Format(this.resourceManager.GetString("del"), new object[] { "Level1" })); } reader.Close(); }
private void CheckDeleteErrorsPostanskibrojevi() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT TOP 1 [IDUCENIK] FROM [UCENIK] WITH (NOLOCK) WHERE [POSTANSKIBROJ] = @POSTANSKIBROJ ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@POSTANSKIBROJ", DbType.String, 5)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowPOSTANSKIBROJEVI["POSTANSKIBROJ"])); IDataReader reader = command.FetchData(); if (command.HasMoreRows) { reader.Close(); throw new UCENIKInvalidDeleteException(string.Format(this.resourceManager.GetString("del"), new object[] { "UCENIK" })); } reader.Close(); }
private void CheckDeleteErrorsRadnovrijeme() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT TOP 1 [IDRADNIK] FROM [RADNIK] WITH (NOLOCK) WHERE [IDRADNOVRIJEME] = @IDRADNOVRIJEME ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDRADNOVRIJEME", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowRADNOVRIJEME["IDRADNOVRIJEME"])); IDataReader reader = command.FetchData(); if (command.HasMoreRows) { reader.Close(); throw new RADNIKInvalidDeleteException(string.Format(this.resourceManager.GetString("del"), new object[] { "RADNIK" })); } reader.Close(); }
public IDataReader OpenByURAGODIDGODINEURADOKIDDOKUMENTURABROJ(short uRAGODIDGODINE, int uRADOKIDDOKUMENT, int uRABROJ) { this.init_reader(); this.m_Closed = false; this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.cmURASelect10 = this.connDefault.GetCommand("SELECT TM1.[URABROJ], TM1.[OSNOVICA25], TM1.[OSNOVICA25NE], TM1.[OSNOVICA23], TM1.[OSNOVICA23NE], TM1.[OSNOVICA22], TM1.[OSNOVICA22NE], TM1.[OSNOVICA10], TM1.[OSNOVICA10NE], TM1.[OSNOVICA0], TM1.[PDV25DA], TM1.[PDV25sNE], TM1.[PDV23DA], TM1.[PDV23NE], TM1.[PDV22DA], TM1.[PDV22NE], TM1.[PDV10DA], TM1.[PDV10NE], TM1.[R2], TM1.[URABROJRACUNADOBAVLJACA], TM1.[URADATUM], TM1.[URAVALUTA], TM1.[URANAPOMENA], TM1.[URAMODEL], TM1.[URAPOZIVNABROJ], TM1.[URAUKUPNO], TM1.[IDTIPURA], TM1.[URAGODIDGODINE] AS URAGODIDGODINE, TM1.[URADOKIDDOKUMENT] AS URADOKIDDOKUMENT, TM1.[urapartnerIDPARTNER] AS urapartnerIDPARTNER FROM [URA] TM1 WITH (NOLOCK) WHERE TM1.[URAGODIDGODINE] = @URAGODIDGODINE and TM1.[URADOKIDDOKUMENT] = @URADOKIDDOKUMENT and TM1.[URABROJ] = @URABROJ ORDER BY TM1.[URAGODIDGODINE], TM1.[URADOKIDDOKUMENT], TM1.[URABROJ] ", false); if (this.cmURASelect10.IDbCommand.Parameters.Count == 0) { this.cmURASelect10.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@URAGODIDGODINE", DbType.Int16)); this.cmURASelect10.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@URADOKIDDOKUMENT", DbType.Int32)); this.cmURASelect10.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@URABROJ", DbType.Int32)); } this.cmURASelect10.SetParameter(0, uRAGODIDGODINE); this.cmURASelect10.SetParameter(1, uRADOKIDDOKUMENT); this.cmURASelect10.SetParameter(2, uRABROJ); this.URASelect10 = this.cmURASelect10.ExecuteReader((CommandBehavior)Conversions.ToInteger(Interaction.IIf(this.daCurrentTransaction == null, Configuration.ReaderCommandBehavior, CommandBehavior.Default))); return(this.URASelect10); }
private void CheckDeleteErrorsRad1gelementi() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT TOP 1 [RAD1GELEMENTIID], [IDELEMENT] FROM [RAD1GELEMENTIVEZA] WITH (NOLOCK) WHERE [RAD1GELEMENTIID] = @RAD1GELEMENTIID ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@RAD1GELEMENTIID", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowRAD1GELEMENTI["RAD1GELEMENTIID"])); IDataReader reader = command.FetchData(); if (command.HasMoreRows) { reader.Close(); throw new RAD1GELEMENTIVEZAInvalidDeleteException(string.Format(this.resourceManager.GetString("del"), new object[] { "RAD1GELEMENTIVEZA" })); } reader.Close(); }
private void CheckDeleteErrorsTipdokumenta() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT TOP 1 [IDDOKUMENT] FROM [DOKUMENT] WITH (NOLOCK) WHERE [IDTIPDOKUMENTA] = @IDTIPDOKUMENTA ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDTIPDOKUMENTA", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowTIPDOKUMENTA["IDTIPDOKUMENTA"])); IDataReader reader = command.FetchData(); if (command.HasMoreRows) { reader.Close(); throw new DOKUMENTInvalidDeleteException(string.Format(this.resourceManager.GetString("del"), new object[] { "DOKUMENT" })); } reader.Close(); }
public void executePrivate(int startRow, int maxRows) { this.m_WhereString = "" + this.filterString + " "; if (maxRows >= 0) { if (startRow == 0) { this.scmdbuf = "SELECT TOP " + maxRows.ToString() + " TM1.[DDOBRACUNIDOBRACUN], TM1.[DDOPISOBRACUN], TM1.[DDDATUMOBRACUNA], TM1.[DDZAKLJUCAN], TM1.[DDRSM] FROM [VW_DD_PREGLED_OBRACUNA] TM1" + this.m_WhereString + "" + this.orderString + ""; } else { string[] strArray = new string[] { " SELECT * FROM ( SELECT TM1.[DDOBRACUNIDOBRACUN], TM1.[DDOPISOBRACUN], TM1.[DDDATUMOBRACUNA], TM1.[DDZAKLJUCAN], TM1.[DDRSM], ROW_NUMBER() OVER ( ", this.orderString, " ) AS DK_PAGENUM FROM [VW_DD_PREGLED_OBRACUNA] TM1 ", this.m_WhereString, " ) AS DK_PAGE WHERE DK_PAGENUM BETWEEN ", (startRow + 1).ToString(), " AND ", (startRow + maxRows).ToString() }; this.scmdbuf = string.Concat(strArray); } } else { this.scmdbuf = "SELECT TM1.[DDOBRACUNIDOBRACUN], TM1.[DDOPISOBRACUN], TM1.[DDDATUMOBRACUNA], TM1.[DDZAKLJUCAN], TM1.[DDRSM] FROM [VW_DD_PREGLED_OBRACUNA] TM1" + this.m_WhereString + "" + this.orderString + " "; } this.cmV_DD_PREGLED_OBRACUNASelect2 = this.connDefault.GetCommand(this.scmdbuf, true); this.cmV_DD_PREGLED_OBRACUNASelect2.ErrorMask |= ErrorMask.Lock; this.V_DD_PREGLED_OBRACUNASelect2 = this.cmV_DD_PREGLED_OBRACUNASelect2.FetchData(); int num = 0; while (this.cmV_DD_PREGLED_OBRACUNASelect2.HasMoreRows && (num != maxRows)) { this.m_DDOBRACUNIDOBRACUN = this.dsDefault.Db.GetString(this.V_DD_PREGLED_OBRACUNASelect2, 0, ref this.m__DDOBRACUNIDOBRACUNIsNull); this.m_DDOPISOBRACUN = this.dsDefault.Db.GetString(this.V_DD_PREGLED_OBRACUNASelect2, 1, ref this.m__DDOPISOBRACUNIsNull); this.m_DDDATUMOBRACUNA = this.dsDefault.Db.GetDateTime(this.V_DD_PREGLED_OBRACUNASelect2, 2, ref this.m__DDDATUMOBRACUNAIsNull); this.m_DDZAKLJUCAN = this.dsDefault.Db.GetBoolean(this.V_DD_PREGLED_OBRACUNASelect2, 3, ref this.m__DDZAKLJUCANIsNull); this.m_DDRSM = this.dsDefault.Db.GetString(this.V_DD_PREGLED_OBRACUNASelect2, 4, ref this.m__DDRSMIsNull); this.rowV_DD_PREGLED_OBRACUNA = this.V_DD_PREGLED_OBRACUNASet.V_DD_PREGLED_OBRACUNA.NewV_DD_PREGLED_OBRACUNARow(); this.rowV_DD_PREGLED_OBRACUNA["DDOBRACUNIDOBRACUN"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__DDOBRACUNIDOBRACUNIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_DDOBRACUNIDOBRACUN)); this.rowV_DD_PREGLED_OBRACUNA["DDOPISOBRACUN"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__DDOPISOBRACUNIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_DDOPISOBRACUN)); this.rowV_DD_PREGLED_OBRACUNA["DDDATUMOBRACUNA"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__DDDATUMOBRACUNAIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_DDDATUMOBRACUNA)); this.rowV_DD_PREGLED_OBRACUNA["DDZAKLJUCAN"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__DDZAKLJUCANIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_DDZAKLJUCAN)); this.rowV_DD_PREGLED_OBRACUNA["DDRSM"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__DDRSMIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_DDRSM)); this.AddRowV_dd_pregled_obracuna(); num++; this.cmV_DD_PREGLED_OBRACUNASelect2.HasMoreRows = this.V_DD_PREGLED_OBRACUNASelect2.Read(); } this.V_DD_PREGLED_OBRACUNASelect2.Close(); this.Cleanup(); }
private void CheckIntegrityErrorsOtisli() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT [IDRADNIK] FROM [RADNIK] WITH (NOLOCK) WHERE [IDRADNIK] = @IDRADNIK ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDRADNIK", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowOTISLI["IDRADNIK"])); IDataReader reader = command.FetchData(); if (!command.HasMoreRows) { reader.Close(); throw new RADNIKForeignKeyNotFoundException(string.Format(CultureInfo.InvariantCulture, this.resourceManager.GetString("inex"), new object[] { this.resourceManagerTables.GetString("RADNIK") })); } reader.Close(); throw new ForeignKeyNotFoundException(this.resourceManager.GetString("refinterror")); }
private int GetInternalRecordCount() { this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.cmS_OS_POSTOJECI_DOKUMENTISelect1 = this.connDefault.GetCommand("S_OS_POSTOJECI_DOKUMENTI", true); this.cmS_OS_POSTOJECI_DOKUMENTISelect1.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_OS_POSTOJECI_DOKUMENTISelect1.IDbCommand.Parameters.Clear(); this.cmS_OS_POSTOJECI_DOKUMENTISelect1.ErrorMask |= ErrorMask.Lock; this.S_OS_POSTOJECI_DOKUMENTISelect1 = this.cmS_OS_POSTOJECI_DOKUMENTISelect1.FetchData(); if (this.S_OS_POSTOJECI_DOKUMENTISelect1.IsDBNull(0)) { this.m_RecordCount = 0; } else { this.m_RecordCount = this.S_OS_POSTOJECI_DOKUMENTISelect1.GetInt32(0); } this.S_OS_POSTOJECI_DOKUMENTISelect1.Close(); return(this.m_RecordCount); }
public void executePrivate(int startRow, int maxRows) { this.m_WhereString = " WHERE " + this.filterString + " TM1.[AKTIVAN] = 1"; if (maxRows >= 0) { if (startRow == 0) { this.scmdbuf = "SELECT TOP " + maxRows.ToString() + " TM1.[IDRADNIK], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN] FROM [RADNIK] TM1" + this.m_WhereString + "" + this.orderString + ""; } else { string[] strArray = new string[] { " SELECT * FROM ( SELECT TM1.[IDRADNIK], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN], ROW_NUMBER() OVER ( ", this.orderString, " ) AS DK_PAGENUM FROM [RADNIK] TM1 ", this.m_WhereString, " ) AS DK_PAGE WHERE DK_PAGENUM BETWEEN ", (startRow + 1).ToString(), " AND ", (startRow + maxRows).ToString() }; this.scmdbuf = string.Concat(strArray); } } else { this.scmdbuf = "SELECT TM1.[IDRADNIK], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN] FROM [RADNIK] TM1" + this.m_WhereString + "" + this.orderString + " "; } this.cmRADNIKSelect2 = this.connDefault.GetCommand(this.scmdbuf, false); this.cmRADNIKSelect2.ErrorMask |= ErrorMask.Lock; this.RADNIKSelect2 = this.cmRADNIKSelect2.FetchData(); int num = 0; while (this.cmRADNIKSelect2.HasMoreRows && (num != maxRows)) { this.m_IDRADNIK = this.dsDefault.Db.GetInt32(this.RADNIKSelect2, 0, ref this.m__IDRADNIKIsNull); this.m_PREZIME = this.dsDefault.Db.GetString(this.RADNIKSelect2, 1, ref this.m__PREZIMEIsNull); this.m_IME = this.dsDefault.Db.GetString(this.RADNIKSelect2, 2, ref this.m__IMEIsNull); this.m_AKTIVAN = this.dsDefault.Db.GetBoolean(this.RADNIKSelect2, 3, ref this.m__AKTIVANIsNull); this.m_SPOJENOPREZIME = this.m_PREZIME + " " + this.m_IME; this.rowRADNIK = this.RadnikPripremaSet.RADNIK.NewRADNIKRow(); this.rowRADNIK["IDRADNIK"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__IDRADNIKIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_IDRADNIK)); this.rowRADNIK.SPOJENOPREZIME = this.m_SPOJENOPREZIME; this.rowRADNIK["PREZIME"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__PREZIMEIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_PREZIME)); this.rowRADNIK["IME"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__IMEIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_IME)); this.AddRowRadnik(); num++; this.cmRADNIKSelect2.HasMoreRows = this.RADNIKSelect2.Read(); } this.RADNIKSelect2.Close(); this.Cleanup(); }
public void executePrivate(int startRow, int maxRows) { this.cmS_OD_BOLOVANJE_FONDSelect2 = this.connDefault.GetCommand("S_PLACA_BOLOVANJE_FOND", true); this.cmS_OD_BOLOVANJE_FONDSelect2.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_OD_BOLOVANJE_FONDSelect2.IDbCommand.Parameters.Clear(); this.cmS_OD_BOLOVANJE_FONDSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@ODD", this.AV8ODD)); this.cmS_OD_BOLOVANJE_FONDSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@DOOO", this.AV9DOOO)); this.cmS_OD_BOLOVANJE_FONDSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@idradnik", this.AV10idradn)); this.cmS_OD_BOLOVANJE_FONDSelect2.ErrorMask |= ErrorMask.Lock; this.S_OD_BOLOVANJE_FONDSelect2 = this.cmS_OD_BOLOVANJE_FONDSelect2.FetchData(); while (this.cmS_OD_BOLOVANJE_FONDSelect2.HasMoreRows && (startRow > 0)) { startRow--; this.cmS_OD_BOLOVANJE_FONDSelect2.HasMoreRows = this.S_OD_BOLOVANJE_FONDSelect2.Read(); } int num = 0; while (this.cmS_OD_BOLOVANJE_FONDSelect2.HasMoreRows && (num != maxRows)) { this.rowS_OD_BOLOVANJE_FOND["IDRADNIK"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["IDRADNIK"]); this.rowS_OD_BOLOVANJE_FOND["PREZIME"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["PREZIME"]); this.rowS_OD_BOLOVANJE_FOND["IME"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["IME"]); this.rowS_OD_BOLOVANJE_FOND["JMBG"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["JMBG"]); this.rowS_OD_BOLOVANJE_FOND["MJESECOBRACUNA"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["MJESECOBRACUNA"]); this.rowS_OD_BOLOVANJE_FOND["GODINAOBRACUNA"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["GODINAOBRACUNA"]); this.rowS_OD_BOLOVANJE_FOND["KOLONA4"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["KOLONA4"]); this.rowS_OD_BOLOVANJE_FOND["KOLONA5"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["KOLONA5"]); this.rowS_OD_BOLOVANJE_FOND["KOLONA6"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["KOLONA6"]); this.rowS_OD_BOLOVANJE_FOND["KOLONA8"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["KOLONA8"]); this.rowS_OD_BOLOVANJE_FOND["SATIUKUPNO"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["SATIUKUPNO"]); this.rowS_OD_BOLOVANJE_FOND["ukupnobruto"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["UKUPNOBRUTO"]); this.rowS_OD_BOLOVANJE_FOND["netoplaca"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["NETOPLACA"]); this.rowS_OD_BOLOVANJE_FOND["FONDMJESECA"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["FONDMJESECA"]); this.rowS_OD_BOLOVANJE_FOND["OIB"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["OIB"]); this.rowS_OD_BOLOVANJE_FOND["BROJZDRAVSTVENOG"] = RuntimeHelpers.GetObjectValue(this.S_OD_BOLOVANJE_FONDSelect2["BROJZDRAVSTVENOG"]); this.AddRowS_od_bolovanje_fond(); num++; this.rowS_OD_BOLOVANJE_FOND = this.S_OD_BOLOVANJE_FONDSet.S_OD_BOLOVANJE_FOND.NewS_OD_BOLOVANJE_FONDRow(); this.cmS_OD_BOLOVANJE_FONDSelect2.HasMoreRows = this.S_OD_BOLOVANJE_FONDSelect2.Read(); } this.S_OD_BOLOVANJE_FONDSelect2.Close(); this.Cleanup(); }
private void CheckExtendedTableDokument() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT [NAZIVTIPDOKUMENTA] FROM [TIPDOKUMENTA] WITH (NOLOCK) WHERE [IDTIPDOKUMENTA] = @IDTIPDOKUMENTA ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDTIPDOKUMENTA", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowDOKUMENT["IDTIPDOKUMENTA"])); IDataReader reader = command.FetchData(); if (!command.HasMoreRows) { reader.Close(); throw new TIPDOKUMENTAForeignKeyNotFoundException(string.Format(CultureInfo.InvariantCulture, this.resourceManager.GetString("inex"), new object[] { this.resourceManagerTables.GetString("TIPDOKUMENTA") })); } this.rowDOKUMENT["NAZIVTIPDOKUMENTA"] = RuntimeHelpers.GetObjectValue(this.dsDefault.Db.GetString(reader, 0)); reader.Close(); }
private int GetInternalRecordCount() { this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.cmGODINA_I_MJESEC_OBRACUNASelect1 = this.connDefault.GetCommand("S_PLACA_GOD_MJE_OBR", true); this.cmGODINA_I_MJESEC_OBRACUNASelect1.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmGODINA_I_MJESEC_OBRACUNASelect1.IDbCommand.Parameters.Clear(); this.cmGODINA_I_MJESEC_OBRACUNASelect1.ErrorMask |= ErrorMask.Lock; this.GODINA_I_MJESEC_OBRACUNASelect1 = this.cmGODINA_I_MJESEC_OBRACUNASelect1.FetchData(); if (this.GODINA_I_MJESEC_OBRACUNASelect1.IsDBNull(0)) { this.m_RecordCount = 0; } else { this.m_RecordCount = this.GODINA_I_MJESEC_OBRACUNASelect1.GetInt32(0); } this.GODINA_I_MJESEC_OBRACUNASelect1.Close(); return(this.m_RecordCount); }
public void executePrivate(int startRow, int maxRows) { this.m_WhereString = "" + this.filterString + " "; if (maxRows >= 0) { if (startRow == 0) { this.scmdbuf = "SELECT TOP " + maxRows.ToString() + " [MJESECOBRACUNA], [GODINAOBRACUNA] FROM [VW_MJESECI_GODINE_OBRACUNA]" + this.m_WhereString + "" + this.orderString + ""; } else { string[] strArray = new string[] { "SELECT TOP ", (startRow + maxRows).ToString(), " [MJESECOBRACUNA], [GODINAOBRACUNA] FROM [VW_MJESECI_GODINE_OBRACUNA]", this.m_WhereString, "", this.orderString, "" }; this.scmdbuf = string.Concat(strArray); } } else { this.scmdbuf = "SELECT [MJESECOBRACUNA], [GODINAOBRACUNA] FROM [VW_MJESECI_GODINE_OBRACUNA]" + this.m_WhereString + "" + this.orderString + " "; } this.cmVW_MJESECI_GODINE_OBRACUNASelect2 = this.connDefault.GetCommand(this.scmdbuf, true); this.cmVW_MJESECI_GODINE_OBRACUNASelect2.ErrorMask |= ErrorMask.Lock; this.VW_MJESECI_GODINE_OBRACUNASelect2 = this.cmVW_MJESECI_GODINE_OBRACUNASelect2.FetchData(); while (this.cmVW_MJESECI_GODINE_OBRACUNASelect2.HasMoreRows && (startRow > 0)) { startRow--; this.cmVW_MJESECI_GODINE_OBRACUNASelect2.HasMoreRows = this.VW_MJESECI_GODINE_OBRACUNASelect2.Read(); } int num = 0; while (this.cmVW_MJESECI_GODINE_OBRACUNASelect2.HasMoreRows && (num != maxRows)) { this.m_MJESECOBRACUNA = this.dsDefault.Db.GetString(this.VW_MJESECI_GODINE_OBRACUNASelect2, 0, ref this.m__MJESECOBRACUNAIsNull); this.m_GODINAOBRACUNA = this.dsDefault.Db.GetString(this.VW_MJESECI_GODINE_OBRACUNASelect2, 1, ref this.m__GODINAOBRACUNAIsNull); this.rowVW_MJESECI_GODINE_OBRACUNA = this.VW_MJESECI_GODINE_OBRACUNASet.VW_MJESECI_GODINE_OBRACUNA.NewVW_MJESECI_GODINE_OBRACUNARow(); this.rowVW_MJESECI_GODINE_OBRACUNA["MJESECOBRACUNA"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__MJESECOBRACUNAIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_MJESECOBRACUNA)); this.rowVW_MJESECI_GODINE_OBRACUNA["GODINAOBRACUNA"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__GODINAOBRACUNAIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_GODINAOBRACUNA)); this.AddRowVw_mjeseci_godine_obracuna(); num++; this.cmVW_MJESECI_GODINE_OBRACUNASelect2.HasMoreRows = this.VW_MJESECI_GODINE_OBRACUNASelect2.Read(); } this.VW_MJESECI_GODINE_OBRACUNASelect2.Close(); this.Cleanup(); }
private void InsertUcenikrsmident() { this.CheckOptimisticConcurrencyUcenikrsmident(); this.AfterConfirmUcenikrsmident(); ReadWriteCommand command = this.connDefault.GetCommand("INSERT INTO [UCENIKRSMIDENT] ([UCENIKRSMIDENT]) VALUES (@UCENIKRSMIDENT)", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@UCENIKRSMIDENT", DbType.String, 4)); } command.ErrorMask |= ErrorMask.DuplicateKeyError; command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowUCENIKRSMIDENT["UCENIKRSMIDENT"])); command.ExecuteStmt(); if (command.DupKey) { throw new UCENIKRSMIDENTDuplicateKeyException(this.resourceManager.GetString("noupdate")); } this.OnUCENIKRSMIDENTUpdated(new UCENIKRSMIDENTEventArgs(this.rowUCENIKRSMIDENT, StatementType.Insert)); }
private void UpdateDdizdatak() { this.CheckOptimisticConcurrencyDdizdatak(); this.AfterConfirmDdizdatak(); ReadWriteCommand command = this.connDefault.GetCommand("UPDATE [DDIZDATAK] SET [DDNAZIVIZDATKA]=@DDNAZIVIZDATKA, [DDPOSTOTAKIZDATKA]=@DDPOSTOTAKIZDATKA WHERE [DDIDIZDATAK] = @DDIDIZDATAK", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@DDNAZIVIZDATKA", DbType.String, 50)); command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@DDPOSTOTAKIZDATKA", DbType.Currency)); command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@DDIDIZDATAK", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowDDIZDATAK["DDNAZIVIZDATKA"])); command.SetParameter(1, RuntimeHelpers.GetObjectValue(this.rowDDIZDATAK["DDPOSTOTAKIZDATKA"])); command.SetParameter(2, RuntimeHelpers.GetObjectValue(this.rowDDIZDATAK["DDIDIZDATAK"])); command.ExecuteStmt(); new ddizdatakupdateredundancy(ref this.dsDefault).execute(this.rowDDIZDATAK.DDIDIZDATAK); this.OnDDIZDATAKUpdated(new DDIZDATAKEventArgs(this.rowDDIZDATAK, StatementType.Update)); }
private void CheckExtendedTableBolovanjefond() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT [NAZIVELEMENT] AS ELEMENTBOLOVANJENAZIVELEMENT FROM [ELEMENT] WITH (NOLOCK) WHERE [IDELEMENT] = @ELEMENTBOLOVANJEIDELEMENT ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@ELEMENTBOLOVANJEIDELEMENT", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowBOLOVANJEFOND["ELEMENTBOLOVANJEIDELEMENT"])); IDataReader reader = command.FetchData(); if (!command.HasMoreRows) { reader.Close(); throw new ELEMENTForeignKeyNotFoundException(string.Format(CultureInfo.InvariantCulture, this.resourceManager.GetString("inex"), new object[] { this.resourceManagerTables.GetString("ELEMENT") })); } this.rowBOLOVANJEFOND["ELEMENTBOLOVANJENAZIVELEMENT"] = RuntimeHelpers.GetObjectValue(this.dsDefault.Db.GetString(reader, 0)); reader.Close(); }
private void OnDeleteControlsGoobracun() { ReadWriteCommand command = this.connDefault.GetCommand("SELECT [PREZIME], [IME], [AKTIVAN] FROM [RADNIK] WITH (NOLOCK) WHERE [IDRADNIK] = @IDRADNIK ", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDRADNIK", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowGOOBRACUN["IDRADNIK"])); IDataReader reader = command.FetchData(); if (command.HasMoreRows) { this.rowGOOBRACUN["PREZIME"] = RuntimeHelpers.GetObjectValue(this.dsDefault.Db.GetString(reader, 0)); this.rowGOOBRACUN["IME"] = RuntimeHelpers.GetObjectValue(this.dsDefault.Db.GetString(reader, 1)); this.rowGOOBRACUN["AKTIVAN"] = RuntimeHelpers.GetObjectValue(this.dsDefault.Db.GetBoolean(reader, 2)); } reader.Close(); }
private void UpdateGrupeolaksica() { this.CheckOptimisticConcurrencyGrupeolaksica(); this.AfterConfirmGrupeolaksica(); ReadWriteCommand command = this.connDefault.GetCommand("UPDATE [GRUPEOLAKSICA] SET [NAZIVGRUPEOLAKSICA]=@NAZIVGRUPEOLAKSICA, [MAXIMALNIIZNOSGRUPE]=@MAXIMALNIIZNOSGRUPE WHERE [IDGRUPEOLAKSICA] = @IDGRUPEOLAKSICA", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@NAZIVGRUPEOLAKSICA", DbType.String, 100)); command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@MAXIMALNIIZNOSGRUPE", DbType.Currency)); command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDGRUPEOLAKSICA", DbType.Int32)); } command.SetParameter(0, RuntimeHelpers.GetObjectValue(this.rowGRUPEOLAKSICA["NAZIVGRUPEOLAKSICA"])); command.SetParameter(1, RuntimeHelpers.GetObjectValue(this.rowGRUPEOLAKSICA["MAXIMALNIIZNOSGRUPE"])); command.SetParameter(2, RuntimeHelpers.GetObjectValue(this.rowGRUPEOLAKSICA["IDGRUPEOLAKSICA"])); command.ExecuteStmt(); new grupeolaksicaupdateredundancy(ref this.dsDefault).execute(this.rowGRUPEOLAKSICA.IDGRUPEOLAKSICA); this.OnGRUPEOLAKSICAUpdated(new GRUPEOLAKSICAEventArgs(this.rowGRUPEOLAKSICA, StatementType.Update)); }
private void UpdateOsobniodbitak() { this.CheckOptimisticConcurrencyOsobniodbitak(); this.CheckExtendedTableOsobniodbitak(); this.AfterConfirmOsobniodbitak(); ReadWriteCommand command = this.connDefault.GetCommand("UPDATE [OSOBNIODBITAK] SET [NAZIVOSOBNIODBITAK]=@NAZIVOSOBNIODBITAK, [FAKTOROSOBNOGODBITKA]=@FAKTOROSOBNOGODBITKA WHERE [IDOSOBNIODBITAK] = @IDOSOBNIODBITAK", false); if (command.IDbCommand.Parameters.Count == 0) { command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@NAZIVOSOBNIODBITAK", DbType.String, 100)); command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@FAKTOROSOBNOGODBITKA", DbType.Currency)); command.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDOSOBNIODBITAK", DbType.Int32)); } command.SetParameterString(0, RuntimeHelpers.GetObjectValue(this.rowOSOBNIODBITAK["NAZIVOSOBNIODBITAK"])); command.SetParameter(1, RuntimeHelpers.GetObjectValue(this.rowOSOBNIODBITAK["FAKTOROSOBNOGODBITKA"])); command.SetParameter(2, RuntimeHelpers.GetObjectValue(this.rowOSOBNIODBITAK["IDOSOBNIODBITAK"])); command.ExecuteStmt(); this.OnOSOBNIODBITAKUpdated(new OSOBNIODBITAKEventArgs(this.rowOSOBNIODBITAK, StatementType.Update)); }
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(); }
public void executePrivate(int startRow, int maxRows) { this.cmS_OD_REKAP_OLAKSICESelect2 = this.connDefault.GetCommand("S_PLACA_OLAKSICE", true); this.cmS_OD_REKAP_OLAKSICESelect2.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_OD_REKAP_OLAKSICESelect2.IDbCommand.Parameters.Clear(); this.cmS_OD_REKAP_OLAKSICESelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDOBRACUN", this.AV8IDOBRAC)); this.cmS_OD_REKAP_OLAKSICESelect2.ErrorMask |= ErrorMask.Lock; this.S_OD_REKAP_OLAKSICESelect2 = this.cmS_OD_REKAP_OLAKSICESelect2.FetchData(); while (this.cmS_OD_REKAP_OLAKSICESelect2.HasMoreRows && (startRow > 0)) { startRow--; this.cmS_OD_REKAP_OLAKSICESelect2.HasMoreRows = this.S_OD_REKAP_OLAKSICESelect2.Read(); } int num = 0; while (this.cmS_OD_REKAP_OLAKSICESelect2.HasMoreRows && (num != maxRows)) { this.rowS_OD_REKAP_OLAKSICE["MOOLAKSICA"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["MOOLAKSICA"]); this.rowS_OD_REKAP_OLAKSICE["POOLAKSICA"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["POOLAKSICA"]); this.rowS_OD_REKAP_OLAKSICE["IDRADNIK"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["IDRADNIK"]); this.rowS_OD_REKAP_OLAKSICE["PREZIME"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["PREZIME"]); this.rowS_OD_REKAP_OLAKSICE["IME"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["IME"]); this.rowS_OD_REKAP_OLAKSICE["JMBG"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["JMBG"]); this.rowS_OD_REKAP_OLAKSICE["IDOLAKSICE"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["IDOLAKSICE"]); this.rowS_OD_REKAP_OLAKSICE["OBRACUNATAOLAKSICA"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["OBRACUNATAOLAKSICA"]); this.rowS_OD_REKAP_OLAKSICE["NAZIVOLAKSICE"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["NAZIVOLAKSICE"]); this.rowS_OD_REKAP_OLAKSICE["NAZIVGRUPEOLAKSICA"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["NAZIVGRUPEOLAKSICA"]); this.rowS_OD_REKAP_OLAKSICE["IZNOSOLAKSICE"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["IZNOSOLAKSICE"]); this.rowS_OD_REKAP_OLAKSICE["IDTIPOLAKSICE"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["IDTIPOLAKSICE"]); this.rowS_OD_REKAP_OLAKSICE["NAZIVTIPOLAKSICE"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["NAZIVTIPOLAKSICE"]); this.rowS_OD_REKAP_OLAKSICE["PRIMATELJOLAKSICA1"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["PRIMATELJOLAKSICA1"]); this.rowS_OD_REKAP_OLAKSICE["PRIMATELJOLAKSICA2"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["PRIMATELJOLAKSICA2"]); this.rowS_OD_REKAP_OLAKSICE["IZNOSPOREZNOPRIZNATEOLAKSICE"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["IZNOSPOREZNOPRIZNATEOLAKSICE"]); this.rowS_OD_REKAP_OLAKSICE["ZADPOJEDINACNIPOZIV"] = RuntimeHelpers.GetObjectValue(this.S_OD_REKAP_OLAKSICESelect2["ZADPOJEDINACNIPOZIV"]); this.AddRowS_od_rekap_olaksice(); num++; this.rowS_OD_REKAP_OLAKSICE = this.S_OD_REKAP_OLAKSICESet.S_OD_REKAP_OLAKSICE.NewS_OD_REKAP_OLAKSICERow(); this.cmS_OD_REKAP_OLAKSICESelect2.HasMoreRows = this.S_OD_REKAP_OLAKSICESelect2.Read(); } this.S_OD_REKAP_OLAKSICESelect2.Close(); this.Cleanup(); }
public void executePrivate(int startRow, int maxRows) { this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2 = this.connDefault.GetCommand("S_DD_LISTA_IZNOSA_RADNIKA", true); this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.IDbCommand.Parameters.Clear(); this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDOBRACUN", this.AV8IDOBRAC)); this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@SORT", this.AV9SORT)); this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.ErrorMask |= ErrorMask.Lock; this.S_DD_LISTA_IZNOSA_RADNIKASelect2 = this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.FetchData(); while (this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.HasMoreRows && (startRow > 0)) { startRow--; this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.HasMoreRows = this.S_DD_LISTA_IZNOSA_RADNIKASelect2.Read(); } int num = 0; while (this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.HasMoreRows && (num != maxRows)) { this.rowS_DD_LISTA_IZNOSA_RADNIKA["DDIDRADNIK"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["DDIDRADNIK"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["DDPREZIME"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["DDPREZIME"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["DDIME"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["DDIME"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["ukupnobruto"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["UKUPNOBRUTO"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["ukupnodoprinosi"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["UKUPNODOPRINOSI"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["UKUPNOPOREZ"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["UKUPNOPOREZ"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["UKUPNOPRIREZ"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["UKUPNOPRIREZ"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["ukupnoporeziprirez"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["UKUPNOPOREZIPRIREZ"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["netoplaca"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["NETOPLACA"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["UKUPNODOPRINOSINA"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["UKUPNODOPRINOSINA"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["POREZKRIZNI"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["POREZKRIZNI"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["netoplacamanjekrizni"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["NETOPLACAMANJEKRIZNI"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["NAZIVKATEGORIJA"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["NAZIVKATEGORIJA"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["PDVDRUGIDOHODAK"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["PDVDRUGIDOHODAK"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["ZAISPLATU"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["ZAISPLATU"]); this.rowS_DD_LISTA_IZNOSA_RADNIKA["UKUPNOIZDACI"] = RuntimeHelpers.GetObjectValue(this.S_DD_LISTA_IZNOSA_RADNIKASelect2["UKUPNOIZDACI"]); this.AddRowS_dd_lista_iznosa_radnika(); num++; this.rowS_DD_LISTA_IZNOSA_RADNIKA = this.S_DD_LISTA_IZNOSA_RADNIKASet.S_DD_LISTA_IZNOSA_RADNIKA.NewS_DD_LISTA_IZNOSA_RADNIKARow(); this.cmS_DD_LISTA_IZNOSA_RADNIKASelect2.HasMoreRows = this.S_DD_LISTA_IZNOSA_RADNIKASelect2.Read(); } this.S_DD_LISTA_IZNOSA_RADNIKASelect2.Close(); this.Cleanup(); }
private int GetInternalRecordCount(string gODINAOBRACUNA) { this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.cmS_PLACA_RAD1G_SATISelect1 = this.connDefault.GetCommand("S_PLACA_RAD1G_SATI", true); this.cmS_PLACA_RAD1G_SATISelect1.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_PLACA_RAD1G_SATISelect1.IDbCommand.Parameters.Clear(); this.cmS_PLACA_RAD1G_SATISelect1.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@GODINAOBRACUNA", gODINAOBRACUNA)); this.cmS_PLACA_RAD1G_SATISelect1.ErrorMask |= ErrorMask.Lock; this.S_PLACA_RAD1G_SATISelect1 = this.cmS_PLACA_RAD1G_SATISelect1.FetchData(); if (this.S_PLACA_RAD1G_SATISelect1.IsDBNull(0)) { this.m_RecordCount = 0; } else { this.m_RecordCount = this.S_PLACA_RAD1G_SATISelect1.GetInt32(0); } this.S_PLACA_RAD1G_SATISelect1.Close(); return(this.m_RecordCount); }
private int GetInternalRecordCount(int brojdok) { this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.cmS_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1 = this.connDefault.GetCommand("S_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJA", true); this.cmS_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1.IDbCommand.Parameters.Clear(); this.cmS_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@brojdok", brojdok)); this.cmS_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1.ErrorMask |= ErrorMask.Lock; this.S_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1 = this.cmS_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1.FetchData(); if (this.S_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1.IsDBNull(0)) { this.m_RecordCount = 0; } else { this.m_RecordCount = this.S_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1.GetInt32(0); } this.S_OS_PREGLED_AMORTIZACIJE_REKAPITULACIJASelect1.Close(); return(this.m_RecordCount); }
private int GetInternalRecordCount() { this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); string str = ""; this.scmdbuf = "SELECT COUNT(*) FROM [VW_PLACA_GODINE_ISPLATE]" + str + " "; this.cmVW_GODINE_ISPLATESelect1 = this.connDefault.GetCommand(this.scmdbuf, true); this.cmVW_GODINE_ISPLATESelect1.ErrorMask |= ErrorMask.Lock; this.VW_GODINE_ISPLATESelect1 = this.cmVW_GODINE_ISPLATESelect1.FetchData(); if (this.VW_GODINE_ISPLATESelect1.IsDBNull(0)) { this.m_RecordCount = 0; } else { this.m_RecordCount = this.VW_GODINE_ISPLATESelect1.GetInt32(0); } this.VW_GODINE_ISPLATESelect1.Close(); return(this.m_RecordCount); }
private int GetInternalRecordCount(string iDOBRACUN) { this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.cmS_OD_REKAP_POSTOTNESelect1 = this.connDefault.GetCommand("S_PLACA_OBUSTAVE_POSTOTNE", true); this.cmS_OD_REKAP_POSTOTNESelect1.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_OD_REKAP_POSTOTNESelect1.IDbCommand.Parameters.Clear(); this.cmS_OD_REKAP_POSTOTNESelect1.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDOBRACUN", iDOBRACUN)); this.cmS_OD_REKAP_POSTOTNESelect1.ErrorMask |= ErrorMask.Lock; this.S_OD_REKAP_POSTOTNESelect1 = this.cmS_OD_REKAP_POSTOTNESelect1.FetchData(); if (this.S_OD_REKAP_POSTOTNESelect1.IsDBNull(0)) { this.m_RecordCount = 0; } else { this.m_RecordCount = this.S_OD_REKAP_POSTOTNESelect1.GetInt32(0); } this.S_OD_REKAP_POSTOTNESelect1.Close(); return(this.m_RecordCount); }
private int GetInternalRecordCount(int iDDOKUMENT) { this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.cmSP_FIN_URAPLACANJESelect1 = this.connDefault.GetCommand("S_FIN_URA_PLACANJE", true); this.cmSP_FIN_URAPLACANJESelect1.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmSP_FIN_URAPLACANJESelect1.IDbCommand.Parameters.Clear(); this.cmSP_FIN_URAPLACANJESelect1.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@IDDOKUMENT", iDDOKUMENT)); this.cmSP_FIN_URAPLACANJESelect1.ErrorMask |= ErrorMask.Lock; this.SP_FIN_URAPLACANJESelect1 = this.cmSP_FIN_URAPLACANJESelect1.FetchData(); if (this.SP_FIN_URAPLACANJESelect1.IsDBNull(0)) { this.m_RecordCount = 0; } else { this.m_RecordCount = this.SP_FIN_URAPLACANJESelect1.GetInt32(0); } this.SP_FIN_URAPLACANJESelect1.Close(); return(this.m_RecordCount); }
private int GetInternalRecordCount(long invbroj) { this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.cmS_OS_STANJE_LOKACIJASelect1 = this.connDefault.GetCommand("S_OS_STANJE_LOKACIJA", true); this.cmS_OS_STANJE_LOKACIJASelect1.IDbCommand.CommandType = CommandType.StoredProcedure; this.cmS_OS_STANJE_LOKACIJASelect1.IDbCommand.Parameters.Clear(); this.cmS_OS_STANJE_LOKACIJASelect1.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@invbroj", invbroj)); this.cmS_OS_STANJE_LOKACIJASelect1.ErrorMask |= ErrorMask.Lock; this.S_OS_STANJE_LOKACIJASelect1 = this.cmS_OS_STANJE_LOKACIJASelect1.FetchData(); if (this.S_OS_STANJE_LOKACIJASelect1.IsDBNull(0)) { this.m_RecordCount = 0; } else { this.m_RecordCount = this.S_OS_STANJE_LOKACIJASelect1.GetInt32(0); } this.S_OS_STANJE_LOKACIJASelect1.Close(); return(this.m_RecordCount); }