Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Boolean consulta_bloq_notif(string ID_CLI, string ROL, int accion)
- {
- SqlConnection connection = new SqlConnection(con.DB_ConnectionString);
- SqlDataAdapter adapter = new SqlDataAdapter();
- SqlCommand command;
- DataSet ds = new DataSet();
- try
- {
- command = new SqlCommand("SP_CONSULTA_BLOQ_NOTIF");
- command.CommandType = CommandType.StoredProcedure;
- command.Parameters.Add("@ID_CLI", SqlDbType.Int).Value = ID_CLI;
- command.Parameters.Add("@ROL", SqlDbType.VarChar, 3).Value = ROL;
- command.Parameters.Add("@ACCION", SqlDbType.Int).Value = accion;
- command.Connection = connection;
- command.CommandTimeout = 0;
- command.Connection.Open();
- adapter = new SqlDataAdapter(command);
- adapter.Fill(ds);
- if (ds.Tables[0].Rows.Count > 0)
- {
- return true;
- }
- }
- catch (SqlException e)
- {
- clss_log.eLog("-----------------------------------------------------------------------------");
- clss_log.eLog("Error: " + DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss"));
- clss_log.eLog("Al intentar ejecutar SP SP_CONSULTA_BLOQ_NOTIF con el parámetro id_cli: " + ID_CLI + ",rol : " + ROL + ", acción: " + accion);
- clss_log.eLog("Error: " + e.Errors);
- clss_log.eLog("-----------------------------------------------------------------------------");
- }
- finally
- {
- connection.Close();
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement