Пример #1
0
        public Response LogUploadDocuments(InLogDocuments input)
        {
            string   connectionString = DataBaseHelper.GetConnectionString("DLG");
            var      ora         = new OracleServer(connectionString);
            Response response    = new Response();
            string   esNuloError = string.Empty;

            try
            {
                var pi_sequence = new OracleParameter("A_SECUENCIA", OracleDbType.Double, input.Sequence, ParameterDirection.Input);
                ora.AddParameter(pi_sequence);

                var pi_path = new OracleParameter("A_RUTA_DOCUMENTO_CARGADO", OracleDbType.Varchar2, input.Path, ParameterDirection.Input);
                ora.AddParameter(pi_path);

                var pi_name = new OracleParameter("A_NOMBRE_DOCUMENTO_CARGADO", OracleDbType.Varchar2, input.Name, ParameterDirection.Input);
                ora.AddParameter(pi_name);

                var pi_documentID = new OracleParameter("A_NUMERO_CEDULA", OracleDbType.Varchar2, input.DocumentID, ParameterDirection.Input);
                ora.AddParameter(pi_documentID);

                var po_ErrorCode    = new OracleParameter("fa_codigo_error", OracleDbType.Double, ParameterDirection.Output);
                var po_ErrorMessage = new OracleParameter("fa_Descripcion_Error", OracleDbType.Varchar2, ParameterDirection.Output);

                po_ErrorMessage.Size = 100;

                ora.AddParameter(po_ErrorCode);
                ora.AddParameter(po_ErrorMessage);

                ora.ExecuteProcedureNonQuery("BBS_LIQCOM_SP_LOG_CARGA_IMG");

                response.errorCode    = ora.GetParameter("fa_codigo_error").ToString();
                response.errorMessage = ora.GetParameter("fa_Descripcion_Error").ToString();

                ora.Dispose();
            }
            catch (Exception ex)
            {
                //response.errorMessage = ex.InnerException.ToString();
                //throw new Exception("ExecutiveDAO.UpdateExecutive", ex);
                LogHelper.WriteLog("Models", "ManagerPQR", "CreatePQR" + esNuloError, ex, "");
            }
            finally
            {
                ora.Dispose();
            }
            return(response);
        }
Пример #2
0
        public Response LogUploadDocuments(InLogDocuments input)
        {
            Response data = new Response();

            try
            {
                DocumentsDAO dao = new DocumentsDAO();
                data = dao.LogUploadDocuments(input);
            }
            catch (Exception ex)
            {
                //escribir en el log
                LogHelper.WriteLog("Models", "ManageDocuments", "LogUploadDocuments", ex, "");
            }
            return(data);
        }