This commit is contained in:
jnunez 2018-08-13 05:53:30 +00:00
parent d6b168e5fe
commit f482ed7692
21 changed files with 749 additions and 50 deletions

View file

@ -74,14 +74,10 @@ namespace AYA.SlnSinort.WCF
FichaTecnicaJSON ObtenerFichaTecnicaHistorico(FichaTecnicaJSON model);
[OperationContract]
FichaTecnicaJSON ObtenerFichasTecnicasAlertas(FichaTecnicaJSON model);
FichaTecnicaJSON InsertarActualizarFichaTecnicaAlerta(FichaTecnicaJSON model);
[OperationContract]
FichaTecnicaJSON GuardarFichaTecnicaAlerta(FichaTecnicaJSON model);
[OperationContract]
FichaTecnicaJSON ObtenerFichaAlerta(FichaTecnicaJSON model);
FichaTecnicaJSON ObtenerFichaTecnicaAlerta(FichaTecnicaJSON model);
#endregion
#region Adjuntos

View file

@ -18,6 +18,10 @@ namespace AYA.SlnSinort.WCF
public interface ISinortCatalogos
{
#region Wiki
[OperationContract]
List<Wiki> ObtenerWiki();
#endregion
#region Mantenimiento
[OperationContract]

View file

@ -431,52 +431,33 @@ namespace AYA.SlnSinort.WCF
return model;
}
public FichaTecnicaJSON GuardarFichaTecnicaAlerta(FichaTecnicaJSON model)
public FichaTecnicaJSON InsertarActualizarFichaTecnicaAlerta(FichaTecnicaJSON model)
{
try
{
if (model.FichaTecnicaAlerta == null)
{
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
model.DescripcionRespuesta = "No se encontraron datos de la ficha técnica";
return model;
}
model = new FichaTecnicaDAL().GuardarFichaTecnicaAlerta(model);
model = new FichaTecnicaDAL().InsertarActualizarFichaTecnicaAlerta(model);
}
catch (Exception ex)
{
log.Error(ex);
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
}
return model;
}
public FichaTecnicaJSON ObtenerFichaAlerta(FichaTecnicaJSON model)
public FichaTecnicaJSON ObtenerFichaTecnicaAlerta(FichaTecnicaJSON model)
{
try
{
if (model.FichaTecnicaAlerta == null)
{
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
model.DescripcionRespuesta = "No se encontraron datos de la ficha técnica";
return model;
}
model = new FichaTecnicaDAL().ObtenerFichaAlerta(model);
model = new FichaTecnicaDAL().ObtenerFichaTecnicaAlerta(model);
}
catch (Exception ex)
{
log.Error(ex);
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
}
return model;
}
#endregion
#region WCFAYA Envio Correo

View file

