This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-05-02 03:03:15 -07:00
parent 512e31911a
commit c84d4e3863
33 changed files with 64945 additions and 149 deletions

View File

@@ -14,7 +14,7 @@
<asp:UpdatePanel runat="server" ID="UpAgregar">
<ContentTemplate>
<li>
<asp:HyperLink ID="LnkAgregar" runat="server" NavigateUrl="/OI/CircularDetalle.aspx?CveCircular=-1"> Agregar Circular</asp:HyperLink>
<asp:HyperLink ID="LnkAgregar" runat="server" NavigateUrl="/OI/CircularDetalleB.aspx?CveCircular=-1"> Agregar Circular</asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
@@ -71,8 +71,8 @@
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCircular,Asunto,Usuario" EmptyDataText="No se encontraron Circulares"
ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; width: 100%" GridLines="None">
<Columns>
<asp:HyperLinkField HeaderText="Asunto" DataTextField="Asunto" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalle.aspx?CveCircular={0}" />
<asp:HyperLinkField HeaderText="Usuario" DataTextField="Usuario" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalle.aspx?CveCircular={0}" />
<asp:HyperLinkField HeaderText="Asunto" DataTextField="Asunto" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalleB.aspx?CveCircular={0}" />
<asp:HyperLinkField HeaderText="Usuario" DataTextField="Usuario" DataNavigateUrlFields="CveCircular" DataNavigateUrlFormatString="/OI/CircularDetalleB.aspx?CveCircular={0}" />
</Columns>
</asp:GridView>
</ContentTemplate>

View File

