+
@@ -423,7 +415,8 @@
- CCP
+ CCP
+
@@ -448,6 +441,13 @@
+
+
<%--//OIE.[CveEvento], OIE.[CveTipoEvento], OIE.[Folio], OIE.[Asunto], OIE.[Descripcion], OIE.[Prioridad], OIE.[CveUsuarioDe], OIE.[CveUsuarioPara],
//OIE.[CveEventoEstatus], OIE.[FechaInicio], OIE.[FechaFin], OIE.[FechaRealTermino], OIE.[CveRevision], OIE.[Archivo], OIE.[FechaIng],
//OIE.[CveUsuarioIng], OIE.[CveEmpresa], OIE.[CveUsuarioModifico], OIE.[Avance]--%>
@@ -787,7 +787,7 @@
}
}, 500);
}
-
+
function TxtUsuarioB_Onchange() {
let obj = $('.TxtUsuarioB');
let text = '';
@@ -805,7 +805,7 @@
function chkAll_OncLick(valor) {
$('.GVUsuarios tr:visible input[type="checkbox"]').prop("checked", valor);
}
-
+
function chkAllB_OncLick(valor) {
$('.GVUsuariosB tr:visible input[type="checkbox"]').prop("checked", valor);
}
@@ -824,14 +824,14 @@
//e.Row.Attributes.Add("data-rol", CveRol);
//e.Row.Attributes.Add("data-sucursal", CveRol);
}
- function showhideUserB() {
+ function showhideUserB() {
let strusuario = usuariotextB.length > 0 ? ':contains("' + usuariotextB + '")' : '';// td:nth-child(2)
$('.GVUsuariosB tr.items').attr('hide', '1')//oculto todos
if (strusuario.length > 0) {
$('.GVUsuariosB tr.items' + strusuario).attr('hide', '');//muestro los que tienen filtro con usuario,sucursal y rol
} else {
- $('.GVUsuariosB tr.items' ).attr('hide', '');//muestro los que tienen filtro con sucursal y rol
+ $('.GVUsuariosB tr.items').attr('hide', '');//muestro los que tienen filtro con sucursal y rol
}
//e.Row.Attributes.Add("data-rol", CveRol);
diff --git a/OI/TareaNueva.ascx b/OI/TareaNueva.ascx
new file mode 100644
index 000000000..56a41271b
--- /dev/null
+++ b/OI/TareaNueva.ascx
@@ -0,0 +1,97 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TareaNueva.ascx.cs" Inherits="OI_TareaNueva" %>
+
+
diff --git a/OI/TareaNueva.ascx.cs b/OI/TareaNueva.ascx.cs
new file mode 100644
index 000000000..000566f3a
--- /dev/null
+++ b/OI/TareaNueva.ascx.cs
@@ -0,0 +1,154 @@
+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_TareaNueva : System.Web.UI.UserControl
+{
+ public const string iddivAgregarTarea = "iddivAgregarTarea";
+ public Usuario UsuarioActual { get { if (Context.Session["UsuarioSIG"] == null) { return null; } else { return (Usuario)Context.Session["UsuarioSIG"]; } } }
+ public int CveEventoPadre { get { return ViewState["CveEventoPadre"] != null ? ViewState["CveEventoPadre"].ToString().ToEntero() : 0; } set { ViewState["CveEventoPadre"] = value; } }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ CveEventoPadre = -1;
+ }
+
+ protected void BtnopenmodalConPadre_Click(object sender, EventArgs e)
+ {
+ CveEventoPadre = txtCveEventoPadre.Text.ToEntero();
+ }
+
+ protected void BtnGuardarTarea_Click(object sender, EventArgs e)
+ {
+ string errorMessage = "";
+
+ int cveUsuarioDe = UsuarioActual.CveUsuario;
+ List
listaCCP = new List();
+ 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 chkList = new List();
+
+ 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, CveEventoPadre);
+
+ 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.ToastInformacion);
+
+ TxtAsunto.Text = "";
+ TxtDescripcion.Text = "";
+ txtFechaF.Text = "";
+ txtFechaI.Text = "";
+ this.RegistraScript("if(OnAddedTareaNueva){OnAddedTareaNueva();})");
+ }
+ }
+ }
+}
\ No newline at end of file