@ -19,6 +19,23 @@ namespace AYA.SlnSinort.WCF
{
Log log = new Log("SinortCatalogosWCF");
#region Mantenimiento
public List<Wiki> ObtenerWiki()
{
List<Wiki> respuesta = null;
try
{
respuesta = new MantenimientoDAL().ObtenerWiki();
}
catch (Exception ex)
{
log.Error(ex);
}
return respuesta;
}
#endregion
#region Mantenimiento
public List<Mantenimiento> ObtenerMantenimientoCatalogos()
{

View file

@ -6200,6 +6200,7 @@
<Content Include="Content\jQuery.FileUpload\css\jquery.fileupload.css" />
<Content Include="Content\jQuery.FileUpload\img\loading.gif" />
<Content Include="Content\jQuery.FileUpload\img\progressbar.gif" />
<Content Include="Content\modal-video.min.css" />
<Content Include="Content\Principal.css" />
<Content Include="Content\richtext.min.css" />
<Content Include="Content\simpleAngularUI.css" />
@ -7357,6 +7358,7 @@
<Content Include="Scripts\locale\easyui-lang-ua.js" />
<Content Include="Scripts\locale\easyui-lang-zh_CN.js" />
<Content Include="Scripts\locale\easyui-lang-zh_TW.js" />
<Content Include="Scripts\modal-video.js" />
<Content Include="Scripts\modernizr-2.6.2.js" />
<Content Include="Scripts\moment-with-locales.js" />
<Content Include="Scripts\moment-with-locales.min.js" />
@ -7430,6 +7432,7 @@
<Content Include="Sinort-Scripts\SubCategoriaGrupoTematico.js" />
<Content Include="Sinort-Scripts\TareasPendientes.js" />
<Content Include="Sinort-Scripts\Usuario.js" />
<Content Include="Sinort-Scripts\Wiki.js" />
<Content Include="SqlServerTypes\readme.htm" />
<Content Include="SqlServerTypes\x64\msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@ -7537,6 +7540,7 @@
<Content Include="Views\Reportes\Reporte.cshtml" />
<Content Include="Views\Reportes\FichaTecnica.cshtml" />
<Content Include="Views\NormativaReglamentacionTecnica\MisSolicitudesCompra.cshtml" />
<Content Include="Views\Home\Wiki.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />

View file

@ -0,0 +1 @@
@keyframes modal-video{from{opacity:0}to{opacity:1}}@keyframes modal-video-inner{from{transform:translate(0, 100px)}to{transform:translate(0, 0)}}.modal-video{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);z-index:1000000;cursor:pointer;opacity:1;animation-timing-function:ease-out;animation-duration:.3s;animation-name:modal-video;-webkit-transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-ms-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out}.modal-video-close{opacity:0}.modal-video-close .modal-video-movie-wrap{-webkit-transform:translate(0, 100px);-moz-transform:translate(0, 100px);-ms-transform:translate(0, 100px);-o-transform:translate(0, 100px);transform:translate(0, 100px)}.modal-video-body{max-width:940px;width:100%;height:100%;margin:0 auto;display:table}.modal-video-inner{display:table-cell;vertical-align:middle;width:100%;height:100%}.modal-video-movie-wrap{width:100%;height:0;position:relative;padding-bottom:56.25%;background-color:#333;animation-timing-function:ease-out;animation-duration:.3s;animation-name:modal-video-inner;-webkit-transform:translate(0, 0);-moz-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-ms-transition:-ms-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal-video-movie-wrap iframe{position:absolute;top:0;left:0;width:100%;height:100%}.modal-video-close-btn{position:absolute;z-index:2;top:-35px;right:-35px;display:inline-block;width:35px;height:35px;overflow:hidden;border:none;background:transparent}.modal-video-close-btn:before{transform:rotate(45deg)}.modal-video-close-btn:after{transform:rotate(-45deg)}.modal-video-close-btn:before,.modal-video-close-btn:after{content:'';position:absolute;height:2px;width:100%;top:50%;left:0;margin-top:-1px;background:#fff;border-radius:5px;margin-top:-6px}

View file

@ -46,6 +46,12 @@ namespace AYA.SlnSinort.Controllers
}
public ActionResult Wiki()
{
InitControllers();
return View();
}
}
}

View file

