diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index b47b3d317..f31d13a2a 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2659,11 +2659,12 @@ Public Class ClsGenerales End Try Return Retorno - End Function - + End Function + #Region "P A Q U E T E R I A S G U I A S" Public Function AddPaqueteriasGuias(CvePaqueteria As Integer, CvePaqueteriaGuiaTipo As Integer, CveEstatus As Integer, CveSubProyecto As Integer, Fecha As String, Rastreo As String, Guia As String, NumCajas As Integer, - Peso As Double, Dimensiones As String, FechaEstimada As String, Observaciones As String, CveUsuario As Integer, CveEmpresa As Integer, Optional ImplicaCosto As Boolean = True) As Integer + Peso As Double, Dimensiones As String, FechaEstimada As String, Observaciones As String, CveUsuario As Integer, CveEmpresa As Integer, Optional ImplicaCosto As Boolean = True, + Optional EsEntregaInterna As Boolean = False) As Integer Dim Retorno As Integer = -1 @@ -2689,6 +2690,8 @@ Public Class ClsGenerales .Add("@ImplicaCosto", SqlDbType.Bit).Value = IIf(ImplicaCosto = True, 1, 0) .Add("@CvePaqueteriaGuiaTipo", SqlDbType.SmallInt).Value = CvePaqueteriaGuiaTipo + .Add("@EsEntregaInterna", SqlDbType.Bit).Value = EsEntregaInterna + .Add("@CvePaqueteriaGuia", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -2709,7 +2712,9 @@ Public Class ClsGenerales Return Retorno End Function - Public Function GetPaqueteriasGuias(CvePaqueteriaGuia As Integer, CvePaqueteriaGuiaTipo As Integer, CvePaqueteria As Integer, CveEstatus As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Guia As String, FechaInicio As String, FechaFin As String, Optional FechaIngInicio As String = "-1", Optional FechaIngFin As String = "-1", Optional Filtro As Integer = -1) As Boolean + Public Function GetPaqueteriasGuias(CvePaqueteriaGuia As Integer, CvePaqueteriaGuiaTipo As Integer, CvePaqueteria As Integer, CveEstatus As Integer, CveSubProyecto As Integer, + CveEmpresa As Integer, Guia As String, FechaInicio As String, FechaFin As String, Optional FechaIngInicio As String = "-1", + Optional FechaIngFin As String = "-1", Optional Filtro As Integer = -1, Optional CveUsuarioEntrega As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -2728,6 +2733,7 @@ Public Class ClsGenerales .Add("@FechaIngInicio", SqlDbType.VarChar).Value = FechaIngInicio .Add("@FechaIngFin", SqlDbType.VarChar).Value = FechaIngFin .Add("@Filtro", SqlDbType.Int).Value = Filtro + .Add("@CveUsuarioEntrega", SqlDbType.Int).Value = CveUsuarioEntrega End With Try SqlAdapter.Fill(Data) @@ -2794,9 +2800,43 @@ Public Class ClsGenerales End Try Return Retorno - End Function -#End Region + End Function + + Public Function GetEntregasPorRealizar(CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Gral_EntregasPorRealizarGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener entregas por realizar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function + + Public Function AsignarEntregasPorRealizar(CvePaqueteriaGuia As Integer, CvePersonal As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Gral_AsignarEntregasPorRealizar") + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener entregas por realizar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + +#End Region + #Region "P A Q U E T E R I A S G U I A S D E T A L L E S" Public Function AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia As Integer, CveVenta As Integer, CveOC As Integer, CveMovimiento As Integer, Optional CveCompra As Integer = -1) As Boolean diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index 2a9ab0bf8..d8084033f 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -306,13 +306,14 @@ Public Class ClsOIEventos End Function - Public Function GetUnoaUnoCuestionario(cveUnoaUnoCuestionario As Int32, cveUsuario As Int32) As Boolean + Public Function GetUnoaUnoCuestionario(cveUnoaUnoCuestionario As Integer, cveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_OI_UnoaUnoCuestionarioGet", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveUnoaUnoCuestionario", SqlDbType.Int).Value = (cveUnoaUnoCuestionario) .Add("@CveUsuario", SqlDbType.Int).Value = (cveUsuario) + .Add("@CveEmpresa", SqlDbType.Int).Value = (CveEmpresa) End With Try SqlAdapter.Fill(Data) @@ -337,7 +338,7 @@ Public Class ClsOIEventos End Try Return retorno End Function - Public Function AddUnoaUnoCuestionario(Cuestionario As String, Comentario As String, CveUsuario As Integer, ListPreguntas As List(Of Integer)) As Boolean + Public Function AddUnoaUnoCuestionario(Cuestionario As String, Comentario As String, CveUsuario As Integer, ListPreguntas As List(Of Integer), CveEmpresa As Integer) As Boolean Dim retorno As Boolean = False Dim xmlPreguntas As System.Xml.Linq.XDocument = Nothing @@ -349,6 +350,7 @@ Public Class ClsOIEventos .Add("@Cuestionario", SqlDbType.VarChar).Value = (Cuestionario) .Add("@Comentario", SqlDbType.VarChar).Value = (Comentario) .Add("@CveUsuario", SqlDbType.Int).Value = (CveUsuario) + .Add("@CveEmpresa", SqlDbType.Int).Value = (CveEmpresa) .Add("@xmlPreguntas", SqlDbType.Xml).Value = If(xmlPreguntas Is Nothing, DBNull.Value, DirectCast(xmlPreguntas.ToString(), Object)) End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 389d0dbed..6c1eaf2e6 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -73,8 +73,9 @@ Public Class ClsPaginas 'UsuarioActual = DirectCast(Session("UsuarioSIG"), Usuario) If Context.Session("UsuarioSIG") Is Nothing Then Usuario.CerrarSession() + Return Nothing Else - UsuarioActual = CType(Context.Session("UsuarioSIG"), Usuario) + Return CType(Context.Session("UsuarioSIG"), Usuario) End If Catch ex As Exception Usuario.CerrarSession() @@ -3626,14 +3627,13 @@ Public Class ClsPaginas PaginaDict.Add("/Default2.aspx".ToUpper(), -1) PaginaDict.Add("/CargaCuentas.aspx".ToUpper(), -1) PaginaDict.Add("/OI/Tareas.aspx".ToUpper(), -1) - PaginaDict.Add("/OI/RepProyectos.aspx".ToUpper(), -1) - PaginaDict.Add("/OI/Proyecto.aspx".ToUpper(), -1) - PaginaDict.Add("/OI/Tablero.aspx".ToUpper(), -1) - PaginaDict.Add("/OI/TableroDetalle.aspx".ToUpper(), -1) - PaginaDict.Add("/OI/UnoaUno.aspx".ToUpper(), -1) - PaginaDict.Add("/OI/UnoaUnoConfiguracion.aspx".ToUpper(), -1) - PaginaDict.Add("/OI/ConvocatoriaDetalle.aspx".ToUpper(), -1) - PaginaDict.Add("/OI/RepReuniones.aspx".ToUpper(), -1) + PaginaDict.Add("/OI/RepProyectos.aspx".ToUpper(), 907) + PaginaDict.Add("/OI/Proyecto.aspx".ToUpper(), 907) + PaginaDict.Add("/OI/Tablero.aspx".ToUpper(), 910) + PaginaDict.Add("/OI/TableroDetalle.aspx".ToUpper(), 910) + PaginaDict.Add("/OI/UnoaUno.aspx".ToUpper(), 909) + PaginaDict.Add("/OI/ConvocatoriaDetalle.aspx".ToUpper(), 908) + PaginaDict.Add("/OI/RepReuniones.aspx".ToUpper(), 908) PaginaDict.Add("/AdSistemasTeam/ProcedimientosAlmacenados.aspx".ToUpper(), -1) PaginaDict.Add("/OS/CatOrdenesServiciosCaracteristicas.aspx".ToUpper(), -1) PaginaDict.Add("/OS/CatOSCaracteristicasOpciones.aspx".ToUpper(), -1) @@ -4275,6 +4275,7 @@ Public Class ClsPaginas PaginaDict.Add("/General/CatRinTamanios.aspx".ToUpper(), 711) PaginaDict.Add("/General/CatMedidas.aspx".ToUpper(), 712) PaginaDict.Add("/General/CatSatListado69B.aspx".ToUpper, 1038) + PaginaDict.Add("/General/PopUpPaqueteriasGuiasInternas.aspx".ToUpper(), 727) #End Region #Region "GPS" @@ -4404,6 +4405,7 @@ Public Class ClsPaginas PaginaDict.Add("/Inventarios/RepTraspasoEmitido.aspx".ToUpper(), 891) PaginaDict.Add("/Inventarios/AjustesSeccionAlmacen.aspx".ToUpper(), 892) PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688) + PaginaDict.Add("/Inventarios/EntregasPorRealizar.aspx".ToUpper(), 728) #End Region #Region "MF" diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index 9219165df..b124bd0a3 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -1939,8 +1939,8 @@ Partial Class Contratos_Default LimitarCantidad = Gv.Rows(e.RowIndex).FCCheckBox("ChkLimitarCantidad").Checked Observaciones = Gv.Rows(e.RowIndex).FCTextBox("TxtObservacion").Text.ToString Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0) - - If row("CantidadContratada").ToString.ToEntero <> Cantidad OrElse row("PU").ToString.ToEntero <> PU OrElse CveUM <> row("CveUM").ToString.ToEntero OrElse row("NoIdentificacion").ToString <> NoIdentificacion OrElse row("OCInterna").ToString <> OCInterna Then + Dim LimitarCantidadValidator As Boolean = row("LimitarCantidad").ToString = "True" + If row("CantidadContratada").ToString.ToEntero <> Cantidad OrElse row("PU").ToString.ToEntero <> PU OrElse CveUM <> row("CveUM").ToString.ToEntero OrElse row("NoIdentificacion").ToString <> NoIdentificacion OrElse row("OCInterna").ToString <> OCInterna OrElse LimitarCantidadValidator <> LimitarCantidad Then Dim ObjContratos As New ClsContratos If ObjContratos.UpdateContratosDetalle(CveContratoDetalle, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, LimitarCantidad, OCInterna, Observaciones) Then @@ -2922,9 +2922,9 @@ Partial Class Contratos_Default End If - If e.Row.DBCampo("SerieLote").ToString = "-1" Then - e.Row.Cells(7).Text = "" - End If + 'If e.Row.DBCampo("SerieLote").ToString = "-1" Then + ' e.Row.Cells(7).Text = "" + 'End If End If End Sub diff --git a/General/PopUpPaqueteriasGuiasInternas.aspx b/General/PopUpPaqueteriasGuiasInternas.aspx new file mode 100644 index 000000000..9b0b9d319 --- /dev/null +++ b/General/PopUpPaqueteriasGuiasInternas.aspx @@ -0,0 +1,127 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="PopUpPaqueteriasGuiasInternas.aspx.cs" Inherits="General_PopUpPaqueteriasGuiasInternas" %> + + + + + + + + + <%--Paqueterías Guías--%>Entrega Interna + + + + + + + + + + + + + + +
<%--Guías Vinculadas--%> Entrega Local
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Estatus: + + <%-- --%> + + + + + + <%-- + --%> +
Fecha: +
+ + + + + + + + + +
+
Fecha Estimada: +
+ + + + + + + +
+
# Cajas: + + +
Observaciones: + +
+ + + + +
+
+
+
+ + + diff --git a/General/PopUpPaqueteriasGuiasInternas.aspx.cs b/General/PopUpPaqueteriasGuiasInternas.aspx.cs new file mode 100644 index 000000000..da9c3af0c --- /dev/null +++ b/General/PopUpPaqueteriasGuiasInternas.aspx.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; +using System.Data; +using System.Text; + +public partial class General_PopUpPaqueteriasGuiasInternas : ClsPaginas +{ + private int CveVenta + { + get + { + return ViewState["CveVenta"].ToString().ToEntero(); + } + + set + { + ViewState["CveVenta"] = value; + } + } + + private int CveSubProyecto + { + get + { + return ViewState["CveSubProyecto"].ToString().ToEntero(); + } + + set + { + ViewState["CveSubProyecto"] = value; + } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ((BaseMasterPage)this.Master).EsPopup = true; + RecuperaCve(); + } + } + + protected void RecuperaCve() + { + if (Request["CveVenta"] != null && !Request["CveVenta"].ToString().Equals("") && Request["CveVenta"].ToEntero() > 0) + { + ViewState["CveVenta"] = Request["CveVenta"]; + } + else + { + ViewState["CveVenta"] = -1; + } + + if (Request["CveSubProyecto"] != null && !Request["CveSubProyecto"].ToString().Equals("") && Request["CveSubProyecto"].ToEntero() > 0) + { + ViewState["CveSubProyecto"] = Request["CveSubProyecto"]; + } + else + { + ViewState["CveSubProyecto"] = -1; + } + } + + protected void LimpiaCampos() + { + DdlEstatus.SelectedValue = "1"; + TxtFecha.Text = ""; + TxtFechaEstimada.Text = ""; + TxtNoCajas.Text = ""; + TxtObservaciones.Text = ""; + } + + protected void AgregarNuevaGuia() + { + ClsGenerales ObjGeneral = new ClsGenerales(); + + Boolean TieneError = false; + + ObjGeneral.IniciaTransacSQL(); + + int CveEstatus = DdlEstatus.SelectedValue.ToEntero(); + + String Fecha = TxtFecha.Text; + String FechaEstimada = TxtFechaEstimada.Text == "" ? "-1" : TxtFechaEstimada.Text; + + int NoCajas = TxtNoCajas.Text.ToEntero(); + + String Observaciones = TxtObservaciones.Text; + + int CvePaqueteriaGuia = ObjGeneral.AddPaqueteriasGuias(-1, -1, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, + UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:true); + + if (CvePaqueteriaGuia > 0) + { + if (CveVenta > 0 || CveSubProyecto > 0 ) + { + TieneError = !ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVenta, -1, CveSubProyecto, -1); + } + } + else + { + TieneError = true; + } + + if (TieneError) + { + ObjGeneral.RollBack(); + }else + { + ObjGeneral.Commit(); + LimpiaCampos(); + Alert("Se agrego la paquetería guía correctamente"); + } + ObjGeneral.Dispose(); + } + + public void BtnAgregarGuia_Click(Object sender, EventArgs e) + { + + } + + public void BtnCrearGuia_Click(Object sender, EventArgs e) + { + AgregarNuevaGuia(); + } + + public void BtnLimpiar_Click(Object sender,EventArgs e) + { + LimpiaCampos(); + } +} \ No newline at end of file diff --git a/General/RepPaqueteriasGuias.aspx b/General/RepPaqueteriasGuias.aspx index 9eb0e6564..b13c27470 100644 --- a/General/RepPaqueteriasGuias.aspx +++ b/General/RepPaqueteriasGuias.aspx @@ -167,6 +167,11 @@ + + +
+ +
diff --git a/General/RepPaqueteriasGuias.aspx.cs b/General/RepPaqueteriasGuias.aspx.cs index 9fcbd9d2b..69a53120a 100644 --- a/General/RepPaqueteriasGuias.aspx.cs +++ b/General/RepPaqueteriasGuias.aspx.cs @@ -162,7 +162,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas CargaPaqueterias(); CargaPaqueteriasGuiasTipo(); InicializaFechas(); - + CargaUsuarios(); UPFiltros.Update(); if (!UsuarioActual.TienePermisoProceso(219)) @@ -231,6 +231,13 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas DdlEstatusEditar.SelectedValue = "-1"; } + private void CargaUsuarios() + { + DdlUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa:UsuarioActual.CveEmpresa); + DdlUsuarios.DataBind(); + DdlUsuarios.Items.Insert(0, new ListItem("Seleccione ", "-1")); + } + protected void InicializaFechas() { DateTime FI = new DateTime(DateTime.Now.Year, 1, 1); @@ -254,6 +261,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas int CveSubProyecto = DdlSucursales.SelectedValue.ToEntero(); int CveEmpresa = UsuarioActual.CveEmpresa; int Filtro = DdlFiltro.SelectedValue.ToEntero(); + int CveUsuarioEntrega = DdlUsuarios.SelectedValue.ToEntero(); String Guia = "-1"; String FechaInicio = TxtFechaI.Text == "" ? "-1" : TxtFechaI.Text; @@ -262,7 +270,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas String FechaIngInicio = TxtFechaInicialIngreso.Text == "" ? "-1" : TxtFechaInicialIngreso.Text; String FechaIngFin = TxtFechaFinalIngreso.Text == "" ? "-1" : TxtFechaFinalIngreso.Text; - if (ObjGeneral.GetPaqueteriasGuias(CvePaqueteriaGuia, CvePaqueteriaGuiaTipo, CvePaqueteria, CveEstatus, CveSubProyecto, CveEmpresa, Guia, FechaInicio, FechaFin, FechaIngInicio, FechaIngFin, Filtro: Filtro)) + if (ObjGeneral.GetPaqueteriasGuias(CvePaqueteriaGuia, CvePaqueteriaGuiaTipo, CvePaqueteria, CveEstatus, CveSubProyecto, CveEmpresa, Guia, FechaInicio, FechaFin, FechaIngInicio, FechaIngFin, Filtro: Filtro, CveUsuarioEntrega: CveUsuarioEntrega)) { DTDatos = ObjGeneral.DtResultados; GVDatos.DataSource = DTDatos; @@ -803,6 +811,8 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas @params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); @params.Add(new ReportParameter("Filtros", String.Format(" Sucursal: {0}  Estatus: {1}  Paquetería: {2}
Fecha Inicio: {3}  Fecha Fin: {4}", Sucursal, Estatus, Paqueteria, FechaInicio, FechaFinal))); + @params.Add(new ReportParameter("FiltroUsuario", DdlUsuarios.SelectedItem.Text)); + if (Imagen.Exists) { @params.Add(new ReportParameter("LogoPath", logouri)); diff --git a/Imagenes/Bell.png b/Imagenes/Bell.png new file mode 100644 index 000000000..352602b08 Binary files /dev/null and b/Imagenes/Bell.png differ diff --git a/Inicio.aspx b/Inicio.aspx index 603783288..b45294990 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -483,43 +483,10 @@ - - -
+
+ + -<%--
-
-
- - OI -
-
-
-
-
-
-
-
- - - - -   - - - - - - -
- -
-
--%>
@@ -565,9 +532,78 @@
+
+
+
+
+
+
+
+ + Eventos +
+
+
+
+
- - +
+
+ <%-- + + + +   + + + + + --%> +
+ + Eventos +
    +
  • +
    +
    Tareas
    +
    + 0
    +
    + +
  • +
  • +
    +
    Convocatorias
    +
    + 0
    +
    + +
  • +
  • +
    +
    Minutas
    +
    + 0
    +
    + +
  • +
  • +
    +
    Proyectos
    +
    + 0
    +
    + +
  • +
+
+ +
+ +
+
+
<%-- DIRECTORIO TELEFONICO --%> @@ -739,7 +775,8 @@
-
+ +
@@ -789,7 +826,8 @@
-
+ +
@@ -1105,7 +1143,7 @@
- + diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index d81474caf..7928e67d6 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -5,19 +5,19 @@ @@ -48,7 +48,7 @@ -
  • +
  •  
  • @@ -64,10 +64,12 @@
    • Cliente: + <%----%>
    • Serie-Folio: + @@ -117,7 +119,7 @@
    - +
    @@ -172,7 +174,7 @@
    -
    Cliente: @@ -127,7 +129,7 @@
    Folio: - + <%----%>
    +
    - - - + + + - + - + + + +
    Almacén: @@ -191,7 +193,7 @@ - + @@ -214,13 +216,13 @@
    Transitorio: +
    Transitorio: -
    @@ -229,12 +231,21 @@
    - +
    +
    + + + +
    +
    @@ -269,6 +280,7 @@   + Sucursal: @@ -298,7 +310,7 @@ - + @@ -329,7 +341,7 @@ - + <%--ADVERTENCIA--%>
    @@ -341,20 +353,20 @@
    - - - - - - - - - - - - - - + + + + + + + + + + + + + +
    @@ -410,14 +422,14 @@
    -
    - -
    +
    + +
    <%--GV DATOS--%> - @@ -428,11 +440,11 @@
    - + - + @@ -440,8 +452,8 @@ - - + + @@ -450,7 +462,7 @@ - + @@ -459,12 +471,12 @@ - - - - - - + + + + + + @@ -655,7 +667,7 @@ - + @@ -699,6 +711,7 @@
    Cantidad +
    @@ -740,6 +753,7 @@ Cant.: +
    @@ -760,7 +774,7 @@ - + - +
    @@ -824,7 +838,7 @@ $('#TxtCodigoPS').focus() } - + function playsonidito(NomArchivo) { var URL = /Sonidos/ + NomArchivo @@ -833,7 +847,7 @@ snd.currentTime = 0; } - + function CantidadEspecial() { MuestraCantidadEspecial(); //$('#ModalCantidad').modal('show'); diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 6a429e8f0..d67ae98cc 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -3085,6 +3085,18 @@ Partial Class Inventarios_EntregaAlmacen #End Region +#Region "TipoEntrega" + + Protected Sub EntregaRadioGroup_Click(sender As Object, e As EventArgs) + If RbEntregaExterna.Checked Then + RegistraScript("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx',800,547,'N')") + ElseIf RbEntregaInterna.Checked Then + RegistraScript($"AbrirVentana('/General/PopUpPaqueteriasGuiasInternas.aspx?CveVenta={CveVentaSurtir}&CveSubProyecto={CveSubProyecto}',800,547,'N')") + 'CveVentaSurtir + End If + End Sub + +#End Region End Class diff --git a/Inventarios/EntregasPorRealizar.aspx b/Inventarios/EntregasPorRealizar.aspx new file mode 100644 index 000000000..9b5943b7e --- /dev/null +++ b/Inventarios/EntregasPorRealizar.aspx @@ -0,0 +1,102 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="EntregasPorRealizar.aspx.cs" Inherits="Inventarios_EntregasPorRealizar" %> + + + + + + + + + <%--Paqueterías Guías--%>Entrega Interna + + + + + + + + + + +
    +
    +
    + + +
    +
    +
    +
    PERSONAL QUE ENTREGA:
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    + + ASIGNACIÓN DE ENTREGAS +
    +
    + +
    +
    +
    + + + + +   + + + + +   + + + + + +   + + + + +   + + + + +   + + + + +
    +
    +
    +
    +
    + + diff --git a/Inventarios/EntregasPorRealizar.aspx.cs b/Inventarios/EntregasPorRealizar.aspx.cs new file mode 100644 index 000000000..bf831e4e3 --- /dev/null +++ b/Inventarios/EntregasPorRealizar.aspx.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using Extensiones; + +public partial class Inventarios_EntregasPorRealizar : ClsPaginas +{ + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + CargarEntregas(); + CargarPersonal(); + } + } + + protected void BtnAsignar_Click(object sender,EventArgs e) + { + if (DdlUsuario.SelectedValue.ToEntero() > 0) + { + bool TieneError = false; + ClsGenerales ObjGeneral = new ClsGenerales(); + ObjGeneral.IniciaTransacSQL(); + GridViewRowCollection Grid = GvPaqueteriasGuias.Rows; + + foreach (GridViewRow row in Grid) + { + if (row.FCCheckBox("ChkAsigna").Checked) + { + int CvePaqueteriasGuias = row.DataKey("CvePaqueteriaGuia").ToEntero(); + int CvePersonal = DdlUsuario.SelectedValue.ToEntero(); + + if(!ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal)){ + TieneError = true; + } + } + } + + if (!TieneError) + { + ObjGeneral.Commit(); + Alert("Entregas asignadas correctamente"); + CargarEntregas(); + UpDatos.Update(); + } + else + { + ObjGeneral.RollBack(); + } + ObjGeneral.Dispose(); + } + else + { + Alert("Seleccione a alguien del personal",ModExtensiones.TipoMensaje.MsgAdvertencia); + } + } + + private void CargarEntregas() + { + ClsGenerales ObjGeneral = new ClsGenerales(); + if (ObjGeneral.GetEntregasPorRealizar(UsuarioActual.CveEmpresa)) + { + GvPaqueteriasGuias.DataSource = ObjGeneral.DtResultados; + GvPaqueteriasGuias.DataBind(); + } + ObjGeneral.Dispose(); + } + + private void CargarPersonal() + { + DdlUsuario.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa); + DdlUsuario.DataBind(); + DdlUsuario.Items.Insert(0, new ListItem("Seleccione", "-1")); + } +} \ No newline at end of file diff --git a/OI/ConvocatoriaDetalle.aspx b/OI/ConvocatoriaDetalle.aspx index 82d14f09e..7c1aed61c 100644 --- a/OI/ConvocatoriaDetalle.aspx +++ b/OI/ConvocatoriaDetalle.aspx @@ -135,7 +135,14 @@
  • - Actualizar Participantes
  • + Actualizar Participantes + +
  • + Asistencia +
  • +
  • + Enviar correo +
  • @@ -430,7 +437,7 @@
    @@ -438,7 +445,62 @@
    - + + diff --git a/OI/ConvocatoriaDetalle.aspx.cs b/OI/ConvocatoriaDetalle.aspx.cs index 612a0ddfe..c4f84764d 100644 --- a/OI/ConvocatoriaDetalle.aspx.cs +++ b/OI/ConvocatoriaDetalle.aspx.cs @@ -11,8 +11,10 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas { #region Propiedades - public const string iddivAgregarTema = "divModalAgregartema"; + public const string iddivAgregarTema = "divModalAgregartema"; + public const string iddivTomarAsistencia = "iddivTomarAsistencia"; public const string iddivAgregarMiembros = "iddivAgregarMiembros"; + public int CveEventoMinuta { get { return ViewState["CveEventoMinuta"] != null ? ViewState["CveEventoMinuta"].ToString().ToEntero() : 0; } set { ViewState["CveEventoMinuta"] = value; } } public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } } public int RCveEventoPadre { get { return ViewState["RCveEventoPadre"] != null ? ViewState["RCveEventoPadre"].ToString().ToEntero() : 0; } set { ViewState["RCveEventoPadre"] = value; } } public bool EsNuevo { get { return Convert.ToBoolean(ViewState["EsNuevo"]); } set { ViewState["EsNuevo"] = value; } } @@ -30,18 +32,19 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas cargaUsuarios(); if (Request["CveEvento"] != null) - { - RCveEvento = Request["CveEvento"].ToString().ToEntero(); + { + RCveEvento = Request["CveEvento"].ToString().ToEntero(); } if (Request["CveEventoPadre"] != null) { - - RCveEventoPadre = Request["CveEventoPadre"].ToString().ToEntero(); + + RCveEventoPadre = Request["CveEventoPadre"].ToString().ToEntero(); } if (RCveEvento > 0) { + LnkEnviarCorreo.Visible = true; EsNuevo = false; - LnkGuardar.Visible = false; + //LnkGuardar.Visible = false; loadConvocatoria(); } } @@ -79,6 +82,8 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas { System.Data.DataRow drow = ObjOI_E.DtResultados.Rows[0]; CveEventoHijo = drow["CveEvento"].ToString().ToEntero(); + CveEventoMinuta = drow["CveEvento"].ToString().ToEntero(); + LnkOpenModalAsistencia.Visible = true; } if (ObjOI_E.GetEventos2(RCveEvento, UsuarioActual.CveEmpresa) && ObjOI_E.DtResultados.Rows.Count > 0) { @@ -87,6 +92,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas pnlmiembrosvista.Visible = true; TxtAsunto.Text = drow["Asunto"].ToString(); TxtDescripcion.Text = drow["Descripcion"].ToString(); + TxtAsistentesExternos.Text = drow["Asistencia"].ToString(); TxtDuracion.Text = drow["Duracion"].ToString(); DdlPrioridad.SelectedValueExist(drow["Prioridad"].ToString()); txtFechaI.Text = string.Format("{0:dd/MM/yyyy HH:mm}", drow["FechaInicio"]); @@ -99,7 +105,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas CveUsuarioDe = drow["CveUsuarioDe"].ToString().ToEntero(); int CveEventoEstatus = drow["CveEventoEstatus"].ToString().ToEntero(); bool permisoeditar = UsuarioActual.CveUsuario == CveUsuarioDe || UsuarioActual.CveUsuario == CveUsuarioIng; - LnkIniciar.Visible = permisoeditar && (CveEventoHijo <=0); + LnkIniciar.Visible = permisoeditar && (CveEventoHijo <= 0); HypIrMinuta.Visible = (CveEventoHijo > 0); HypIrMinuta.NavigateUrl = string.Format("/OI/MinutaDetalle.aspx?CveEvento={0}", CveEventoHijo); TxtAsunto.Enabled = permisoeditar; @@ -197,7 +203,6 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarMiembros)); LtlTituloUsuarios.Text = "Actualizar miembros"; BtnUpMiembros.Visible = true; - BtnReasignarTarea.Visible = false; DdlModera.SelectedValueExist(CveUsuarioDe.ToString()); foreach (GridViewRow gvRow in GVUsuarios.Rows) { @@ -209,8 +214,8 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas chkCCpara.Enabled = true; - if ( (CveUsuario == CveUsuarioDe)) - { + if ((CveUsuario == CveUsuarioDe)) + { if (CveUsuario == CveUsuarioDe) { chkCCpara.Checked = true; @@ -234,8 +239,8 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas { if (gvRow.RowType == DataControlRowType.DataRow) { - int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); - CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); + int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); + CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); if (chkCCpara.Checked) { listaCCP.Add(CveUsuario); @@ -271,84 +276,85 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas protected void LnkGuardar_Click(object sender, EventArgs e) { string errorMessage = ""; - if (EsNuevo) + + int cveUsuarioDe = DdlModerador.SelectedValue.ToEntero(); + List listaCCP = new List(); + int cveUsuarioPara = -1; + //string Nombrepara = ""; + string Nombrede = ""; + foreach (GridViewRow gvRow in GVUsuariosB.Rows) { - int cveUsuarioDe = DdlModerador.SelectedValue.ToEntero(); - List listaCCP = new List(); - int cveUsuarioPara = -1; - //string Nombrepara = ""; - string Nombrede = ""; - foreach (GridViewRow gvRow in GVUsuariosB.Rows) + if (gvRow.RowType == DataControlRowType.DataRow) { - if (gvRow.RowType == DataControlRowType.DataRow) + int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); + CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); + if (CveUsuario == cveUsuarioDe) { - int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); - CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); - if (CveUsuario == cveUsuarioDe) - { - Nombrede = gvRow.DataKey("Nombre").ToString(); - } - if (chkCCpara.Checked) - { - listaCCP.Add(CveUsuario); - //cveUsuarioDe = CveUsuario; - } + Nombrede = gvRow.DataKey("Nombre").ToString(); + } + if (chkCCpara.Checked) + { + listaCCP.Add(CveUsuario); + //cveUsuarioDe = CveUsuario; } } - OITipoEventos cveTipoEvento = OITipoEventos.Convocatorias; - string asunto = TxtAsunto.Text; - string descripcion = TxtDescripcion.Text; - int prioridad = DdlPrioridad.SelectedValue.ToEntero(); - string fechaInicio = ""; - if (txtFechaI.Text.ToDateTimeExcat().Year <= 1999) + } + OITipoEventos cveTipoEvento = OITipoEventos.Convocatorias; + 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) { - if (txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999) - { - errorMessage = "No se ingresó una fecha de inicio valida"; + 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"); + fechaInicio = txtFechaI.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd HH:mm"); } - string fechaFin = ""; - if (txtFechaF.Text.ToDateTimeExcat().Year <= 1999) + } + else + { + fechaInicio = txtFechaI.Text.ToDateTimeExcat().ToString("yyyy/MM/dd HH:mm"); + } + string fechaFin = ""; + DateTime dfechaF; + if ((dfechaF=txtFechaF.Text.ToDateTimeExcat()).Year <= 1999) + { + if ((dfechaF = txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy")).Year <= 1999) { - if (txtFechaF.Text.ToDateTimeExcat("dd/MM/yyyy").Year <= 1999) - { - errorMessage = "No se ingresó una fecha fin valida"; + 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"); + fechaFin = string.Format("{0:yyyy/MM/dd} 23:59", dfechaF); } - int cveRevision = DdlTema.SelectedValue.ToEntero(); - string archivoname = ""; - string rutaarchivoOri = ""; + } + else + { + fechaFin = dfechaF.ToString("yyyy/MM/dd HH:mm"); + } + int cveRevision = DdlTema.SelectedValue.ToEntero(); + string archivoname = ""; + string rutaarchivoOri = ""; - int cveUsuarioIng = UsuarioActual.CveUsuario; - int cveEmpresa = UsuarioActual.CveEmpresa; - bool Continuar = false; - int Folio = -1; - int CveEvento = -1; - - if (cveUsuarioDe <= 0) - { - errorMessage = "Asegúrese de seleccionar al menos un miembro \"C C Para\""; - } + int cveUsuarioIng = UsuarioActual.CveUsuario; + int cveEmpresa = UsuarioActual.CveEmpresa; + int Folio = -1; + int CveEvento = -1; + if (cveUsuarioDe <= 0) + { + errorMessage = "Asegúrese de seleccionar al menos un miembro \"C C Para\""; + } + if (EsNuevo) + { + bool Continuar = false; if (errorMessage.Length == 0) { @@ -356,7 +362,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas 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, CorreoExterno: TxtCorreoExterno.Text, Acuerdos: TxtOrdendeldia.Text.Replace("< ", "<"), Lugar: TxtLugar.Text,CveEventoPadre: (RCveEventoPadre>0? RCveEventoPadre:-1),Duracion:TxtDuracion.Text); + Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, CorreoExterno: TxtCorreoExterno.Text, Acuerdos: TxtOrdendeldia.Text.Replace("< ", "<"), Lugar: TxtLugar.Text, CveEventoPadre: (RCveEventoPadre > 0 ? RCveEventoPadre : -1), Duracion: TxtDuracion.Text); CveEvento = objOI.CveEvento; Folio = objOI.Folio; @@ -367,7 +373,8 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas if (Continuar) { objOI.Commit(); - ObjEventosCorreo o = objOI.objCorreo; + enviarConvocatoria(CveEvento); + //ObjEventosCorreo o = objOI.objCorreo; //string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, string.Format("{0:dd/MM/yyyy}", fechaInicio.ToDateTime()), string.Format("{0:HH:mm horas}", fechaInicio.ToDateTime()), string.Format("{0:dd/MM/yyyy}", fechaFin.ToDateTime()), string.Format("{0:HH:mm horas}", fechaFin.ToDateTime()), o.Prioridad, o.Tema, Nombrede, Nombrepara); //EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, ""); } @@ -400,77 +407,29 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas } else { + + bool Continuar = true; + using (ClsOIEventos objOI = new ClsOIEventos()) + { + objOI.IniciaTransacSQL(); + Continuar = objOI.UP_Eventos2(RCveEvento, asunto, descripcion, prioridad, fechaInicio, fechaFin, cveRevision, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); + if (Continuar) + { - //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(); - //bool Continuar = true; - //using (ClsOIEventos objOI = new ClsOIEventos()) - //{ - // objOI.IniciaTransacSQL(); - // Continuar = objOI.UP_Eventos2(RCveEvento, asunto, descripcion, prioridad, fechaInicio, fechaFin, cveRevision, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); - - // if (Continuar) - // { - // objOI.Commit(); - // string Nombrede = ""; - // string Nombrepara = ""; - // System.Data.DataTable dt = get_GlobalDTUsuarios(CveUsuario: CveUsuarioDe, CveEmpresa: UsuarioActual.CveEmpresa); - // if (dt.Rows.Count > 0) - // { - // Nombrede = dt.Rows[0]["Nombre"].ToString(); - // } - // dt = get_GlobalDTUsuarios(CveUsuario: CveUsuarioDe, CveEmpresa: UsuarioActual.CveEmpresa); - // if (dt.Rows.Count > 0) - // { - // Nombrepara = dt.Rows[0]["Nombre"].ToString(); - // } - // ObjEventosCorreo o = objOI.objCorreo; - // string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, string.Format("{0:dd/MM/yyyy}", fechaInicio.ToDateTime()), string.Format("{0:HH:mm} horas", fechaInicio.ToDateTime()), string.Format("{0:dd/MM/yyyy}", fechaFin.ToDateTime()), string.Format("{0:HH:mm} horas", fechaFin.ToDateTime()), o.Prioridad, o.Tema, Nombrede, Nombrepara, "Tarea Actualizada"); - // //string mailbody = MailgetBodyActualizartarea(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; - // } - //} + Continuar= objOI.UpdateEventoMinuta(asunto, descripcion, TxtOrdendeldia.Text.Replace("< ", "<"), dfechaF, "-1", RCveEvento); + } + if (Continuar) + { + objOI.Commit(); + enviarConvocatoria(RCveEvento); + Alert("Convocatoria actualizada"); + } + else + { + objOI.RollBack(); + Continuar = false; + } + } } if (errorMessage.Length > 0) @@ -534,8 +493,8 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas System.Data.DataRow drow = ObjOI_E.DtResultados.Rows[0]; ObjOI_E.IniciaTransacSQL(); Continuar = ObjOI_E.AddOI_Eventos2(OITipoEventos.Minuta, drow["Asunto"].ToString(), drow["descripcion"].ToString(), drow["Prioridad"].ToString().ToEntero(), drow["cveUsuarioDe"].ToString().ToEntero(), - drow["cveUsuarioPara"].ToString().ToEntero(), string.Format("{0:yyyy/MM/dd HH:mm}", drow["fechaInicio"]),string.Format("{0:yyyy/MM/dd HH:mm}", drow["fechaFin"]), drow["cveRevision"].ToString().ToEntero(), "", - LCveUsuarioCCP, new List(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CorreoExterno: drow["CorreoExterno"].ToString(), Lugar: drow["Lugar"].ToString(),CveEventoPadre:RCveEvento); + drow["cveUsuarioPara"].ToString().ToEntero(), string.Format("{0:yyyy/MM/dd HH:mm}", drow["fechaInicio"]), string.Format("{0:yyyy/MM/dd HH:mm}", drow["fechaFin"]), drow["cveRevision"].ToString().ToEntero(), "", + LCveUsuarioCCP, new List(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CorreoExterno: drow["CorreoExterno"].ToString(), Lugar: drow["Lugar"].ToString(), CveEventoPadre: RCveEvento); CveEvento = ObjOI_E.CveEvento; Folio = ObjOI_E.Folio; if (CveEvento == 0) @@ -557,13 +516,226 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas } if (Continuar) { - this.Alert("Se ha agregadó la nueva convocatoria", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/MinutaDetalle.aspx?CveEvento={0}\");", CveEvento)); - + CveEventoMinuta = CveEvento; + LnkOpenModalAsistencia.Visible = true; + UpAcciones.Update(); + this.Alert(string.Format("Se ha iniciado la minuta
    para ir a la minuta click aquí", CveEvento), ModExtensiones.TipoMensaje.ToastInformacion, "", 0); + LnkOpenModalAsistencia_Click(null,null); } } - protected void BtnReasignarTarea_Click(object sender, EventArgs e) + protected void LnkOpenModalAsistencia_Click(object sender, EventArgs e) + { + using (ClsOIEventos ObjOI_E = new ClsOIEventos()) + { + GvTomarAsistencia.DataSource = null; + if (ObjOI_E.GetEventosUsuario2(CveEventoMinuta, UsuarioActual.CveEmpresa)) { GvTomarAsistencia.DataSource = ObjOI_E.DtResultados; } + } + GvTomarAsistencia.DataBind(); + UpTomarASistencia.Update(); + RegistraScript(string.Format("$('#{0}').modal();", iddivTomarAsistencia)); + } + + protected void LnkUpAsistencia_Click(object sender, EventArgs e) { + List listaasistencia = new List(); + foreach (GridViewRow gvRow in GvTomarAsistencia.Rows) + { + if (gvRow.RowType == DataControlRowType.DataRow) + { + int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); + CheckBox ChkAsistio = gvRow.FCCheckBox("ChkAsistio"); + if (ChkAsistio.Checked) + { + listaasistencia.Add(CveUsuario); + } + } + } + bool continuar = false; + using (ClsOIEventos ObjOI_E = new ClsOIEventos()) + { + continuar = (ObjOI_E.UPMinutasAsistentes(CveEventoMinuta, UsuarioActual.CveEmpresa, TxtAsistentesExternos.Text, UsuarioActual.CveUsuario, listaasistencia)); + } + if (continuar) + { + if (CveEventoMinuta > 0) + { + Alert(string.Format("se ingresó la asistencia correctamente.
    para ir a la minuta click aquí", CveEventoMinuta)); + } + else + { + Alert("se ingresó la asistencia correctamente."); + + } + RegistraScript(string.Format("$('#{0}').modal('hide');", iddivTomarAsistencia)); + } + } + + protected void GvTomarAsistencia_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + e.Row.CssClass = "items"; + } + } + + + private string GetDominio(string addstr = "") + { + return string.Format("{0}/{1}", HttpContext.Current.Request.Url.ToString().Replace(HttpContext.Current.Request.Url.PathAndQuery, ""), addstr); + } + private string MailgetBodyConvocatoria(int RCveEvento) + { + + int Folio = 0; string Link = ""; string Asunto = ""; string Acuerdos = ""; string Descripcion = ""; DateTime DFechai = DateTime.MinValue; DateTime DFechaf = DateTime.MinValue; + string UsuarioDe = ""; + string UsuarioPara = ""; + string UsuarioDeAbr = ""; + System.Data.DataTable dttareas; + using (ClsOIEventos ObjOI_E = new ClsOIEventos()) + { + if (ObjOI_E.GetEventos2(RCveEvento, UsuarioActual.CveEmpresa) && ObjOI_E.DtResultados.Rows.Count > 0) + { + System.Data.DataRow drow = ObjOI_E.DtResultados.Rows[0]; + UsuarioDe = drow["NombreRegistro"].ToString(); + Folio = drow["Folio"].ToString().ToEntero(); + Link = GetDominio(string.Format("OI/ConvocatoriaDetalle.aspx?CveEvento={0}", RCveEvento)); + Asunto = drow["Asunto"].ToString(); + Descripcion = drow["Descripcion"].ToString(); + Acuerdos = drow["Acuerdos"].ToString(); + DateTime.TryParse(drow["FechaInicio"].ToString(), out DFechai); + DateTime.TryParse(drow["FechaFin"].ToString(), out DFechaf); + //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] NombreRegistro + } + ObjOI_E.GetEventos2(-1, UsuarioActual.CveEmpresa, RCveEvento); + dttareas = ObjOI_E.DtResultados; + } + if (UsuarioDe != null) + { + string[] str = UsuarioDe.Split(' '); + if (str.Length > 0 && str[0].Length > 0) + { + UsuarioDeAbr = str[0].Substring(0, 1).ToUpper(); + } + if (str.Length > 1 && str[1].Length > 0) + { + UsuarioDeAbr = string.Format("{0}{1}", UsuarioDeAbr, str[1].Substring(0, 1).ToUpper()); + + } + } + string UsuariParaAbr = ""; + if (UsuarioPara != null) + { + string[] str = UsuarioPara.Split(' '); + if (str.Length > 0 && str[0].Length > 0) + { + UsuariParaAbr = str[0].Substring(0, 1).ToUpper(); + } + if (str.Length > 1 && str[1].Length > 0) + { + UsuariParaAbr = string.Format("{0}{1}", UsuariParaAbr, str[1].Substring(0, 1).ToUpper()); + + } + } + + StringBuilder StrMail = new StringBuilder(); + StrMail.Append(""); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append("
    SIG Notificaciones
    "); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append(" "); + StrMail.Append(" "); + StrMail.Append(" "); + StrMail.Append(" "); + StrMail.Append(" "); + StrMail.Append(" "); + StrMail.Append("
    "); + StrMail.Append(" Moderador:"); + StrMail.Append($" {UsuarioDeAbr}"); + StrMail.Append($" {UsuarioDe}
    "); + StrMail.Append(" Fecha:"); + StrMail.Append($" {DFechai: dd} de {DFechai: MMMM yyyy HH:mm}
    "); + StrMail.Append("
    "); + StrMail.Append(" Convocatoria "); + StrMail.Append(" "); + StrMail.Append(" "); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append(""); + StrMail.Append("
    "); + StrMail.Append($" {Asunto}"); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append(" Folio:"); + StrMail.Append($" {Folio}"); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append($" {Descripcion}"); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append(" ORDEN DEL DÍA"); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append(Acuerdos); + StrMail.Append("
    "); + StrMail.Append("
    "); + + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append($" Minuta"); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append("
    "); + StrMail.Append(""); + return StrMail.ToString(); + } + private void enviarConvocatoria(int RCveEvento) + { + + string Body; + Body = MailgetBodyConvocatoria(RCveEvento); + string ArrayCC = ""; + //ViewState("Para") = GlobalDTUsuarios(CveUsuarioIng)(0)("correo").ToString; + //ViewState("Asunto") = string.Format("SIG - Minuta {0}", TxtAsunto.Text); + //ViewState("Body") = Body; + //System.Threading.Thread Hilo = new System.Threading.Thread(MandaCorreo); + //Hilo.Start(); + string abre = ""; + using (ClsOIEventos ObjOI_E = new ClsOIEventos()) + { + if (ObjOI_E.GetEventosUsuario2(RCveEvento, UsuarioActual.CveEmpresa) && ObjOI_E.DtResultados != null && ObjOI_E.DtResultados.Rows.Count > 0) + { + foreach (System.Data.DataRow item in ObjOI_E.DtResultados.Rows) + { + if (item["Correo"].ToString().Trim().Length > 0) + ArrayCC = string.Format("{0}{1}{2}", ArrayCC, abre, item["Correo"].ToString().Trim()); + abre = ";"; + } + } + } + List LSRutasMail = new List(); + ClsSisMail.ArchivoMail mailfile = new ClsSisMail.ArchivoMail { Ruta = string.Format("{0}Imagenes\\Bell.png", ModExtensiones.DirectorioBaseEmpresas), NombreArchivo = "Bell.png" }; + LSRutasMail.Add(mailfile); + ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail(); + + + ClsSisMail Mail = new ClsSisMail(); + Mail.SendMail(EmpresaNotificaciones, get_GlobalDTUsuarios(UsuarioActual.CveUsuario).Rows[0]["correo"].ToString() + TxtCorreoExterno.Text, TxtAsunto.Text, Body, CCP: ArrayCC, Archivos: LSRutasMail); + } + protected void LnkEnviarCorreo_Click(object sender, EventArgs e) + { + enviarConvocatoria(RCveEvento); + Alert("Se Envió por correo la convocatoria", ModExtensiones.TipoMensaje.MsgInformacion); } } \ No newline at end of file diff --git a/OI/MinutaDetalle.aspx b/OI/MinutaDetalle.aspx index 63e0682ff..b0b1d6b1d 100644 --- a/OI/MinutaDetalle.aspx +++ b/OI/MinutaDetalle.aspx @@ -519,7 +519,7 @@
    - Agregar + Agregar
    @@ -528,12 +528,12 @@
    - +
    - +
    @@ -547,7 +547,7 @@
    - + <%----%> @@ -569,7 +569,7 @@