-
This commit is contained in:
@@ -2836,7 +2836,7 @@ Public Class ClsOIEventos
|
||||
#End Region
|
||||
|
||||
#Region "OI_DocumentosSubCategoria"
|
||||
Public Function GetDocumentoSubCategoria(Optional CveSubCategoria As Integer = -1, Optional SubCategoria As String = "-1") As Boolean
|
||||
Public Function GetDocumentoSubCategoria(Optional CveSubCategoria As Integer = -1, Optional SubCategoria As String = "-1", Optional CveCategoria As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -2845,6 +2845,7 @@ Public Class ClsOIEventos
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveSubCategoria", SqlDbType.Int).Value = CveSubCategoria
|
||||
.Add("@SubCategoria", SqlDbType.NVarChar).Value = SubCategoria
|
||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4627,7 +4627,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/OI/CatDocumentoCategoria.aspx".ToUpper(), 760)
|
||||
PaginaDict.Add("/OI/CatDocumentoSubCategoria.aspx".ToUpper(), 761)
|
||||
PaginaDict.Add("/OI/Documentos.aspx".ToUpper(), 762)
|
||||
PaginaDict.Add("/OI/DocumentoDetalle.aspx".ToUpper(), 763)
|
||||
PaginaDict.Add("/OI/DocumentoDetalle.aspx".ToUpper(), -1)
|
||||
#End Region
|
||||
#Region "Planeacion"
|
||||
'PLANEACIÓN
|
||||
|
||||
@@ -1444,9 +1444,9 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Concepto", ConceptoFormato))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("CveTipoAlmacen", Almacen))
|
||||
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0, dr("SerieFolio").ToString, "")))
|
||||
|
||||
@@ -1456,6 +1456,10 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 72 Then
|
||||
params.Add(New ReportParameter("CveTipoAlmacen", CveTipoAlmacen.ToString()))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
|
||||
@@ -1295,6 +1295,7 @@
|
||||
</GroupExpressions>
|
||||
<PageBreak>
|
||||
<BreakLocation>End</BreakLocation>
|
||||
<ResetPageNumber>true</ResetPageNumber>
|
||||
</PageBreak>
|
||||
<Variables>
|
||||
<Variable Name="UsuarioRegistro">
|
||||
@@ -1331,9 +1332,11 @@
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<PageBreak>
|
||||
<BreakLocation>End</BreakLocation>
|
||||
<ResetPageNumber>true</ResetPageNumber>
|
||||
</PageBreak>
|
||||
<Top>0.05076cm</Top>
|
||||
<Height>3.18542cm</Height>
|
||||
@@ -1642,7 +1645,8 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox35</rd:DefaultName>
|
||||
<Left>17.03312cm</Left>
|
||||
<Top>0.26458cm</Top>
|
||||
<Left>16.57041cm</Left>
|
||||
<Height>0.52564cm</Height>
|
||||
<Width>2.8175cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
@@ -1790,7 +1794,8 @@
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<Code>REM Reset Page Number:
|
||||
<Code>
|
||||
REM Reset Page Number:
|
||||
Shared offset As Integer
|
||||
Shared newPage As Object
|
||||
Shared currentgroup1 As Object
|
||||
@@ -1822,7 +1827,8 @@
|
||||
End If
|
||||
End If
|
||||
Return newPage
|
||||
End Function</Code>
|
||||
End Function
|
||||
</Code>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="jam3">
|
||||
<MIMEType>image/jpeg</MIMEType>
|
||||
|
||||
@@ -812,25 +812,28 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
int CveVendedor = ObjVentas.DtResultados.Rows[0]["CveVendedor"].ToEntero();
|
||||
int CveCliente = ObjVentas.DtResultados.Rows[0]["CveCliente"].ToEntero();
|
||||
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}",CveVendedor));
|
||||
DataRow VendedorAsistente = get_GlobalDTVendedores(UsuarioActual.CveEmpresa,VendedorTipo:3).FiltroPrimero(string.Format("CveSuperior = {0}", CveVendedor));
|
||||
DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente : CveCliente).FiltroPrimero("");
|
||||
string CobranzaCorreo = "";
|
||||
string CorreoEntregaAlmacen = "";
|
||||
string CorreoEntregaCompras = "";
|
||||
string CorreoVendedor = "";
|
||||
string CorreoAdicionalNotificacionesVendedor = "";
|
||||
string CorreoNotificaciones = ObjVentas.DtResultados.Rows[0]["CorreoNotificacion"] != null ? ObjVentas.DtResultados.Rows[0]["CorreoNotificacion"].ToString():"";
|
||||
string CorreoAsistente = "";
|
||||
|
||||
if (Cliente != null) {
|
||||
CobranzaCorreo=Cliente["CobranzaCorreo"].ToString();
|
||||
CorreoEntregaAlmacen=Cliente["CorreoEntregaAlmacen"].ToString();
|
||||
CorreoEntregaCompras = Cliente["CorreoEntregaCompras"].ToString();
|
||||
}
|
||||
if (Vendedor != null)
|
||||
{
|
||||
CorreoVendedor=Vendedor["Correo"].ToString();
|
||||
CorreoAdicionalNotificacionesVendedor=Vendedor["CorreoAdicionalNotificaciones"].ToString();
|
||||
//CorreoAdicionalNotificacionesVendedor=Vendedor["CorreoAdicionalNotificaciones"].ToString();
|
||||
}
|
||||
|
||||
string CorreosConcat = String.Format("{0};{1};{2};{3};{4}", CobranzaCorreo, CorreoEntregaAlmacen, CorreoEntregaCompras, CorreoVendedor, CorreoAdicionalNotificacionesVendedor);
|
||||
if (VendedorAsistente != null)
|
||||
{
|
||||
CorreoAsistente = VendedorAsistente["Correo"].ToString();
|
||||
}
|
||||
string CorreosConcat = String.Format("{0};{1};{2};{3};{4}", CorreoEntregaAlmacen, CorreoEntregaCompras, CorreoVendedor, CorreoNotificaciones, CorreoAsistente);
|
||||
return CorreosConcat;
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
|
||||
@@ -175,6 +175,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
ViewState["Folio"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1008,6 +1009,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
|
||||
int CveCliente = DbRowVenta["CveCliente"].ToString().ToEntero();
|
||||
int CveVendedor = DbRowVenta["CveVendedor"].ToString().ToEntero();
|
||||
string CorreoNotificacion = DbRowVenta["CorreoNotificacion"] != null ? DbRowVenta["CorreoNotificacion"].ToString():"";
|
||||
SerieFolio = String.Format("{0}-{1}", DbRowVenta["Serie"].ToString(), DbRowVenta["Folio"].ToString().ToEntero());
|
||||
NombreCliente = DbRowVenta["ClienteNombre"].ToString();
|
||||
|
||||
@@ -1027,7 +1029,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
Destinatario = "sig.buzon02@gmail.com"; // CORREO PRUEBA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(280) == "1" && CveCliente > 0 && CveVendedor > 0)
|
||||
{
|
||||
Destinatario = getCorreoNotificacion(CveCliente, CveVendedor);
|
||||
Destinatario = getCorreoNotificacion(CveCliente, CveVendedor,CorreoNotificacion);
|
||||
}
|
||||
|
||||
if (ObjVentas.GetVentaDetalle(CveVenta))
|
||||
@@ -1037,20 +1039,24 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
|
||||
}
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private string getCorreoNotificacion(int CveCliente, int CveVendedor)
|
||||
private string getCorreoNotificacion(int CveCliente, int CveVendedor,string CorreoNotificacion)
|
||||
{
|
||||
DataRow DatosCliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}", CveCliente));
|
||||
DataRow DatosVendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}", CveVendedor));
|
||||
string CorreoAsistente = get_GlobalDTVendedores(UsuarioActual.CveEmpresa,VendedorTipo:3).FiltroPrimeroValor("Correo", string.Format("CveSuperior = {0}", CveVendedor));
|
||||
if (DatosCliente != null && DatosVendedor != null)
|
||||
{
|
||||
StringBuilder correos = new StringBuilder("");
|
||||
if (DatosCliente["CorreoEntregaCompras"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaCompras"].ToString()));
|
||||
if (DatosCliente["CorreoEntregaAlmacen"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaAlmacen"].ToString()));
|
||||
if (DatosVendedor["Correo"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["Correo"].ToString()));
|
||||
if (DatosVendedor["CorreoAdicionalNotificaciones"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["CorreoAdicionalNotificaciones"].ToString()));
|
||||
correos.Append(CorreoNotificacion + ";");
|
||||
correos.Append(CorreoAsistente + ";");
|
||||
//if (DatosVendedor["CorreoAdicionalNotificaciones"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["CorreoAdicionalNotificaciones"].ToString()));
|
||||
return correos.ToString();
|
||||
}
|
||||
return "";
|
||||
@@ -1104,7 +1110,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
string detalle = string.Format("<tr><td style='width:25%'>{0}</td><td style='width:25%'>{1}</td><td style='width:50%'>{2}</td></tr>", dRow["Codigo"], dRow["Cantidad"], dRow["PS"]);
|
||||
DetalleTable += detalle;
|
||||
}
|
||||
|
||||
CargaDatosCorreo(CveVenta);
|
||||
StringBuilder strBody = new StringBuilder();
|
||||
strBody.Append("<html>");
|
||||
strBody.Append("<head>");
|
||||
|
||||
@@ -3222,14 +3222,17 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim Destinatario As String = ""
|
||||
Dim MensajeEnviado = False
|
||||
Dim tCvecliente As Integer
|
||||
Dim tCveVendedor As Integer
|
||||
Dim bytes() As Byte = Nothing
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
|
||||
Dim strBody As New StringBuilder
|
||||
If ObjVentas.GetVenta(tCveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = ObjVentas.DtResultados.FiltroPrimero("")
|
||||
Destinatario = String.Format("{0};{1}", dr("CorreoNotificacion"), dr("CorreoVendedorVenta"))
|
||||
|
||||
tCveVendedor = dr("CveVendedor").ToString.ToEntero
|
||||
Dim CorreoVendedor As String = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo", String.Format("CveVendedor = {0}", tCveVendedor))
|
||||
Dim CorreoAsistente As String = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=3).FiltroPrimeroValor("Correo", String.Format("CveSuperior = {0}", CveVendedor))
|
||||
Destinatario = String.Format("{0};{1};{2}", dr("CorreoNotificacion"), CorreoVendedor, CorreoAsistente)
|
||||
tCvecliente = dr("CveCliente").ToString.ToEntero
|
||||
|
||||
Dim drC As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=tCvecliente).FiltroPrimero("")
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<asp:GridView ID="GvPaqueteriasGuias" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePaqueteriaGuia,Folio,SerieFolio,FechaIng,Nombre,Contacto,Estatus,CobranzaCorreo,CorreoEntregaAlmacen,CorreoEntregaCompras,Correo,CorreoAdicionalNotificaciones,CveVenta,PedidoContrato,OrdenCompra,NombreComercial,TipoDocto"
|
||||
DataKeyNames="CvePaqueteriaGuia,Folio,SerieFolio,FechaIng,Nombre,Contacto,Estatus,CobranzaCorreo,CorreoEntregaAlmacen,CorreoEntregaCompras,Correo,CorreoAdicionalNotificaciones,CveVenta,PedidoContrato,OrdenCompra,NombreComercial,TipoDocto,CorreoNotificacion,CveVendedor"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
|
||||
@@ -199,13 +199,14 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
||||
|
||||
private void MandarNotificacionCorreo(GridViewRow row)
|
||||
{
|
||||
string CobranzaCorreo = row.DataKey("CobranzaCorreo");
|
||||
string CorreoEntregaAlmacen = row.DataKey("CorreoEntregaAlmacen");
|
||||
string CorreoEntregaCompras = row.DataKey("CorreoEntregaCompras");
|
||||
string CorreoVendedor = row.DataKey("Correo");
|
||||
string CorreoAdicionalNotificacionesVendedor = row.DataKey("CorreoAdicionalNotificaciones");
|
||||
string CorreoNotificacion = row.DataKey("CorreoNotificacion");
|
||||
int CveVendedor = row.DataKey("CveVendedor").ToEntero();
|
||||
string CorreoAsistente = get_GlobalDTVendedores(UsuarioActual.CveEmpresa,VendedorTipo:3).FiltroPrimeroValor("Correo",string.Format("CveSuperior = {0}", CveVendedor));
|
||||
|
||||
string Para = string.Format("{0};{1};{2};{3}", CorreoVendedor, CorreoAdicionalNotificacionesVendedor, CobranzaCorreo, CorreoEntregaCompras);
|
||||
string Para = string.Format("{0};{1};{2};{3};{4}", CorreoVendedor, CorreoNotificacion, CorreoEntregaCompras,CorreoEntregaAlmacen,CorreoAsistente);
|
||||
string LogCorreo = string.Format("{0} -- {1} --- {2}", "Tipo de entrega", CorreoEntregaAlmacen, Para);
|
||||
LogCorreo.GuardaLog();
|
||||
|
||||
|
||||
@@ -13,163 +13,172 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<%--<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarDocumento" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Documento"></asp:LinkButton>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LkbNuevaVersion" OnClick="LkbNuevaVersion_Click" data-toggle="tooltip" data-placement="left" title="Agregar una nueva versión de este documento" Text="<i class='fa fa-plus'></i>Crear Nueva Versión"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="LbPruebas" OnClick="LbPruebas_Click" data-toggle="tooltip" data-placement="left" title="Agregar una nueva versión de este documento" Text="<i class='fa fa-plus'></i>Pruebas"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir Excel</asp:LinkButton>
|
||||
</li>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpCliente" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="width: 100%;">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-top: 0px; margin-top: -5px;">
|
||||
<div class="row form-group" style="width: 100%">
|
||||
<asp:UpdatePanel ID="UpDerecha" runat="server" UpdateMode="Conditional" class="col-md-2" style="width: 50%;">
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblDescripción" Text="Descripción" />
|
||||
<asp:TextBox runat="server" ID="TxtDescripcion" class="form-control" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtDescripcion" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpDoc"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblSubCategoria" Text="Subcategoría" /><br />
|
||||
<asp:DropDownList runat="server" ID="DdlSubCategoria" CssClass="select2me" Style="width: 30%" DataValueField="CveSubCategoria" DataTextField="SubCategoria">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblEstatus" Text="Estatus" /><br />
|
||||
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Style="width: 30%">
|
||||
<asp:ListItem Value="1" Text="En Proceso" />
|
||||
<asp:ListItem Value="2" Text="Aprobado" />
|
||||
<asp:ListItem Value="1" Text="Rechazado" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblVersion" Text="Versión" />
|
||||
<asp:TextBox runat="server" ID="TxtVersion" class="form-control" Style="width: 30%" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtVersion" runat="server" ControlToValidate="TxtVersion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Versión''</b> es necesario, por favor ingréselo." ValidationGroup="GrpDoc"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblResponsable" Text="Responsable" />
|
||||
<asp:TextBox runat="server" ID="TxtResponsable" class="form-control" Style="width: 50%" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtResponsable" runat="server" ControlToValidate="TxtResponsable" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Responsable''</b> es necesario, por favor ingréselo." ValidationGroup="GrpDoc"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblObs" Text="Observaciones" />
|
||||
<textarea runat="server" id="TxtObs" class="form-control" style="border: 1px solid #e5e5e5" rows="2"></textarea>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<div runat="server" id="DivFileDropZone">
|
||||
<asp:Label runat="server" ID="LblDocumentoFile" Text="Documento" />
|
||||
<asp:TextBox ID="TxtDocumentoFile" CssClass="ADSdropzone hidden" runat="server" Style="height: 100px"></asp:TextBox>
|
||||
</div>
|
||||
<div runat="server" id="DivDescargarArchivo" visible="false">
|
||||
<asp:Label runat="server" ID="LblDocumentoCargado" Text="Documento cargado:" />
|
||||
<asp:LinkButton runat="server" ID="LkbDescargarArchivo" Text="" OnClick="LkbDescargarArchivo_Click" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LkbDescargarArchivo" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpIzquierda" runat="server" UpdateMode="Conditional" class="col-md-2" style="width: 50%;">
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; height: 150px; text-align: center">
|
||||
<asp:Label runat="server" ID="LblUsuarios" Text="Usuarios" Font-Size="14px" /><br />
|
||||
<div style="display:table;width:100%">
|
||||
<asp:UpdatePanel ID="UpCliente" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="width: 100%;">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-top: 0px; margin-top: -5px;">
|
||||
<div class="row form-group" style="width: 100%">
|
||||
<asp:UpdatePanel ID="UpDerecha" runat="server" UpdateMode="Conditional" class="col-md-2" style="width: 50%;">
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblDescripción" Text="Descripción" />
|
||||
<asp:TextBox runat="server" ID="TxtDescripcion" class="form-control" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtDescripcion" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpDoc"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblCategoria" Text="Categoría" /><br />
|
||||
<asp:DropDownList runat="server" ID="DdlCategoria" CssClass="select2me" Style="width: 30%" DataValueField="CveCategoria" DataTextField="Categoria" OnSelectedIndexChanged="DdlCategoria_SelectedIndexChanged" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblSubCategoria" Text="Subcategoría" /><br />
|
||||
<asp:DropDownList runat="server" ID="DdlSubCategoria" CssClass="select2me" Style="width: 30%" DataValueField="CveSubCategoria" DataTextField="SubCategoria">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px" runat="server" id="DivEstatusInicial">
|
||||
<asp:Label runat="server" ID="Label3" Text="Estatus: En Proceso" /><br />
|
||||
</div>
|
||||
<br runat="server" id="brEstatusInicial"/>
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px" runat="server" id="DivEstatus" visible="false">
|
||||
<asp:Label runat="server" ID="LblEstatus" Text="Estatus" /><br />
|
||||
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Style="width: 30%">
|
||||
<asp:ListItem Value="1" Text="En Proceso" />
|
||||
<asp:ListItem Value="2" Text="Aprobado" />
|
||||
<asp:ListItem Value="3" Text="Rechazado" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<br runat="server" id="brEstatus" visible="false"/>
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblVersion" Text="Versión" />
|
||||
<asp:TextBox runat="server" ID="TxtVersion" class="form-control" Style="width: 30%" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtVersion" runat="server" ControlToValidate="TxtVersion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Versión''</b> es necesario, por favor ingréselo." ValidationGroup="GrpDoc"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblResponsable" Text="Responsable" />
|
||||
<asp:TextBox runat="server" ID="TxtResponsable" class="form-control" Style="width: 50%" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtResponsable" runat="server" ControlToValidate="TxtResponsable" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Responsable''</b> es necesario, por favor ingréselo." ValidationGroup="GrpDoc"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblObs" Text="Observaciones" />
|
||||
<textarea runat="server" id="TxtObs" class="form-control" style="border: 1px solid #e5e5e5" rows="2"></textarea>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<div runat="server" id="DivFileDropZone">
|
||||
<asp:Label runat="server" ID="LblDocumentoFile" Text="Documento" />
|
||||
<asp:TextBox ID="TxtDocumentoFile" CssClass="ADSdropzone hidden" runat="server" Style="height: 100px"></asp:TextBox>
|
||||
</div>
|
||||
<div runat="server" id="DivDescargarArchivo" visible="false">
|
||||
<asp:Label runat="server" ID="LblDocumentoCargado" Text="Documento cargado:" />
|
||||
<asp:LinkButton runat="server" ID="LkbDescargarArchivo" Text="" OnClick="LkbDescargarArchivo_Click" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LkbDescargarArchivo" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpIzquierda" runat="server" UpdateMode="Conditional" class="col-md-2" style="width: 50%;">
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; height: 200px; text-align: center">
|
||||
<asp:Label runat="server" ID="LblUsuarios" Text="Usuarios" Font-Size="14px" /><br />
|
||||
<br />
|
||||
<div class="text-right" style="">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvUsuarios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4; border: 1px solid #e5e5e5" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvUsuarios.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatosUsuarios" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvUsuarios" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario,Usuario,Correo" EmptyDataText="No se encontraron Categorías de Documentos Registrados"
|
||||
ToolTip="Listado de Categorías de Documentos" CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center; width: 100%; overflow-x: hidden"
|
||||
GridLines="None" OnRowDataBound="GvUsuarios_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Unir">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="ChkUnir" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aprobar" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="ChkAprobar" OnCheckedChanged="ChkAprobar_Checked" AutoPostBack="true" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Propuesta" Visible="false" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="width:50%;text-align:right;padding-right:unset">
|
||||
<asp:LinkButton runat="server" ID="LkbSubirPropuesta" OnClick="LkbSubirPropuesta_Click" AlternateText="Subir" CausesValidation="False" s CssClass="btn btn-circle btn-sm green" Text="<i title='Subir Documento' class='fa fa-upload' title='Subir Documento' ></i>" />
|
||||
</div>
|
||||
<div class="col-md-4" style="width:50%;text-align:left;;padding-right:unset">
|
||||
<asp:LinkButton runat="server" ID="LkbDescargarPropuesta" OnClick="LkbDescargarPropuesta_Click" AlternateText="Descargar" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" CssStyle="" Text="<i title='Subir Documento' class='fa fa-download' title='Descargar Documento' ></i>" />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="text-align: center; width: 100%" runat="server" id="DivBotonesAcciones">
|
||||
<br />
|
||||
<div class="text-right" style="">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvUsuarios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4; border: 1px solid #e5e5e5" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvUsuarios.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatosUsuarios" runat="server" UpdateMode="Conditional">
|
||||
<asp:LinkButton runat="server" ID="LkbGuardar" OnClick="LblGuardar_Click" Text="Guardar" class="btn btn-primary" ValidationGroup="GrpDoc" />
|
||||
<asp:LinkButton runat="server" ID="LkbActualizar" OnClick="LbkActualizar_Click" Text="Actualizar" class="btn btn-primary" ValidationGroup="GrpDoc" Visible="false" />
|
||||
<asp:LinkButton runat="server" ID="LkbPublicar" OnClick="LkbPublicar_Click" Text="Publicar" class="btn btn-primary" ValidationGroup="GrpDoc" visible="false"/>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivAgregarPropuesta" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvUsuarios" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario,Usuario,Correo" EmptyDataText="No se encontraron Categorías de Documentos Registrados"
|
||||
ToolTip="Listado de Categorías de Documentos" CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center; width: 100%; overflow-x: hidden"
|
||||
GridLines="None" OnRowDataBound="GvUsuarios_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Unir">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="ChkUnir" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aprobar" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="ChkAprobar" OnCheckedChanged="ChkAprobar_Checked" AutoPostBack="true" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Propuesta" Visible="false" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="width:50%;text-align:right;padding-right:unset">
|
||||
<asp:LinkButton runat="server" ID="LkbSubirPropuesta" OnClick="LkbSubirPropuesta_Click" AlternateText="Subir" CausesValidation="False" s CssClass="btn btn-circle btn-sm green" Text="<i title='Subir Documento' class='fa fa-upload' title='Subir Documento' ></i>" />
|
||||
</div>
|
||||
<div class="col-md-4" style="width:50%;text-align:left;;padding-right:unset">
|
||||
<asp:LinkButton runat="server" ID="LkbDescargarPropuesta" OnClick="LkbDescargarPropuesta_Click" AlternateText="Descargar" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" CssStyle="" Text="<i title='Subir Documento' class='fa fa-download' title='Descargar Documento' ></i>" />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Propuesta:</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:Label runat="server" ID="Label1" Text="Subir Archivo de Propuesta:" style="font-size:15px"/>
|
||||
<br />
|
||||
<asp:TextBox ID="TxtArchivoPropuesta" CssClass="ADSdropzone hidden" runat="server" Style="height: 100px"></asp:TextBox>
|
||||
<br />
|
||||
<asp:Label runat="server" ID="Label2" Text="Comentarios:" style="font-size:15px"/>
|
||||
<textarea runat="server" id="TxtComentarios" class="form-control" style="border: 1px solid #e5e5e5" rows="2"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarPropuesta" OnClick="BtnAgregarPropuesta_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="text-align: center; width: 100%">
|
||||
<br />
|
||||
<asp:LinkButton runat="server" ID="LkbGuardar" OnClick="LblGuardar_Click" Text="Guardar" class="btn btn-primary" ValidationGroup="GrpDoc" />
|
||||
<asp:LinkButton runat="server" ID="LkbActualizar" OnClick="LbkActualizar_Click" Text="Actualizar" class="btn btn-primary" ValidationGroup="GrpDoc" Visible="false" />
|
||||
<asp:LinkButton runat="server" ID="LkbPublicar" OnClick="LkbPublicar_Click" Text="Publicar" class="btn btn-primary" ValidationGroup="GrpDoc" />
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivAgregarPropuesta" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Propuesta:</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:Label runat="server" ID="Label1" Text="Subir Archivo de Propuesta:" style="font-size:15px"/>
|
||||
<br />
|
||||
<asp:TextBox ID="TxtArchivoPropuesta" CssClass="ADSdropzone hidden" runat="server" Style="height: 100px"></asp:TextBox>
|
||||
<br />
|
||||
<asp:Label runat="server" ID="Label2" Text="Comentarios:" style="font-size:15px"/>
|
||||
<textarea runat="server" id="TxtComentarios" class="form-control" style="border: 1px solid #e5e5e5" rows="2"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarPropuesta" OnClick="BtnAgregarPropuesta_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -88,6 +88,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
ViewState["CveAsignacion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
@@ -112,19 +113,23 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
private void CargarMensajeNuevoEditado()
|
||||
{
|
||||
string MensajeNuevoEditado = Page.Request["Mensaje"];
|
||||
if (MensajeNuevoEditado == "Nuevo")
|
||||
switch (MensajeNuevoEditado)
|
||||
{
|
||||
Alert("El Documento ha sido creado correctamente");
|
||||
}
|
||||
else if (MensajeNuevoEditado == "Editado")
|
||||
{
|
||||
Alert("Los cambios en el Documento han sido guardado correctamente");
|
||||
case "Nuevo":
|
||||
Alert("El Documento ha sido creado correctamente");
|
||||
break;
|
||||
case "NuevaVersion":
|
||||
Alert("Nueva versión del Documento creado correctamente");
|
||||
break;
|
||||
case "Publicado":
|
||||
Alert("Documento publicado");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void CargarUsuarios()
|
||||
{
|
||||
GvUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
GvUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 1");
|
||||
GvUsuarios.DataBind();
|
||||
}
|
||||
|
||||
@@ -171,8 +176,10 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
|
||||
private void CargarSubCategoria()
|
||||
{
|
||||
DdlSubCategoria.Items.Clear();
|
||||
int CveCategoria = DdlCategoria.SelectedValue.ToEntero();
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
if (ObjOI.GetDocumentoSubCategoria())
|
||||
if (ObjOI.GetDocumentoSubCategoria(CveCategoria: CveCategoria))
|
||||
{
|
||||
DdlSubCategoria.DataSource = ObjOI.DtResultados;
|
||||
DdlSubCategoria.DataBind();
|
||||
@@ -196,6 +203,8 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
|
||||
CveUsuarioResponsable = Documento["CveUsuario"].ToString().ToEntero();
|
||||
TxtDescripcion.Text = Documento["Descripcion"].ToString();
|
||||
DdlCategoria.SelectedValue = Documento["CveCategoria"].ToString();
|
||||
CargarSubCategoria();
|
||||
DdlSubCategoria.SelectedValue = Documento["CveSubCategoria"].ToString();
|
||||
DdlEstatus.SelectedValue = Documento["CveEstatus"].ToString();
|
||||
TxtVersion.Text = Documento["Version"].ToString();
|
||||
@@ -230,6 +239,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
LkbGuardar.Visible = false;
|
||||
LkbActualizar.Visible = true;
|
||||
LkbPublicar.Visible = true;
|
||||
GvUsuarios.Columns[1].Visible = false;
|
||||
GvUsuarios.Columns[2].Visible = true;
|
||||
GvUsuarios.Columns[3].Visible = true;
|
||||
@@ -265,14 +275,51 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfigurarSegunEstatus()
|
||||
{
|
||||
bool MostrarSegunAprobado = (DdlEstatus.SelectedValue == "2");
|
||||
DivBotonesAcciones.Visible = !MostrarSegunAprobado;
|
||||
UpAgregar.Visible = MostrarSegunAprobado;
|
||||
}
|
||||
|
||||
private void CargarCategorias()
|
||||
{
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
if (ObjOI.GetDocumentoCategoria())
|
||||
{
|
||||
DdlCategoria.DataSource = ObjOI.DtResultados;
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
DdlCategoria.DataBind();
|
||||
DdlCategoria.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlSubCategoria.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
}
|
||||
|
||||
protected void DdlCategoria_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (DdlCategoria.SelectedValue != "-1")
|
||||
{
|
||||
CargarSubCategoria();
|
||||
}
|
||||
}
|
||||
|
||||
private void EstatusMostrar(bool Mostrar)
|
||||
{
|
||||
DivEstatus.Visible = Mostrar;
|
||||
brEstatus.Visible = Mostrar;
|
||||
DivEstatusInicial.Visible = !Mostrar;
|
||||
brEstatusInicial.Visible = !Mostrar;
|
||||
}
|
||||
|
||||
private void Cargar()
|
||||
{
|
||||
CargarSubCategoria();
|
||||
CargarCategorias();
|
||||
CargarResponsable();
|
||||
CargarCveDocumento();
|
||||
CargarUsuarios();
|
||||
if (this.CveDocumento > 0)
|
||||
{
|
||||
EstatusMostrar(true);
|
||||
CargarDocumentoYaExistente();
|
||||
CargarUsuariosParticipantes();
|
||||
CargarUsuariosAutorizo();
|
||||
@@ -281,6 +328,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
ConfigurarCamposDetalleSegunUsuario();
|
||||
CargarMensajeNuevoEditado();
|
||||
}
|
||||
ConfigurarSegunEstatus();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -310,7 +358,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
if (!TieneError)
|
||||
{
|
||||
ObjOI.Commit();
|
||||
string ParamMensaje = LkbGuardar.Text == "Guardar" ? "Nuevo" : "Editado";//Esto indica la acción de usuario la cual se mostrará como alert al cargar la página
|
||||
string ParamMensaje = LkbGuardar.Text == "Guardar" ? "Nuevo" : "NuevaVersion";//Esto indica la acción de usuario la cual se mostrará como alert al cargar la página
|
||||
Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", CveDocumento, ParamMensaje));
|
||||
}
|
||||
else
|
||||
@@ -326,7 +374,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
int CveDocumentoPadre = this.CveDocumento > 0 ? this.CveDocumento : -1; //Asociamos el nuevo insert con un CveDocumento ya generado en caso de ser una nueva versión del documento
|
||||
|
||||
int CveDocumento = ObjOI.AddDocumento(DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, DdlEstatus.SelectedValue.ToEntero(),
|
||||
int CveDocumento = ObjOI.AddDocumento(DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, 1,
|
||||
"", TxtResponsable.Text, CveDocumentoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
if (!(CveDocumento > 0))
|
||||
{
|
||||
@@ -439,10 +487,8 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
try
|
||||
{
|
||||
string Version = TxtVersion.Text;
|
||||
string NombreArchivo = fileItem.filenameO;
|
||||
//Preparamos la ruta donde moveremos el archivo cargado
|
||||
//string NombreArchivoGuardado = NombreArchivo;
|
||||
string RutaDestino = string.Format(@"{0}DocumentosRepo\{1}\{2}", UsuarioActual.Empresa.Ruta, CveDocumento, NombreArchivo);
|
||||
|
||||
//Movemos el archivo de la carpeta temporal hacia la carpeta de la empresa
|
||||
@@ -456,6 +502,30 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this.CveDocumento > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (ArchivoAdjuntoNombre != "")
|
||||
{
|
||||
string RutaOrigen = string.Format(@"{0}DocumentosRepo\{1}\{2}", UsuarioActual.Empresa.Ruta, this.CveDocumento, ArchivoAdjuntoNombre);
|
||||
string RutaDestino = string.Format(@"{0}DocumentosRepo\{1}\{2}", UsuarioActual.Empresa.Ruta, CveDocumento, ArchivoAdjuntoNombre);
|
||||
|
||||
System.IO.File.Move(RutaOrigen, RutaDestino);
|
||||
RutaArchivo = ArchivoAdjuntoNombre;
|
||||
}
|
||||
else
|
||||
{
|
||||
RutaArchivo = "";
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Alert(e.Message);
|
||||
RutaArchivo = "Error";
|
||||
}
|
||||
}
|
||||
|
||||
return RutaArchivo;
|
||||
}
|
||||
|
||||
@@ -668,8 +738,6 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
if (ObjOI.UpdateDocumento(this.CveDocumento, DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, 2, "-1", TxtResponsable.Text,
|
||||
DateTime.Now, -1, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Cargar();
|
||||
UpCliente.Update();
|
||||
Alert("Documento publicado");
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
@@ -678,6 +746,31 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
Alert("Los usuarios participantes aún no autorizan este Documento");
|
||||
}
|
||||
Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", this.CveDocumento, "Publicado"));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "NUEVA VERSION"
|
||||
protected void LkbNuevaVersion_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargarUsuarios();
|
||||
LkbGuardar.Text = "Crear Nueva Versión";
|
||||
DivBotonesAcciones.Visible = true;
|
||||
LkbActualizar.Visible = false;
|
||||
LkbPublicar.Visible = false;
|
||||
LkbGuardar.Visible = true;
|
||||
GvUsuarios.Columns[1].Visible = true;
|
||||
GvUsuarios.Columns[2].Visible = false;
|
||||
GvUsuarios.Columns[3].Visible = false;
|
||||
EstatusMostrar(false);
|
||||
UpCliente.Update();
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void LbPruebas_Click(object sender,EventArgs e)
|
||||
{
|
||||
Cargar();
|
||||
UpCliente.Update();
|
||||
Alert("Documento actualizado");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user