@ -0,0 +1,364 @@
/**
* Modules in this bundle
* @license
*
* modal-video:
* license: appleple
* author: appleple
* homepage: http://developer.a-blogcms.jp
* version: 2.4.1
*
* custom-event-polyfill:
* license: MIT (http://opensource.org/licenses/MIT)
* maintainers: krambuhl <evan.krambuhl@gmail.com>
* contributors: Frank Panetta, Mikhail Reenko <reenko@yandex.ru>, Joscha Feth <joscha@feth.com>
* homepage: https://github.com/krambuhl/custom-event-polyfill#readme
* version: 0.3.0
*
* es6-object-assign:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Rubén Norte <rubennorte@gmail.com>
* homepage: https://github.com/rubennorte/es6-object-assign
* version: 1.1.0
*
* This header is generated by licensify (https://github.com/twada/licensify)
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ModalVideo = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
// Polyfill for creating CustomEvents on IE9/10/11
// code pulled from:
// https://github.com/d4tocchini/customevent-polyfill
// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill
try {
var ce = new window.CustomEvent('test');
ce.preventDefault();
if (ce.defaultPrevented !== true) {
// IE has problems with .preventDefault() on custom events
// http://stackoverflow.com/questions/23349191
throw new Error('Could not prevent default');
}
} catch(e) {
var CustomEvent = function(event, params) {
var evt, origPrevent;
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
};
evt = document.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
origPrevent = evt.preventDefault;
evt.preventDefault = function () {
origPrevent.call(this);
try {
Object.defineProperty(this, 'defaultPrevented', {
get: function () {
return true;
}
});
} catch(e) {
this.defaultPrevented = true;
}
};
return evt;
};
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent; // expose definition to window
}
},{}],2:[function(require,module,exports){
/**
* Code refactored from Mozilla Developer Network:
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
*/
'use strict';
function assign(target, firstSource) {
if (target === undefined || target === null) {
throw new TypeError('Cannot convert first argument to object');
}
var to = Object(target);
for (var i = 1; i < arguments.length; i++) {
var nextSource = arguments[i];
if (nextSource === undefined || nextSource === null) {
continue;
}
var keysArray = Object.keys(Object(nextSource));
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
var nextKey = keysArray[nextIndex];
var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
if (desc !== undefined && desc.enumerable) {
to[nextKey] = nextSource[nextKey];
}
}
}
return to;
}
function polyfill() {
if (!Object.assign) {
Object.defineProperty(Object, 'assign', {
enumerable: false,
configurable: true,
writable: true,
value: assign
});
}
}
module.exports = {
assign: assign,
polyfill: polyfill
};
},{}],3:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
require('custom-event-polyfill');
var _util = require('../lib/util');
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var assign = require('es6-object-assign').assign;
var defaults = {
channel: 'youtube',
facebook: {},
youtube: {
autoplay: 1,
cc_load_policy: 1,
color: null,
controls: 1,
disablekb: 0,
enablejsapi: 0,
end: null,
fs: 1,
h1: null,
iv_load_policy: 1,
list: null,
listType: null,
loop: 0,
modestbranding: null,
origin: null,
playlist: null,
playsinline: null,
rel: 0,
showinfo: 1,
start: 0,
wmode: 'transparent',
theme: 'dark',
nocookie: false
},
ratio: '16:9',
vimeo: {
api: false,
autopause: true,
autoplay: true,
byline: true,
callback: null,
color: null,
height: null,
loop: false,
maxheight: null,
maxwidth: null,
player_id: null,
portrait: true,
title: true,
width: null,
xhtml: false
},
allowFullScreen: true,
animationSpeed: 300,
classNames: {
modalVideo: 'modal-video',
modalVideoClose: 'modal-video-close',
modalVideoBody: 'modal-video-body',
modalVideoInner: 'modal-video-inner',
modalVideoIframeWrap: 'modal-video-movie-wrap',
modalVideoCloseBtn: 'modal-video-close-btn'
},
aria: {
openMessage: 'You just openned the modal video',
dismissBtnMessage: 'Close the modal by clicking here'
}
};
var ModalVideo = function () {
function ModalVideo(ele, option) {
var _this = this;
_classCallCheck(this, ModalVideo);
var opt = assign({}, defaults, option);
var selectors = typeof ele === 'string' ? document.querySelectorAll(ele) : ele;
var body = document.querySelector('body');
var classNames = opt.classNames;
var speed = opt.animationSpeed;
[].forEach.call(selectors, function (selector) {
selector.addEventListener('click', function (event) {
if (selector.tagName === 'A') {
event.preventDefault();
}
var videoId = selector.dataset.videoId;
var channel = selector.dataset.channel || opt.channel;
var id = (0, _util.getUniqId)();
var videoUrl = selector.dataset.videoUrl || _this.getVideoUrl(opt, channel, videoId);
var html = _this.getHtml(opt, videoUrl, id);
(0, _util.append)(body, html);
var modal = document.getElementById(id);
var btn = modal.querySelector('.js-modal-video-dismiss-btn');
modal.focus();
modal.addEventListener('click', function () {
(0, _util.addClass)(modal, classNames.modalVideoClose);
setTimeout(function () {
(0, _util.remove)(modal);
selector.focus();
}, speed);
});
modal.addEventListener('keydown', function (e) {
if (e.which === 9) {
e.preventDefault();
if (document.activeElement === modal) {
btn.focus();
} else {
modal.setAttribute('aria-label', '');
modal.focus();
}
}
});
btn.addEventListener('click', function () {
(0, _util.triggerEvent)(modal, 'click');
});
});
});
}
_createClass(ModalVideo, [{
key: 'getPadding',
value: function getPadding(ratio) {
var arr = ratio.split(':');
var width = Number(arr[0]);
var height = Number(arr[1]);
var padding = height * 100 / width;
return padding + '%';
}
}, {
key: 'getQueryString',
value: function getQueryString(obj) {
var url = '';
Object.keys(obj).forEach(function (key) {
url += key + '=' + obj[key] + '&';
});
return url.substr(0, url.length - 1);
}
}, {
key: 'getVideoUrl',
value: function getVideoUrl(opt, channel, videoId) {
if (channel === 'youtube') {
return this.getYoutubeUrl(opt.youtube, videoId);
} else if (channel === 'vimeo') {
return this.getVimeoUrl(opt.vimeo, videoId);
} else if (channel === 'facebook') {
return this.getFacebookUrl(opt.facebook, videoId);
}
return '';
}
}, {
key: 'getVimeoUrl',
value: function getVimeoUrl(vimeo, videoId) {
var query = this.getQueryString(vimeo);
return '//player.vimeo.com/video/' + videoId + '?' + query;
}
}, {
key: 'getYoutubeUrl',
value: function getYoutubeUrl(youtube, videoId) {
var query = this.getQueryString(youtube);
if (youtube.nocookie === true) {
return '//www.youtube-nocookie.com/embed/' + videoId + '?' + query;
}
return '//www.youtube.com/embed/' + videoId + '?' + query;
}
}, {
key: 'getFacebookUrl',
value: function getFacebookUrl(facebook, videoId) {
return '//www.facebook.com/v2.10/plugins/video.php?href=https://www.facebook.com/facebook/videos/' + videoId + '&' + this.getQueryString(facebook);
}
}, {
key: 'getHtml',
value: function getHtml(opt, videoUrl, id) {
var padding = this.getPadding(opt.ratio);
var classNames = opt.classNames;
return '\n <div class="' + classNames.modalVideo + '" tabindex="-1" role="dialog" aria-label="' + opt.aria.openMessage + '" id="' + id + '">\n <div class="' + classNames.modalVideoBody + '">\n <div class="' + classNames.modalVideoInner + '">\n <div class="' + classNames.modalVideoIframeWrap + '" style="padding-bottom:' + padding + '">\n <button class="' + classNames.modalVideoCloseBtn + ' js-modal-video-dismiss-btn" aria-label="' + opt.aria.dismissBtnMessage + '"></button>\n <iframe width=\'460\' height=\'230\' src="' + videoUrl + '" frameborder=\'0\' allowfullscreen=' + opt.allowFullScreen + ' tabindex="-1"/>\n </div>\n </div>\n </div>\n </div>\n ';
}
}]);
return ModalVideo;
}();
exports.default = ModalVideo;
module.exports = exports['default'];
},{"../lib/util":5,"custom-event-polyfill":1,"es6-object-assign":2}],4:[function(require,module,exports){
'use strict';
module.exports = require('./core/');
},{"./core/":3}],5:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var append = exports.append = function append(element, string) {
var div = document.createElement('div');
div.innerHTML = string;
while (div.children.length > 0) {
element.appendChild(div.children[0]);
}
};
var getUniqId = exports.getUniqId = function getUniqId() {
return (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase();
};
var remove = exports.remove = function remove(element) {
if (element && element.parentNode) {
element.parentNode.removeChild(element);
}
};
var addClass = exports.addClass = function addClass(element, className) {
if (element.classList) {
element.classList.add(className);
} else {
element.className += ' ' + className;
}
};
var triggerEvent = exports.triggerEvent = function triggerEvent(el, eventName, options) {
var event = void 0;
if (window.CustomEvent) {
event = new CustomEvent(eventName, { cancelable: true });
} else {
event = document.createEvent('CustomEvent');
event.initCustomEvent(eventName, false, false, options);
}
el.dispatchEvent(event);
};
},{}]},{},[4])(4)
});