@@ -97,7 +97,7 @@
<ContentTemplate>
<div class="row">
<div class="col-md-6">
<div class="col-md-5">
<asp:Panel runat="server" ID="portletMinuta" class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption font-green">
@@ -110,12 +110,12 @@
</div>
<div class="portlet-body rowpadding">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAsunto" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<asp:TextBox ID="TxtAsunto" runat="server" CssClass="form-control TxtAsunto" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVAsunto" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsunto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Asunto:" AssociatedControlID="TxtAsunto"></asp:Label>
</div>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control TxtDescripcion" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvDescripcion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Descripción" AssociatedControlID="TxtDescripcion"></asp:Label>
</div>
@@ -148,8 +148,10 @@
<asp:LinkButton ID="LnkTerminar_EnviarMinuta" Visible="false" runat="server" OnClick="LnkTerminarMinuta_Click" CssClass="btn btn-primary">Terminar y Enviar Minuta</asp:LinkButton>
</div>
</div>
<div class="col-md-6">
<div class="col-md-7">
<div style="height: 12px; width: 100%; text-align: right; font-style: italic; font-weight: bold">
<span id="ltlFechaAutoGuardado"></span>
</div>
<div class="row">
<div class="col-md-6">
<asp:Panel runat="server" ID="portletArchivo" class="portlet light smmallpadding bordered">
@@ -244,6 +246,8 @@
<ajax:TabPanel ID="TabAcuerdos" runat="server" HeaderText="Acuerdos">
<ContentTemplate>
<asp:HiddenField runat="server" ID="hdnCveEvento" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="hdnCveEventoEstatus" Value="1" ClientIDMode="Static" />
<asp:UpdatePanel ID="UpChkList" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel runat="server" ID="portletChekList" Visible="true" class="portlet light smmallpadding bordered" DefaultButton="LnkAgregarchklistitem">
@@ -255,6 +259,11 @@
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkSaveAcuerdos" OnClick="LnkSaveAcuerdos_Click" CssClass="btn btn-default" runat="server">Guardar</asp:LinkButton>
</div>
</div>
</div>
<div class="portlet-body rowpadding">
<div style="display: none;">
@@ -307,7 +316,7 @@
<div class="form-group form-md-line-input ">
<%--<asp:Label runat="server" Text="Acuerdos" AssociatedControlID="TxtAcuerdos"></asp:Label>--%>
<asp:TextBox ID="TxtAcuerdos" runat="server" CssClass="form-control ADSckeditor" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
<asp:TextBox ID="TxtAcuerdos" runat="server" CssClass="form-control ADSckeditor TxtAcuerdos" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
</div>
</div>
</asp:Panel>
@@ -328,6 +337,11 @@
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkAgregarTarea" OnClick="LnkAgregarTarea_Click" CssClass="btn btn-default" runat="server">Agregar</asp:LinkButton>
</div>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
@@ -392,7 +406,6 @@
</div>
<div class="row">
<div class="col-sm-12 text-center">
<asp:LinkButton ID="LnkAgregarTarea" OnClick="LnkAgregarTarea_Click" CssClass="btn btn-default" runat="server">Agregar</asp:LinkButton>
</div>
</div>
@@ -403,11 +416,13 @@
<asp:GridView ID="GVTareas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
DataKeyNames="Titulo,NombreRegistro,CveEvento,CveTipoEvento,Folio,Asunto,Descripcion,Prioridad,CveUsuarioDe,CveUsuarioPara,CveEventoEstatus,FechaInicio,FechaFin,FechaRealTermino,CveRevision,Archivo,FechaIng,CveUsuarioIng,CveEmpresa,CveUsuarioModifico,Avance">
<Columns>
<%--<asp:TemplateField HeaderText="Folio">
<ItemTemplate>
<asp:Label ID="lblfolio" runat="server" Text='<%# Eval("Folio")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField HeaderText="Folio">
<ItemTemplate>
<a target="_blank" href='<%# Eval("CveEvento","/OI/TareaDetalle.aspx?CveEvento={0}")%>' class="Widthallimp">
<asp:Label runat="server" Text='<%# Eval("Folio")%>'> </asp:Label>
</a>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Asunto">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("Asunto")%>'> </asp:Label>
@@ -456,6 +471,11 @@
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkAgregarAgenda" OnClick="LnkAgregarAgenda_Click" CssClass="btn btn-default" runat="server">Agregar</asp:LinkButton>
</div>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
@@ -533,7 +553,6 @@
</div>
<div class="row">
<div class="col-sm-12 text-center">
<asp:LinkButton ID="LnkAgregarAgenda" OnClick="LnkAgregarAgenda_Click" CssClass="btn btn-default" runat="server">Agregar</asp:LinkButton>
</div>
</div>
@@ -641,6 +660,64 @@
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
$(document).ready(function () {
setTimeout("autoGuardado()", 60000);
});
//$('#btnAutoGuardado').click(function () {
function autoGuardado() {
if ($get("hdnCveEvento").value != "" && $get("hdnCveEventoEstatus").value != "4") {
var SendObj = {
"CveEvento": $get("hdnCveEvento").value,
"Asunto": $(".TxtAsunto").val(),
"Descripcion": $(".TxtDescripcion").val(),
"Acuerdos": $(".TxtAcuerdos").val().replace(/< /gi, '<'),
}
fechaAutoGuardado();
var stringData = JSON.stringify(SendObj);
$.ajax({
type: 'POST',
url: '/asmx/wsOI.asmx/AutoGuardadoMinuta',
data: "{'objMinuta':" + stringData + "}",
contentType: 'application/json; utf-8',
dataType: 'json',
success: function (data) {
fechaAutoGuardado();
if (data.d != null) {
alert(data.d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
}
}
);
}
function fechaAutoGuardado() {
var f = new Date();
var hours = f.getHours();
var minutes = f.getMinutes();
var ampm = hours >= 12 ? 'pm' : 'am';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0' + minutes : minutes;
var strTime = hours + ':' + minutes + ' ' + ampm;
//if (hours <= 9)
// hours = "0" + hours;
//if (minutes <= 9)
// minutes = "0" + minutes;
$get("ltlFechaAutoGuardado").innerText = "Última hora de auto guardado " + strTime;
}
setTimeout("autoGuardado()", 60000);
}
</script>
<script>
////////////////////////////////////////////////Filtros Usuarios////////////////////////////////////////
let CveRol = -1;

View File

@@ -49,6 +49,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
{
Tab.Visible = true;
EsNuevo = false;
LnkGuardar.Visible = false;
using (ClsOIEventos oieve = new ClsOIEventos())
{
oieve.UpUsuarioseventosVisto(RCveEvento, UsuarioActual.CveUsuario);
@@ -93,6 +94,8 @@ public partial class OI_MinutaDetalle : ClsPaginas
TabArchivos.Visible = true;
LnkTerminar_EnviarMinuta.Visible = true;
LnkEnviarMinuta.Visible = true;
TxtAsunto.Enabled = false;
TxtDescripcion.Enabled = false;
//LnkUpFileVisible = true;
//LnkUpUsuariosVisible = true;
System.Data.DataRow drow = ObjOI_E.DtResultados.Rows[0];
@@ -118,6 +121,17 @@ public partial class OI_MinutaDetalle : ClsPaginas
int CveUsuarioIng = drow["CveUsuarioIng"].ToString().ToEntero();
CveUsuarioDe = drow["CveUsuarioDe"].ToString().ToEntero();
CveUsuarioPara = drow["CveUsuarioPara"].ToString().ToEntero();
int CveEventoEstatus = drow["CveEventoEstatus"].ToString().ToEntero();
if (CveEventoEstatus ==4)
{
LnkSaveAcuerdos.Visible = false;
LnkAgregarAgenda.Visible = false;
LnkTerminar_EnviarMinuta.Visible = false;
LnkEnviarMinuta.Visible = true;
LnkAgregarTarea.Visible = false;
}
hdnCveEventoEstatus.Value = CveEventoEstatus.ToString();
hdnCveEvento.Value = RCveEvento.ToString();
//TxtAvance.Text = string.Format("{0:##0}", drow["Avance"]);
//TxtUsuarioreg.Text = string.Format("{0}", drow["NombreRegistro"]);
//TxtFechaIng.Text = string.Format("{0:dd/MM/yyyy}", drow["FechaIng"]);
@@ -874,7 +888,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
StrSB.Append(" <td colspan=\"3\" style=\"width: 80px;font-weight:bold\" class=\"Texto\">ASUNTO:</td>");
StrSB.Append(" </tr>");
StrSB.Append(" <tr>");
StrSB.AppendFormat(" <td colspan=\"3\" style=\"text-align:left\" ><b><a href=\"{0}{1}{2}\">{3}</a></b></td>", DireccionURL, "/OI/Minutas.aspx?CveEvento=", CveEvento, objEvento.Asunto);
StrSB.AppendFormat(" <td colspan=\"3\" style=\"text-align:left\" ><b><a href=\"{0}{1}{2}\">{3}</a></b></td>", DireccionURL, "/OI/MinutaDetalle.aspx?CveEvento=", CveEvento, objEvento.Asunto);
StrSB.Append(" </tr>");
StrSB.Append(" <tr>");
StrSB.Append(" <td colspan=\"3\" style=\"width: 80px;font-weight:bold\" class=\"Texto\">DESCRIPCION:</td>");
@@ -1106,4 +1120,11 @@ public partial class OI_MinutaDetalle : ClsPaginas
return StrSB;
}
#endregion
protected void LnkSaveAcuerdos_Click(object sender, EventArgs e)
{
using (ClsOIEventos ObjEventos =new ClsOIEventos()) {
ObjEventos.UpdateEventoMinuta(TxtAsunto.Text, TxtDescripcion.Text, TxtAcuerdos.Text.Replace("< ", "<"), new DateTime(1999, 1, 1), "-1", RCveEvento);
}
}
}

486
OI/Proyecto.aspx Normal file
View File

@@ -0,0 +1,486 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Proyecto.aspx.cs" Inherits="OI_Proyecto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.btn.newsubpro {
margin-left: 3px;
padding: 2px 4px;
}
</style>
<style>
.gantt-samples-banner_controls_bar.controls_bar {
margin: 0;
//position: absolute;
top: -30px;
width: 100%;
right: 0;
left: 0;
}
.controls_bar {
border-top: 1px solid #bababa;
border-bottom: 1px solid #bababa;
clear: both;
height: 28px;
background: #f1f1f1;
color: #494949;
font-family: Arial, sans-serif;
font-size: 13px;
padding-left: 10px;
line-height: 25px;
}
</style>
<%--<link href="/Metronic/assets/global/plugins/GantJS/jsgantt.css" rel="stylesheet" type="text/css" />--%>
<link rel="stylesheet" href="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.css" type="text/css">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Proyecto:
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkNewProyecto" OnClick="LnkNewProyecto_Click" runat="server"><i class="fa fa-plus"></i> Agregar Proyecto</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<%--<div style="position: relative" class="gantt" id="GanttChartDIV"></div>--%>
<asp:UpdatePanel ID="UpContenido" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="gantt-samples-banner_controls_bar controls_bar">
<strong>Formato: &nbsp; </strong>
<label>
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="week">
<span>Horas</span></label>
<label>
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="trplweek" checked="true">
<span>Día</span></label>
<label>
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="year">
<span>Mes</span></label>
<div id="filter_hours" style="display: none;">
<span>&nbsp; &nbsp; | &nbsp; &nbsp; </span>
<strong>Mostrar: &nbsp; </strong>
<label>
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="full_day">
<span>Dia Completo</span>
</label>
<label>
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="work_hours">
<span>Horario de Oficina</span>
</label>
</div>
<div id="filter_days" style="">
<span>&nbsp; &nbsp; | &nbsp; &nbsp; </span>
<strong>Mostrar: &nbsp; </strong>
<label>
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="full_week">
<span>Semana completa</span>
</label>
<label>
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="work_week">
<span>Dias de Trabajo</span>
</label>
</div>
</div>
<div id="gantt_here" style='width: 100%; height: 100vh;'></div>
<div id='<%= iddivAgregarProyecto %>' class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpModalProyecto" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span> </button>
<h4 class="modal-title" style="text-align: left">
<asp:Literal ID="LtlTituloNewProyecto" runat="server">Agregar Proyecto</asp:Literal></h4>
</div>
<div class="modal-body">
<asp:Panel runat="server" ID="portletTarea" class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Tarea</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAsunto" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVAsunto" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsunto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Asunto:" AssociatedControlID="TxtAsunto"></asp:Label>
</div>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvDescripcion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Descripción" AssociatedControlID="TxtDescripcion"></asp:Label>
</div>
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlPara" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveUsuario" DataTextField="Nombre" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlPara">Para:</asp:Label>
</div>
<div class="row">
<div class="col-sm-6">
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
<asp:TextBox ID="txtFechaI" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVtxtFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label AssociatedControlID="txtFechaI" runat="server" Text="Fecha Inicio"></asp:Label>
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-sm-6">
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
<asp:TextBox ID="txtFechaF" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px " placeholder=""></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVtxtFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label AssociatedControlID="txtFechaF" runat="server" Text="Fecha Fin"></asp:Label>
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
<ajax:ValidatorCalloutExtender ID="VcoFechaF" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlPrioridad" runat="server" CssClass="form-control select2me input-sm" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Baja" Value="1" class="itembaja"></asp:ListItem>
<asp:ListItem Text="Media" Value="2" class="itemmedia"></asp:ListItem>
<asp:ListItem Text="Alta" Value="3" class="itemalta"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVPrioridad" runat="server" ControlToValidate="DdlPrioridad" Display="None" ErrorMessage="El campo <b>''Prioridad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" AssociatedControlID="DdlPrioridad">Prioridad:</asp:Label>
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-sm-6">
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlTema">Tema:</asp:Label>
</div>
</div>
</div>
</div>
</asp:Panel>
</div>
<div class="modal-footer">
<asp:LinkButton ID="btnguardarProyecto" OnClick="btnguardarProyecto_Click" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
<button data-dismiss="modal" class="btn btn-danger">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<script src="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js"></script>
<%--<script src="/Metronic/assets/global/plugins/GantJS/jsgantt.js" type="text/javascript"></script>--%>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
function zoom_tasks(node) {
switch (node.value) {
case "week":
gantt.config.scale_unit = "day";
gantt.config.date_scale = "%d %M";
gantt.config.scale_height = 60;
gantt.config.min_column_width = 30;
gantt.config.subscales = [
{ unit: "hour", step: 1, date: "%H" }
];
show_scale_options("hour");
break;
case "trplweek":
gantt.config.min_column_width = 70;
gantt.config.scale_unit = "day";
gantt.config.date_scale = "%d %M";
gantt.config.subscales = [];
gantt.config.scale_height = 35;
show_scale_options("day");
break;
case "month":
gantt.config.min_column_width = 70;
gantt.config.scale_unit = "week";
gantt.config.date_scale = "Week #%W";
gantt.config.subscales = [
{ unit: "day", step: 1, date: "%D" }
];
show_scale_options();
gantt.config.scale_height = 60;
break;
case "year":
gantt.config.min_column_width = 70;
gantt.config.scale_unit = "month";
gantt.config.date_scale = "%M";
gantt.config.scale_height = 60;
show_scale_options();
gantt.config.subscales = [
{ unit: "week", step: 1, date: "#%W" }
];
break;
}
set_scale_units();
gantt.render();
}
function show_scale_options(mode) {
var hourConf = document.getElementById("filter_hours"),
dayConf = document.getElementById("filter_days");
if (mode == 'day') {
hourConf.style.display = "none";
dayConf.style.display = "";
dayConf.getElementsByTagName("input")[0].checked = true;
} else if (mode == "hour") {
hourConf.style.display = "";
dayConf.style.display = "none";
hourConf.getElementsByTagName("input")[0].checked = true;
} else {
hourConf.style.display = "none";
dayConf.style.display = "none";
}
}
function set_scale_units(mode) {
if (mode && mode.getAttribute) {
mode = mode.getAttribute("value");
}
switch (mode) {
case "work_hours":
gantt.config.subscales = [
{ unit: "hour", step: 1, date: "%H" }
];
gantt.ignore_time = function (date) {
if (date.getHours() < 9 || date.getHours() > 16) {
return true;
} else {
return false;
}
};
break;
case "full_day":
gantt.config.subscales = [
{ unit: "hour", step: 3, date: "%H" }
];
gantt.ignore_time = null;
break;
case "work_week":
gantt.ignore_time = function (date) {
if (date.getDay() == 0 || date.getDay() == 6) {
return true;
} else {
return false;
}
};
break;
default:
gantt.ignore_time = null;
break;
}
gantt.render();
}
var datosGant = [];
function loadGant() {
gantt.config.date_format = "%Y-%m-%d %H:%i";
gantt.i18n.setLocale("es");
gantt.init("gantt_here");
gantt.config.columns = [
{ name: "text", label: "Proyecto ", width: "*", min_width: 350, tree: true, resize: true },
{ name: "start_date", label: "Inicio", min_width: 90, align: "center" },
{ name: "end_date", label: "Fin", min_width: 90, align: "center" },
{ name: "progress", label: "Avance", align: "center", template: function (obj) { return "" + (obj.progress * 100) + " %" } },
{ name: "duration", label: "Duracion", align: "center" },
{ name: "new", label: "<i class='fa fa-plus'></i>", align: "center" }
/*{name:"staff", label:"Holder(s)", template:function(obj){return obj.holder+"("+obj.progress+")"} },*/
//{ name: "add", label: "" }
];
gantt.parse({
data:datosGant
//data: [
// { id: 1, text: "Apertura de Sucursal", start_date: null, duration: null, parent: 0, progress: 0, open: true },
// { id: 2, text: "Direccion: evaluación de mercado", start_date: "2020/04/29 00:00", end_date: "2020/05/02 00:00",/*duration: 3,*/ parent: 1, progress: 0.25 },
// { id: 3, text: "RH: Personal requerido/ contrataciones", start_date: "2020/05/04 00:00", duration: 1, parent: 1, progress: 0 },
// { id: 4, text: "Logistica: inventario Inicial", start_date: "2020/04/26 00:00", duration: 10, parent: 1, progress: 0.50 },
// { id: 5, text: "Contabilidad: tramites y servicios", start_date: "2020/05/19 00:00", duration: 1, parent: 1, progress: 0 },
// { id: 6, text: "Propaganda,Mkt: Inaguración", start_date: "2020/05/05 00:00", duration: 6, parent: 1, progress: 0.1 },
// //{id: 7, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
// //{id: 8, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
// { id: 7, text: "Asamblea Anual", start_date: null, duration: null, parent: 0, progress: 0, open: true },
// { id: 8, text: "Contabilidad: Impuestos", start_date: "2020/05/05 00:00", duration: 13, parent: 7, progress: 0.6 },
// { id: 9, text: "Contabilida: utilidad o pérdida", start_date: "2020/05/06 00:00", duration: 9, parent: 7, progress: 0.5 },
// { id: 10, text: "Despacho: estategia Fiscal", start_date: "2020/05/14 00:00", duration: 11, parent: 7, progress: 0.33 },
// { id: 11, text: "Despacho: declaración anual", start_date: "2020/05/23 00:00", duration: 1, parent: 7, progress: 0 },
// { id: 12, text: "Despacho: informe", start_date: "2020/05/24 00:00", duration: 24, parent: 7, progress: 0 },
// { id: 13, text: "Tramites y servicios", start_date: "2020/05/ 00:00", duration: 5, parent: 7, progress: 0 },
// { id: 14, text: "Renovación licencia SCT", start_date: "2020/05/14 00:00", duration: 4, parent: 13, progress: 0 },
// { id: 15, text: "Permiso SSA año2020", start_date: "2020/05/18 00:00", duration: 14, parent: 13, progress: 0 },
// { id: 16, text: "Permiso SAT para Operar", start_date: "2020/05/03 00:00", duration: 6, parent: 13, progress: 0 }
//]
/*,
links:[
{id:1, source:2, target:3, type:"0"},
{id:2, source:3, target:4, type:"0"},
{id:3, source:5, target:6, type:"0"}
]*/
});
}
loadGant();
</script>
<%--<script>
var g = new JSGantt.GanttChart(document.getElementById('GanttChartDIV'), 'day');
g.setOptions({
vCaptionType: 'Complete', // Set to Show Caption : None,Caption,Resource,Duration,Complete,
vQuarterColWidth: 36,
vDateTaskDisplayFormat: 'day dd month yyyy', // Shown in tool tip box
vDayMajorDateDisplayFormat: 'mon yyyy - Week ww',// Set format to dates in the "Major" header of the "Day" view
vWeekMinorDateDisplayFormat: 'dd mon', // Set format to display dates in the "Minor" header of the "Week" view
vLang: 'en',
vShowTaskInfoLink: 1, // Show link in tool tip (0/1)
vShowEndWeekDate: 0, // Show/Hide the date for the last day of the week in header for daily
vAdditionalHeaders: { // Add data columns to your table
category: {
title: 'Category'
},
sector: {
title: 'Sector'
}
},
vUseSingleCell: 10000, // Set the threshold cell per table row (Helps performance for large data.
vFormatArr: ['Day', 'Week', 'Month', 'Hour'], // Even with setUseSingleCell using Hour format on such a large chart can cause issues in some browsers,
});
g.setLang('es');
// Load from a Json url
//JSGantt.parseJSON('./fixes/data.json', g);
// Or Adding Manually
//g.AddTaskItemObject({
// pID: 1,
// pName: "Define Chart <strong>API</strong><a class='btn btn-default newsubpro'><i class='fa fa-plus'></i></a>",
// pStart: "2017-02-25",
// pEnd: "2017-03-17",
// pPlanStart: "2017-04-01",
// pPlanEnd: "2017-04-15 12:00",
// pClass: "ggroupblack",
// pLink: "",
// pMile: 0,
// pRes: "Brian",
// pComp: 0,
// pGroup: 0,
// pParent: 0,
// pOpen: 1,
// pDepend: "",
// pCaption: "",
// pCost: 1000,
// pNotes: "Some Notes text",
// category: "My Category",
// sector: "Finance"
//});
g.AddTaskItemObject({pID: 1, pName: "Apertura de Sucursal", pStart: "2020/04/29",pEnd:"2020/05/20",pPlanStart: "2020/04/29 00:00",pPlanEnd:"2020/05/20 00:00", vDuration: 0, pParent:0, progress: 0, open: true});
g.AddTaskItemObject({pID: 2, pName: "Direccion: evaluación de mercado", pStart: "2020/04/29 00:00",pEnd:"2020/05/02 00:00", vDuration:3, pParent:1, progress: 0.25});
g.AddTaskItemObject({pID: 3, pName: "RH: Personal requerido/ contrataciones", pStart: "2020/05/04 00:00",pEnd:"2020/05/05 00:00", vDuration:1, pParent:1, progress: 0});
g.AddTaskItemObject({pID: 4, pName: "Logistica: inventario Inicial", pStart: "2020/04/26 00:00",pEnd:"2020/05/06 00:00", vDuration:10, pParent:1, progress: 0.50});
g.AddTaskItemObject({pID: 5, pName: "Contabilidad: tramites y servicios", pStart: "2020/05/19 00:00",pEnd:"2020/05/20 00:00", pDuration:1, pParent:1, progress: 0});
g.AddTaskItemObject({pID: 6, pName: "Propaganda,Mkt: Inaguración", pStart: "2020/05/05 00:00",pEnd:"2020/05/11 00:00", vDuration:6, pParent:1, progress: 0.1});
//{id: 7, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
//{id: 8, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
//g.AddTaskItemObject({pID: 7, pName: "Asamblea Anual", pStart: null, pDuration: 0, vParent:0, progress: 0, open: true});
//g.AddTaskItemObject({pID: 8, pName: "Contabilidad: Impuestos", pStart: "2020/05/05 00:00",pEnd:"2020/05/18 00:00", vDuration:13, pParent:7, progress: 0.6});
//g.AddTaskItemObject({pID: 9, pName: "Contabilida: utilidad o pérdida", pStart: "2020/05/06 00:00",pEnd:"2020/05/15 00:00", vDuration:9, pParent:7, progress: 0.5});
//g.AddTaskItemObject({pID: 10, pName: "Despacho: estategia Fiscal", pStart: "2020/05/14 00:00",pEnd:"2020/05/25 00:00", vDuration:11, pParent:7, progress: 0.33});
//g.AddTaskItemObject({pID: 11, pName: "Despacho: declaración anual", pStart: "2020/05/23 00:00",pEnd:"2020/05/24 00:00", vDuration:1, pParent:7, progress: 0});
//g.AddTaskItemObject({pID: 12, pName: "Despacho: informe", pStart: "2020/05/24 00:00", vDuration:24, parent:7, progress: 0});
//g.AddTaskItemObject({pID: 13, pName: "Tramites y servicios", pStart: "2020/05/20 00:00",pEnd:"2020/05/25 00:00", vDuration:5, pParent:7, progress: 0});
//g.AddTaskItemObject({pID: 14, pName: "Renovación licencia SCT", pStart: "2020/05/14 00:00",pEnd:"2020/05/18 00:00", vDuration:4, pParent:13, progress: 0});
//g.AddTaskItemObject({pID: 15, pName: "Permiso SSA año2020", pStart: "2020/05/18 00:00",pEnd:"2020/06/02 00:00", vDuration:14, pParent:13, progress: 0});
//g.AddTaskItemObject({pID: 16, pName: "Permiso SAT para Operar", pStart: "2020/05/03 00:00",pEnd:"2020/05/09 00:00", vDuration:6, pParent:13, progress: 0});
g.Draw();
</script>--%>
<script>
function CargaPickers() {
$.datetimepicker.setLocale('es');
$('input.ADDateTimePicker').each(function () {
var TThis = $(this);
TThis.datetimepicker({
dayOfWeekStart: 1,
lang: 'es',
format: 'd/m/Y H:i',
formatDate: 'd/m/Y H:i',
step: 30
});
var Div = TThis.parent()
var boton = document.createElement('span');
boton.className = "input-group-btn"
var subboton = document.createElement('a')
subboton.className = "btn default btnCalendar"
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
subboton.addEventListener('click', function () {
TThis.datetimepicker('show')
});
boton.appendChild(subboton)
var agregar = true;
for (var i = 0; i < Div[0].children.length; i++) {
if (Div[0].children[i].isEqualNode(boton)) {
agregar = false;
}
}
if (agregar) {
Div[0].appendChild(boton);
}
//Div[0].appendChild(boton)
});
}
function ADSReady() {
CargaPickers();
}
</script>
</asp:Content>

208
OI/Proyecto.aspx.cs Normal file
View File

@@ -0,0 +1,208 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
public partial class OI_Proyecto : ClsPaginas
{
#region Propiedades
public const string iddivAgregarProyecto = "iddivAgregarProyecto";
public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } }
public int RCveEventoB { get { return ViewState["RCveEventoB"] != null ? ViewState["RCveEventoB"].ToString().ToEntero() : 0; } set { ViewState["RCveEventoB"] = value; } }
public int Folio { get { return ViewState["Folio"] != null ? ViewState["Folio"].ToString().ToEntero() : 0; } set { ViewState["Folio"] = value; } }
public decimal Avance { get { return ViewState["Avance"] != null ? ViewState["Avance"].ToString().ToEntero() : 0; } set { ViewState["Avance"] = value; } }
public int CveUsuarioPara { get { return ViewState["CveUsuarioPara"].ToString().ToEntero(); } set { ViewState["CveUsuarioPara"] = value; } }
public int CveUsuarioDe { get { return ViewState["CveUsuarioDe"].ToString().ToEntero(); } set { ViewState["CveUsuarioDe"] = value; } }
public List<int> LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List<int>(); } return (List<int>)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } }
public List<int> LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List<int>(); } return (List<int>)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } }
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request["CveEvento"] != null)
{
RCveEvento = Request["CveEvento"].ToString().ToEntero();
}
if(RCveEvento > 0)
{
loadEvento();
}
DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); ;
DdlPara.DataBind();
DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
DdlTema.DataBind();
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
}
}
public void loadEvento()
{
string separator = "";
StringBuilder str = new StringBuilder();
str.AppendLine("datosGant=[");
using (ClsOIEventos oieve = new ClsOIEventos())
{
if (oieve.GetTareaConHijos(RCveEvento,UsuarioActual.CveEmpresa))
{
foreach (System.Data.DataRow dr in oieve.DtResultados.Select("Nivel > 0"))
{
str.AppendLine(string.Format("{0}{{id: {1}, text: \"{2}\", start_date: \"{3:yyyy/MM/dd}\", end_date: \"{4:yyyy/MM/dd}\", parent: {5}, progress:{6}, open: true }}",
separator,dr["CveEvento"], dr["Asunto"].ToString().Replace("\\", "\\\\").Replace("\"", "\\\""), dr["FechaInicio"], dr["FechaFin"], (dr["Nivel"].ToString().ToEntero()<=1?0: dr["CveEventoPadre"].ToString().ToEntero()), dr["Avance"].ToString().ToDecimal()/100));
separator = ",";
}
}
}
str.AppendLine("];loadGant();");
this.RegistraScript(str.ToString());
UpContenido.Update();
//{ id: 2, text: "Direccion: evaluación de mercado", start_date: "2020/04/29 00:00", end_date: "2020/05/02 00:00",/*duration: 3,*/ parent: 1, progress: 0.25 }
}
protected void LnkNewProyecto_Click(object sender, EventArgs e)
{
this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto));
RCveEventoB = RCveEvento;
}
protected void btnguardarProyecto_Click(object sender, EventArgs e)
{
string errorMessage = "";
int cveUsuarioDe = UsuarioActual.CveUsuario;
List<int> listaCCP = new List<int>();
int cveUsuarioPara = DdlPara.SelectedValue.ToEntero();
OITipoEventos cveTipoEvento = OITipoEventos.Proyecto;
string asunto = TxtAsunto.Text;
string descripcion = TxtDescripcion.Text;
int prioridad = DdlPrioridad.SelectedValue.ToEntero();
string fechaInicio = "";
if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999)
{
if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
{
errorMessage = "No se ingresó una fecha de inicio valida";
}
else
{
fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm");
}
}
else
{
fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
string fechaFin = "";
if (txtFechaF.Text.ToDateTimeExcat().Year <= 1999)
{
if (txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
{
errorMessage = "No se ingresó una fecha fin valida";
}
else
{
fechaFin = string.Format("{0:yyyy/MM/dd} 23:59", txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy"));
}
}
else
{
fechaFin = txtFechaF.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
int cveRevision = DdlTema.SelectedValue.ToEntero();
string archivoname = "";
string rutaarchivoOri = "";
//string ArchivoExtencion = "";
//foreach (Archivo item in TxtArchivo.getfiles().Archivos)
//{
// archivoname = item.filenameO;
// ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
// rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
//}
int cveUsuarioIng = UsuarioActual.CveUsuario;
int cveEmpresa = UsuarioActual.CveEmpresa;
bool Continuar = false;
int Folio = -1;
int CveEvento = -1;
if (cveUsuarioDe <= 0)
{
errorMessage = "No se selecciono el miembro 'C C Para'";
}
if (cveUsuarioPara <= 0)
{
errorMessage = "No se selecciono el miembro 'Para'";
}
if (errorMessage.Length == 0)
{
List<string> chkList = new List<string>();
using (ClsOIEventos objOI = new ClsOIEventos())
{
objOI.IniciaTransacSQL();
Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEventoB);
CveEvento = objOI.CveEvento;
Folio = objOI.Folio;
if (CveEvento == 0)
{
Continuar = false;
}
if (Continuar)
{
objOI.Commit();
//ObjEventosCorreo o = objOI.objCorreo;
//string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
//EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
else
{
objOI.RollBack();
Continuar = false;
}
}
if (Continuar && CveEvento > 0)
{
if (rutaarchivoOri.Length > 0)
{
string ruta = string.Format("{0}OIFiles\\", UsuarioActual.Empresa.Ruta);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
ruta = string.Format("{0}{1}\\", ruta, Folio);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion);
System.IO.File.Move(rutaarchivoOri, ruta);
}
//this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/Proyecto.aspx?CveEvento={0}\");", CveEvento));
loadEvento();
TxtAsunto.Text = "";
TxtDescripcion.Text = "";
txtFechaF.Text = "";
txtFechaI.Text = "";
}
}
}
}

View File

@@ -51,9 +51,9 @@ Partial Class OI_RepMinutas
'e.Row.Cells(1).Width = Unit.Pixel(200) 'Asunto
'e.Row.Cells(2).Width = Unit.Pixel(550) 'Descripcion
'e.Row.Cells(3).Width = Unit.Pixel(70) 'TareasTotal
e.Row.FCLiteral("LtlFechaInicio").Text = String.Format("<a class=""Texto"" href=""/OI/Minutas.aspx?CveEvento={0}"">{1}</a>", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("FechaInicio").ToDateTime.ToString("dd/MM/yyyy"))
e.Row.FCLiteral("LtlAsunto").Text = String.Format("<a class=""Texto"" href=""/OI/Minutas.aspx?CveEvento={0}"">{1}</a>", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("Asunto"))
e.Row.FCLiteral("LtlFechaInicio").Text = String.Format("<a class=""Texto"" href=""/OI/MinutaDetalle.aspx?CveEvento={0}"">{1}</a>", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("FechaInicio").ToDateTime.ToString("dd/MM/yyyy"))
e.Row.FCLiteral("LtlAsunto").Text = String.Format("<a class=""Texto"" href=""/OI/MinutaDetalle.aspx?CveEvento={0}"">{1}</a>", e.Row.DBCampo("CveEvento"), e.Row.DBCampo("Asunto"))
End If
End Sub

239
OI/RepProyectos.aspx Normal file
View File

@@ -0,0 +1,239 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepProyectos.aspx.cs" Inherits="OI_RepProyectos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.red-haze {
background-color: #f3565d;
}
.green-sharp {
background-color: #1bbc9b;
}
.yellow-saffron {
background-color: #F4D03F;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Proyectos
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkNewProyecto" OnClick="LnkNewProyecto_Click" runat="server"><i class="fa fa-plus"></i> Agregar Proyecto</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpContenido" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvProyecto" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
DataKeyNames="Titulo,NombreRegistro,CveEvento,CveTipoEvento,Folio,Asunto,Descripcion,Prioridad,CveUsuarioDe,CveUsuarioPara,CveEventoEstatus,FechaInicio,FechaFin,FechaRealTermino,CveRevision,Archivo,FechaIng,CveUsuarioIng,CveEmpresa,CveUsuarioModifico,Avance">
<Columns>
<asp:TemplateField HeaderText="Folio">
<ItemTemplate>
<a target="_blank" href='<%# Eval("CveEvento","/OI/Proyecto.aspx?CveEvento={0}")%>' class="Widthallimp">
<asp:Label runat="server" Text='<%# Eval("Folio")%>'> </asp:Label>
</a>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Proyecto">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("Asunto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descripción">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("Descripcion")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Para">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("UserPara")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Inicio">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy HH}:{0:mm}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("EventoEstatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance" ItemStyle-Width="156">
<ItemTemplate>
<div style="width: 150px; border: 1px solid #777;position:relative; text-align:center; height: 22px;">
<%# string.Format("<div style=\"width:{0}%; height:20px;left:0px;position: absolute;top: 0px;\" class=\"{2}\"></div><div style=\"text-align:center; left:0px;position: absolute;top: 0px;width:100%;font-weight: bold; \">{1}</div>",Eval("Avance"),Eval("Avance","%{0:##0.##}") ,
(Convert.ToDecimal(Eval("Avance").ToString())>70? "green-sharp":(Convert.ToDecimal(Eval("Avance").ToString())>35?"yellow-saffron":"red-haze")))
%>
</div>
<%--yellow-saffron--%>
<%--green-sharp--%>
<%--red-haze--%>
<%--<asp:Label runat="server" Text='<%# Eval("Avance","%{0:##0.##}")%>'> </asp:Label>--%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<div id='<%= iddivAgregarProyecto %>' class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpModalProyecto" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span> </button>
<h4 class="modal-title" style="text-align: left">
<asp:Literal ID="LtlTituloNewProyecto" runat="server">Agregar Proyecto</asp:Literal></h4>
</div>
<div class="modal-body">
<asp:Panel runat="server" ID="portletTarea" class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Proyecto Nuevo</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAsunto" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVAsunto" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsunto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Asunto:" AssociatedControlID="TxtAsunto"></asp:Label>
</div>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvDescripcion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Descripción" AssociatedControlID="TxtDescripcion"></asp:Label>
</div>
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlPara" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveUsuario" DataTextField="Nombre" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlPara">Para:</asp:Label>
</div>
<div class="row">
<div class="col-sm-6">
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
<asp:TextBox ID="txtFechaI" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVtxtFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label AssociatedControlID="txtFechaI" runat="server" Text="Fecha Inicio"></asp:Label>
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-sm-6">
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
<asp:TextBox ID="txtFechaF" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px " placeholder=""></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVtxtFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label AssociatedControlID="txtFechaF" runat="server" Text="Fecha Fin"></asp:Label>
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
<ajax:ValidatorCalloutExtender ID="VcoFechaF" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlPrioridad" runat="server" CssClass="form-control select2me input-sm" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Baja" Value="1" class="itembaja"></asp:ListItem>
<asp:ListItem Text="Media" Value="2" class="itemmedia"></asp:ListItem>
<asp:ListItem Text="Alta" Value="3" class="itemalta"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVPrioridad" runat="server" ControlToValidate="DdlPrioridad" Display="None" ErrorMessage="El campo <b>''Prioridad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" AssociatedControlID="DdlPrioridad">Prioridad:</asp:Label>
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-sm-6">
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlTema">Tema:</asp:Label>
</div>
</div>
</div>
</div>
</asp:Panel>
</div>
<div class="modal-footer">
<asp:LinkButton ID="btnguardarProyecto" OnClick="btnguardarProyecto_Click" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
<button data-dismiss="modal" class="btn btn-danger">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
function CargaPickers() {
$.datetimepicker.setLocale('es');
$('input.ADDateTimePicker').each(function () {
var TThis = $(this);
TThis.datetimepicker({
dayOfWeekStart: 1,
lang: 'es',
format: 'd/m/Y H:i',
formatDate: 'd/m/Y H:i',
step: 30
});
var Div = TThis.parent()
var boton = document.createElement('span');
boton.className = "input-group-btn"
var subboton = document.createElement('a')
subboton.className = "btn default btnCalendar"
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
subboton.addEventListener('click', function () {
TThis.datetimepicker('show')
});
boton.appendChild(subboton)
var agregar = true;
for (var i = 0; i < Div[0].children.length; i++) {
if (Div[0].children[i].isEqualNode(boton)) {
agregar = false;
}
}
if (agregar) {
Div[0].appendChild(boton);
}
//Div[0].appendChild(boton)
});
}
function ADSReady() {
CargaPickers();
}
</script>
</asp:Content>

180
OI/RepProyectos.aspx.cs Normal file
View File

@@ -0,0 +1,180 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
public partial class OI_RepProyectos : ClsPaginas
{
#region Propiedades
public const string iddivAgregarProyecto = "iddivAgregarProyecto";
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); ;
DdlPara.DataBind();
DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
DdlTema.DataBind();
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
cargar();
}
}
public void cargar()
{
using (ClsOIEventos ObjOI_E = new ClsOIEventos())
{
if (ObjOI_E.GetEventos2(-1, UsuarioActual.CveEmpresa, -1) && ObjOI_E.DtResultados.Rows.Count > 0)
{
System.Data.DataTable dt = ObjOI_E.DtResultados;
GvProyecto.DataSource = dt.FiltraParametros(string.Format("CveTipoEvento ={0} AND (CveUsuarioDe ={1} OR CveUsuarioPara={1} ) AND (CveEventoPadre IS NULL OR CveEventoPadre <= 0)", (int)OITipoEventos.Proyecto, UsuarioActual.CveUsuario));
GvProyecto.DataBind();
}
}
UpContenido.Update();
}
protected void LnkNewProyecto_Click(object sender, EventArgs e)
{
this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto));
}
protected void btnguardarProyecto_Click(object sender, EventArgs e)
{
string errorMessage = "";
int cveUsuarioDe = UsuarioActual.CveUsuario;
List<int> listaCCP = new List<int>();
int cveUsuarioPara = DdlPara.SelectedValue.ToEntero();
OITipoEventos cveTipoEvento = OITipoEventos.Proyecto;
string asunto = TxtAsunto.Text;
string descripcion = TxtDescripcion.Text;
int prioridad = DdlPrioridad.SelectedValue.ToEntero();
string fechaInicio = "";
if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999)
{
if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
{
errorMessage = "No se ingresó una fecha de inicio valida";
}
else
{
fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm");
}
}
else
{
fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
string fechaFin = "";
if (txtFechaF.Text.ToDateTimeExcat().Year <= 1999)
{
if (txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999)
{
errorMessage = "No se ingresó una fecha fin valida";
}
else
{
fechaFin = string.Format("{0:yyyy/MM/dd} 23:59", txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy"));
}
}
else
{
fechaFin = txtFechaF.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm");
}
int cveRevision = DdlTema.SelectedValue.ToEntero();
string archivoname = "";
string rutaarchivoOri = "";
//string ArchivoExtencion = "";
//foreach (Archivo item in TxtArchivo.getfiles().Archivos)
//{
// archivoname = item.filenameO;
// ArchivoExtencion = string.Format("{0}{1}", (item.Extencion.Length > 0 ? "." : ""), item.Extencion);
// rutaarchivoOri = string.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, item.patch, item.filename);
//}
int cveUsuarioIng = UsuarioActual.CveUsuario;
int cveEmpresa = UsuarioActual.CveEmpresa;
bool Continuar = false;
int Folio = -1;
int CveEvento = -1;
if (cveUsuarioDe <= 0)
{
errorMessage = "No se selecciono el miembro 'C C Para'";
}
if (cveUsuarioPara <= 0)
{
errorMessage = "No se selecciono el miembro 'Para'";
}
if (errorMessage.Length == 0)
{
List<string> chkList = new List<string>();
using (ClsOIEventos objOI = new ClsOIEventos())
{
objOI.IniciaTransacSQL();
Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa);
CveEvento = objOI.CveEvento;
Folio = objOI.Folio;
if (CveEvento == 0)
{
Continuar = false;
}
if (Continuar)
{
objOI.Commit();
//ObjEventosCorreo o = objOI.objCorreo;
//string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, o.Fechai, o.Fechaf, o.Prioridad, o.Tema);
//EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
}
else
{
objOI.RollBack();
Continuar = false;
}
}
if (Continuar && CveEvento > 0)
{
if (rutaarchivoOri.Length > 0)
{
string ruta = string.Format("{0}OIFiles\\", UsuarioActual.Empresa.Ruta);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
ruta = string.Format("{0}{1}\\", ruta, Folio);
if (!System.IO.Directory.Exists(ruta))
{
System.IO.Directory.CreateDirectory(ruta);
}
ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion);
System.IO.File.Move(rutaarchivoOri, ruta);
}
//this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/Proyecto.aspx?CveEvento={0}\");", CveEvento));
this.Alert("Se ha agregadó la nueva tarea", ModExtensiones.TipoMensaje.MsgInformacion);
cargar();
TxtAsunto.Text = "";
TxtDescripcion.Text = "";
txtFechaF.Text = "";
txtFechaI.Text = "";
}
}
}
}

View File

@@ -125,7 +125,7 @@ public partial class OI_TareaDetalle : ClsPaginas
bool esPara = UsuarioActual.CveUsuario == CveUsuarioPara;
Permisos = new OI_TareaDetalle_Permisos
{
EntrarOI = (EsNuevo || esmiembro|| true),
EntrarOI = (EsNuevo || esmiembro),
CheckList = (EsNuevo || esdeel || esPara),
EdicionGeneral = (EsNuevo || esdeel),
Bitacora = esmiembro,
@@ -741,7 +741,7 @@ public partial class OI_TareaDetalle : ClsPaginas
{
int CveEstatus = DDlEstatus.SelectedValue.ToEntero();
if ((Permisos.Estatus1_2_3 && CveEstatus.Contiene(new int[] { 1, 2, 3 })) || (Permisos.Estatus4_5 && CveEstatus.Contiene(new int[] { 45 })))
if ((Permisos.Estatus1_2_3 && CveEstatus.Contiene(new int[] { 1, 2, 3 })) || (Permisos.Estatus4_5 && CveEstatus.Contiene(new int[] { 4,5 })))
{
using (ClsOIEventos objOI = new ClsOIEventos())
{