View file

@ -12,6 +12,8 @@ var IDFicha;
var IDFichaH;
var PalabrasHistorico = [];
var FTPalabraClaveHistorico;
var UsuarioAlerta = false;
var idFicha;
var Alerta;
@ -34,7 +36,9 @@ jQuery(document).ready(function () {
if (EstadoTipo == "2") {
ObtenerFichaTecnicaHistorico();
} else {
ObtenerFichaTecnicaAlerta();
ObtenerFicha();
}
} else {
CargarEstado();
@ -238,7 +242,13 @@ this.getDataModel = function () {
$("#btnAlerta").unbind("click");
$("#btnAlerta").click(function () {
EnviarCorreoAlerta();
ActivarFichaTecnicaAlerta();
});
$("#btnDesactivarAlerta").unbind("click");
$("#btnDesactivarAlerta").click(function () {
DesactivarFichaTecnicaAlerta();;
});
$("#btnDestinatarios").unbind("click");
@ -1270,6 +1280,67 @@ this.EnviarCorreoDivulgar = function () {
ENDREQUEST();
}
this.ObtenerFichaTecnicaAlerta = function () {
var Alerta = {
IdFichaTecnica: FichaTecnicaId
}
var uri = SinortWCF + '/api/ObtenerFichaTecnicaAlerta';
model.FichaTecnicaAlerta = Alerta;
AjaxPostData(uri, model, false, true, ValidarUsuarioAlerta, null, null);
}
this.ValidarUsuarioAlerta = function (data) {
var ListaUsuarios = data.ListaFichaTecnicaAlerta;
var usuario = $.grep(ListaUsuarios, function (data) {
return data.UsuarioSistema == UsuarioSistema;
});
if (usuario.length != 0) {
UsuarioAlerta = true
}
}
this.DesactivarFichaTecnicaAlerta = function () {
if (UsuarioAlerta == true){
var Alerta = {
IdFichaTecnica: FichaTecnicaId,
Estado :false
}
var uri = SinortWCF + '/api/InsertarActualizarFichaTecnicaAlerta';
model.FichaTecnicaAlerta = Alerta;
AjaxPostData(uri, model, false, true, null, null, null);
ENDREQUEST();
} else {
toastr.warning("Primero debe activar una alerta.", Message_Warning);
}
}
this.ActivarFichaTecnicaAlerta = function () {
var Alerta = {
IdFichaTecnica: FichaTecnicaId,
Estado :true
}
var uri = SinortWCF + '/api/InsertarActualizarFichaTecnicaAlerta';
model.FichaTecnicaAlerta = Alerta;
AjaxPostData(uri, model, false, true, null, null, null);
ENDREQUEST();
}
this.EnviarCorreoAlerta = function () {

View file

@ -0,0 +1,52 @@

var Item = {};
jQuery(document).ready(function () {
CargarWiki();
});
this.CargarWiki = function () {
var uri = CatalogosWCF + '/api/ObtenerWiki';
AjaxPostData(uri, null, false, false, CargarTablaWiki, null, null);
}
this.CargarTablaWiki = function (data) {
if (data != null) {
lista = data;
var Seleccionar = $("#ucbtnVista").html();
var columnDefinition = [
{ "data": "Descripcion" },
{ "data": null, className: "center", defaultContent: Seleccionar }
];
$('#tableWiki').TableInit(1, true, true, true, true, columnDefinition, lista);
if ($.fn.DataTable.isDataTable('#tableWiki')) {
$('#tableWiki').DataTable().search('').draw();
ENDREQUEST();
}
}
}
$('#tableWiki').on('click', 'button', function () {
$(".js-modal-btn").modalVideo();
var data = $('#tableWiki').DataTable().row($(this).parents('tr')).data();
var mtzView = data.Vista.split('/')
//url = $("#hiddenHref").val();
//url = url.replace("View", mtzView[1]);
//url = url.replace("Controller", mtzView[0]);
//document.location.href = url;
});

View file

@ -10,8 +10,8 @@
<img class="img-responsive" src="~/dist/img/SinortBanner1.png">
<div class="row">
<div class="col-sm-4"><a href="#"> <img class="img-responsive" src="~/dist/img/imgNormReg1.png"></div>
@*<div class="col-sm-4"><a href="javascript: EntrarVerEstadoFicha('1');"> <img class="img-responsive" src="~/dist/img/imgNormReg1.png"></div>*@
@*<div class="col-sm-4"><a href="#"> <img class="img-responsive" src="~/dist/img/imgNormReg1.png"></div>*@
<div class="col-sm-4"><a href="javascript: EntrarVerEstadoFicha('1');"> <img class="img-responsive" src="~/dist/img/imgNormReg1.png"></div>
<div class="col-sm-4"><a href="javascript: ValidarAcceder('proyecto_normativo','Home','Ver proyectos y foros');"> <img class="img-responsive" src="~/dist/img/imgProyeNorm1.png"></div>
<div class="col-sm-4"><a href="@Url.Action("Reporte", "Reportes")"> <img class="img-responsive" src="~/dist/img/imgEst1.png"></div>
@*<div class="col-sm-4"><a href="#"> <img class="img-responsive" src="~/dist/img/imgEst1.png"></div>*@

View file

@ -0,0 +1,49 @@

@{
ViewBag.Title = "Wiki";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<link rel="stylesheet" type="text/css" href="~/Content/modal-video.min.css">
<script src="~/Scripts/modal-video.js"></script>
<input type="hidden" id="hiddenHref" value="@string.Concat(Url.Action("View", "Controller", null), ViewBag.QueryEncripted)">
<form id="formWiki" class="form-horizontal" role="form">
<div class="panel-body"> <h3>&nbsp;<i class="fa fa-film"></i>&nbsp; Videos Informativos SINORT </h3> </div>
<div style="background-color: #fff">
<button class="js-modal-btn" data-video-id="https://www.youtube.com/watch?v=4DZPZU4oGKc">Open Video</button>
<div class="panel-body">
<br />
<div>
<table id="tableWiki" class="table table-condensed dataTable no-footer">
<thead>
<tr>
<th class="col-sm-4">Descripción</th>
<th>Acción</th>
</tr>
</thead>
</table>
</div>
<div id="ucbtnVista" style=" display:none;">
<button type="button" id="btnseleccionar" class="btn btn-default btn-xs">
<i class="fa fa-forward"></i>&nbsp;&nbsp;Reproducir
</button>
</div>
</div>
</div>
</form>
@Scripts.Render("~/Sinort-Scripts/Wiki.js")

View file

@ -15,7 +15,11 @@
</button>
<button type="button" id="btnAlerta" class="btn btn-warning " style="margin-right: 15px; ">
<i class="fa fa-bell"></i>&nbsp;&nbsp;Enviar Alerta
<i class="fa fa-bell"></i>&nbsp;&nbsp;Activar Alerta
</button>
<button type="button" id="btnDesactivarAlerta" class="btn btn-warning " style="margin-right: 15px; ">
<i class="fa fa-bell"></i>&nbsp;&nbsp;Desactivar Alerta
</button>
<button type="button" id="btnEliminar" class="btn btn-danger ">

View file

@ -114,8 +114,7 @@
<ul class="dropdown-menu">
<li class="header" id="wiki">Videos informativos SINORT</li>
<li class="footer"><a href="#">Ver wiki </a></li>
@*<li class="footer"><a href="@Url.Action("GotitasPendientes", "Home")">Ver gotitas normativas </a></li>*@
<li class="footer"><a href="@Url.Action("Wiki", "Home")">Ver wiki </a></li>
</ul>
</li>
@ -182,12 +181,12 @@
<li><a href="@Url.Action("ResponderMisEncuestas", "NormativaReglamentacionTecnica")"> Responder mis encuestas </a></li>
<li><a href="javascript: ValidarAcceder('VerEncuestas','NormativaReglamentacionTecnica','Ver mis encuestas');"> Ver encuestas </a></li>*@
<span><i class="fa fa-circle text-success"> Administar</i> </span>
@*<li><a href="javascript: ValidarAcceder('FichaTecnica','NormativaReglamentacionTecnica','Crear Ficha Tecnica');"> Ficha Técnica</a></li>
<li><a href="javascript: EntrarVerEstadoFicha('2','Consulta ficha técnica inactiva');"> Ver fichas técnicas inactivas</a></li>
<li><a href="javascript: EntrarVerEstadoFicha('3', 'Consulta ficha técnica eliminada');"> Ver fichas técnicas eliminadas</a></li>
<li><a href="javascript: ValidarAcceder('VerSolicitudesCompra','NormativaReglamentacionTecnica','Ver histórico de solicitudes de compra');"> Ver solicitudes de compra</a></li>
<li><a href="javascript: EntrarVerSolicitud('3','Ver histórico de solicitudes de modificación');"> Ver solicitudes de modificación</a></li>
<li><a href="javascript: EntrarVerSolicitud('1','Ver histórico de solicitudes de consulta');"> Ver solicitudes de consulta</a></li>*@
<li><a href="javascript: ValidarAcceder('FichaTecnica','NormativaReglamentacionTecnica','Crear Ficha Tecnica');"> Ficha Técnica</a></li>
@*<li><a href="javascript: EntrarVerEstadoFicha('2','Consulta ficha técnica inactiva');"> Ver fichas técnicas inactivas</a></li>
<li><a href="javascript: EntrarVerEstadoFicha('3', 'Consulta ficha técnica eliminada');"> Ver fichas técnicas eliminadas</a></li>
<li><a href="javascript: ValidarAcceder('VerSolicitudesCompra','NormativaReglamentacionTecnica','Ver histórico de solicitudes de compra');"> Ver solicitudes de compra</a></li>
<li><a href="javascript: EntrarVerSolicitud('3','Ver histórico de solicitudes de modificación');"> Ver solicitudes de modificación</a></li>
<li><a href="javascript: EntrarVerSolicitud('1','Ver histórico de solicitudes de consulta');"> Ver solicitudes de consulta</a></li>*@
<li><a href="javascript: ValidarAcceder('Mantenimiento','Catalogos','Ingreso y actualización de mantenimientos');"> Configuración de la </br> aplicación</a></li>
</ul>
</li>

View file

@ -502,5 +502,84 @@ namespace AYA.SlnSinortModel.DAL.Sinort
}
public FichaTecnicaJSON InsertarActualizarFichaTecnicaAlerta(FichaTecnicaJSON model)
{
try
{
using (SinortContex Conn = new SinortContex())
{
model.FichaTecnicaAlerta.ClearProperties();
if (!Conn.FichaTecnicaAlerta.Any(x => x.IdFichaTecnica == model.FichaTecnicaAlerta.IdFichaTecnica && x.UsuarioSistema == model.UserName))
{
model.FichaTecnicaAlerta.IdFichaTecnica = model.FichaTecnicaAlerta.IdFichaTecnica;
model.FichaTecnicaAlerta.UsuarioSistema = model.UserName;
model.FichaTecnicaAlerta.Estado = model.FichaTecnicaAlerta.Estado;
model.FichaTecnicaAlerta.UsuarioCreacion = model.UserName;
model.FichaTecnicaAlerta.FechaCreacion = DateTime.Now;
Conn.FichaTecnicaAlerta.Add(model.FichaTecnicaAlerta);
}
else
{
model.FichaTecnicaAlerta.IdFichaTecnica = model.FichaTecnicaAlerta.IdFichaTecnica;
model.FichaTecnicaAlerta.UsuarioSistema = model.UserName;
model.FichaTecnicaAlerta.UsuarioModificacion = model.UserName;
model.FichaTecnicaAlerta.FechaModificacion = DateTime.Now;
Conn.Entry(model.FichaTecnicaAlerta).State = System.Data.Entity.EntityState.Detached;
Conn.FichaTecnicaAlerta.Attach(model.FichaTecnicaAlerta);
Conn.Entry(model.FichaTecnicaAlerta).State = System.Data.Entity.EntityState.Modified;
}
Conn.SaveChanges();
Conn.Commit();
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
}
}
catch (DbEntityValidationException ex)
{
log.Error(ex);
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
}
catch (Exception ex)
{
log.Error(ex);
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
}
return model;
}
public FichaTecnicaJSON ObtenerFichaTecnicaAlerta(FichaTecnicaJSON model)
{
try
{
using (SinortContex Conn = new SinortContex())
{
model.ListaFichaTecnicaAlerta = Conn.FichaTecnicaAlerta.Where(x => x.IdFichaTecnica == model.FichaTecnicaAlerta.IdFichaTecnica).ToList();
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
}
}
catch (DbEntityValidationException ex)
{
log.Error(ex);
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
}
catch (Exception ex)
{
log.Error(ex);
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
}
return model;
}
}
}

View file

@ -31,5 +31,23 @@ namespace AYA.SlnSinortModel.DAL.Sinort
return registros;
}
public List<Wiki> ObtenerWiki()
{
List<Wiki> registros = null;
try
{
using (SinortContex db = new SinortContex())
{
registros = db.Wiki.Where(t => t.Estado == true).OrderBy(q => q.Descripcion).ToList();
}
}
catch (Exception ex)
{
log.Error(ex);
}
return registros;
}
}
}

View file

@ -125,6 +125,7 @@
<Compile Include="Sinort\TipoSolicitud.cs" />
<Compile Include="Sinort\Usuario.cs" />
<Compile Include="Sinort\UsuariosEncuesta.cs" />
<Compile Include="Sinort\Wiki.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Atesa.Utilitarios\Atesa.Utilitarios.csproj">

View file

@ -33,6 +33,8 @@ namespace AYA.SlnSinortModel.Entidades
{
public FichaTecnica FichaTecnica { get; set; }
public FichaTecnicaPalabraClave PalabraClave { get; set; }
public FichaTecnicaAlerta FichaTecnicaAlerta { get; set; }
public List<FichaTecnicaAlerta> ListaFichaTecnicaAlerta { get; set; }
public FichaTecnicaHistorico FichaTecnicaHistorico { get; set; }
public FichaTecnicaHistoricoPalabraClave HistoricoPalabraClave{ get; set; }

View file

@ -57,6 +57,7 @@ namespace AYA.SlnSinortModel.Sinort
public virtual DbSet<Solicitud> Solicitud { get; set; }
public virtual DbSet<TareasPendientes> TareasPendientes { get; set; }
public virtual DbSet<UsuariosEncuesta> UsuariosEncuesta { get; set; }
public virtual DbSet<Wiki> Wiki { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
@ -1056,6 +1057,22 @@ namespace AYA.SlnSinortModel.Sinort
modelBuilder.Entity<UsuariosEncuesta>()
.Property(e => e.UsuarioModificacion)
.IsUnicode(false);
modelBuilder.Entity<Wiki>()
.Property(e => e.Descripcion)
.IsUnicode(false);
modelBuilder.Entity<Wiki>()
.Property(e => e.Ruta)
.IsUnicode(false);
modelBuilder.Entity<Wiki>()
.Property(e => e.UsuarioCreacion)
.IsUnicode(false);
modelBuilder.Entity<Wiki>()
.Property(e => e.UsuarioModificacion)
.IsUnicode(false);
}
}
}

View file

@ -0,0 +1,34 @@
namespace AYA.SlnSinortModel.Sinort
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("Global.Wiki")]
public partial class Wiki
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int IdWiki { get; set; }
[StringLength(50)]
public string Descripcion { get; set; }
[StringLength(500)]
public string Ruta { get; set; }
public bool? Estado { get; set; }
public DateTime? FechaCreacion { get; set; }
[StringLength(200)]
public string UsuarioCreacion { get; set; }
public DateTime? FechaModificacion { get; set; }
[StringLength(200)]
public string UsuarioModificacion { get; set; }
}
}