.merge
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -276,4 +276,5 @@ __pycache__/
|
||||
/Front
|
||||
/PortalCliente/ePagos/
|
||||
|
||||
vwd.webinfo
|
||||
vwd.webinfo
|
||||
/Bin.rar
|
||||
|
||||
@@ -55,223 +55,300 @@
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-4 ">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-table font-green"></i>
|
||||
<span class="caption-subject bold uppercase"><asp:Label runat="server" ID="LblSubProyecto2"></asp:Label></span>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 ">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-table font-green"></i>
|
||||
<span class="caption-subject bold uppercase">
|
||||
<asp:Label runat="server" ID="LblSubProyecto2"></asp:Label></span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<%--<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" class="btn btn-success" />--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AutoPostBack="true" OnSelectedIndexChanged="DdlSubProyecto_SelectedIndexChanged"></asp:DropDownList>
|
||||
<label for="<%= DdlSubProyecto.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblSubProyecto" Text=""></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlAF" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="CodDesc" DataValueField="CveActivoFijo" ></asp:DropDownList>
|
||||
<label for="<%= DdlAF.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblAF" Text="Equipo A.F."></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlAF" runat="server" InitialValue="-1" ControlToValidate="DdlAF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Equipo A.F.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoServicio" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveTipoServicio"></asp:DropDownList>
|
||||
<label for="<%= DdlTipoServicio.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblTipoServicio" Text="Tipo"></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoServicio" runat="server" InitialValue="-1" ControlToValidate="DdlAF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Equipo A.F.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtServicio" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtServicio" runat="server" Text="Servicio"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtServicio" runat="server" ControlToValidate="TxtServicio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<%--<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" class="btn btn-success" />--%>
|
||||
|
||||
<div class="col-md-4 ">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-table font-green"></i>
|
||||
<span class="caption-subject bold uppercase">
|
||||
<asp:Label runat="server" ID="Label1"></asp:Label></span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<%--<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" class="btn btn-success" />--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrioridad" CssClass="form-control input-sm select2me" Width="100%" runat="server" >
|
||||
<asp:ListItem Value="1">Baja</asp:ListItem>
|
||||
<asp:ListItem Value="2">Media</asp:ListItem>
|
||||
<asp:ListItem Value="3">Alta</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPrioridad.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblPrioridad" Text="Prioridad"></asp:Label>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= txtFechaI.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblFechaInicio" Text="Fecha Inicio"></asp:Label>
|
||||
</label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DVFechaFin" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= txtFechaF.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblFechaFin" Text="Fecha Fin"></asp:Label>
|
||||
</label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<div runat="server" id="DVEstatus" visible="true" class="form-group form-md-line-input input-iconright" >
|
||||
<asp:DropDownList ID="DdlOrdenesTrabajoEstatus" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="EstatusOT" DataValueField="CveEstatusOT" >
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlOrdenesTrabajoEstatus.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="Label2" Text="Estatus"></asp:Label>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" Visible="false">
|
||||
|
||||
<ajax:TabPanel ID="TabMaterial" runat="server" HeaderText="Material">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvMaterial" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvMaterial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveTipoServicioMaterial,CveTipoServicio,Cantidad,CveUM,CvePS,Tipo"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField DataField="Cantidad" ItemStyle-Width="15%" HeaderText="Cantidad" />
|
||||
<asp:BoundField DataField="Abreviatura" ItemStyle-Width="15%" HeaderText="U.M." />
|
||||
<asp:TemplateField ItemStyle-Width="45%" HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("PS") %>' Width="220px"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabActividades" runat="server" HeaderText="Actividades" >
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvActividades" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActividades" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveTipoServicioActividad,CveActividad,Duracion" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Horas">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtHoras" Width="100px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtHoras" FilterType="Custom" ValidChars="1234567890." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="Nombre" ItemStyle-Width="30%" HeaderText="Actividad" />
|
||||
<asp:BoundField DataField="Puesto" ItemStyle-Width="30%" HeaderText="Puesto" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoServicio" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveTipoServicio" ></asp:DropDownList>
|
||||
<label for="<%= DdlTipoServicio.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblTipo" Text="Tipo"></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoServicio" runat="server" InitialValue="-1" ControlToValidate="DdlTipoServicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabCheckList" runat="server" HeaderText="Check List">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvCheckList" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCheckList" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveCheckListActividad,CheckListActividadGrupo,CveCheckList,CveTipoServicio"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="No.">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNROW" runat="server" Text='<%# Eval("NROW")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Componentes Inspección">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCheckListActividad" runat="server" Text='<%# Eval("CheckListActividad")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtDescripcion" runat="server" MaxLength="30"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtDescripcion" runat="server" Text="Descripción:"></asp:Label>
|
||||
<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="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtDuracion" runat="server" MaxLength="30"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDuracion" FilterType="Numbers,Custom" InvalidChars="-*+" ValidChars="1234567890." />
|
||||
<asp:Label AssociatedControlID="TxtDuracion" runat="server" Text="Duración:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtDuracion" runat="server" ControlToValidate="TxtDuracion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Duración''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="Listado de metricas" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveActivoFijo,Unidad,CvePersonaResponsable"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Unidad")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica1" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica1" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica2" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica2" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica3" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica3" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica4" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica4" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica5" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica5" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica6" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica6" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica7" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica7" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica8" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica8" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica9" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica9" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica10" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica10" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica11" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica11" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica12" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica12" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica13" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica13" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica14" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica14" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica15" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtMetrica15" FilterType="Numbers,Custom" FilterMode="ValidChars" ValidChars="0123456789." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Operador">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DDLPersonal" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="Nombre" DataValueField="CvePersonal"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px" HeaderText="Opciones" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarMetricaValor" OnClick="LnkEliminarMetricaValor_Click" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
@@ -318,13 +395,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:center">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" Visible="false" />
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" Visible="true" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
If Request("CveOrdenTrabajo") IsNot Nothing Then
|
||||
CveOrdenTrabajo = Request("CveOrdenTrabajo").ToEntero
|
||||
Tab.Visible = True
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
@@ -50,6 +51,15 @@ Partial Class AF_OrdenTrabajo
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaCombos()
|
||||
|
||||
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa, -1)
|
||||
DdlAF.DataBind()
|
||||
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposServicios(-1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -58,10 +68,21 @@ Partial Class AF_OrdenTrabajo
|
||||
DdlTipoServicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If ObjAF.GetOrdenesTrabajoEstatus(UsuarioActual.CveEmpresa) Then
|
||||
DdlOrdenesTrabajoEstatus.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlOrdenesTrabajoEstatus.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
DdlTipoServicio.DataBind()
|
||||
DdlOrdenesTrabajoEstatus.DataBind()
|
||||
|
||||
DdlTipoServicio.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlOrdenesTrabajoEstatus.SelectedValueExist(1)
|
||||
|
||||
UpFiltro.Update()
|
||||
|
||||
@@ -85,26 +106,13 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs)
|
||||
@@ -114,6 +122,34 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If CveOrdenTrabajo <= 0 Then
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
ObjAF.IniciaTransacSQL()
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If Not ObjAF.AddOrdenesTrabajo(DdlTipoServicio.SelectedValue.ToEntero, DdlAF.SelectedValue.ToEntero, TxtServicio.Text.Trim, DdlSubProyecto.SelectedValue.ToEntero, DdlPrioridad.SelectedValue.ToEntero, txtFechaI.Text.ToDate, MaxFecha, MaxFecha, DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjAF.Commit()
|
||||
Alert($"Orden de trabajo guardada corectamente <a href='./OrdenTrabajo.aspx?CveOrdenTrabajo={ObjAF.CveOrdenTrabajo}' class='Texto'> Folio {ObjAF.FolioOT}</a>")
|
||||
Else
|
||||
ObjAF.RollBack()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -282,4 +318,55 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
|
||||
|
||||
#Region "FOLIOS"
|
||||
|
||||
|
||||
Private Function CargaFolios() As Boolean
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("No se tienen asignadas sucursales", TipoMensaje.MsgError)
|
||||
Return False
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
Dim ObjFolios As New ClsGralFolios()
|
||||
|
||||
If ObjFolios.GetFolios("OT", UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyecto.SelectedValue))
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
|
||||
Alert("No tiene registrados Folios para " & DdlSubProyecto.SelectedItem.Text & " ", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
DT.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
ObjFolios.Dispose()
|
||||
|
||||
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If CargaFolios() Then
|
||||
BtnGuardar.Enabled = True
|
||||
Else
|
||||
BtnGuardar.Enabled = False
|
||||
End If
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
@@ -81,36 +81,24 @@
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTipoServicio" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtTipoServicio" runat="server" Text="Tipo:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtTipoServicio" runat="server" ControlToValidate="TxtTipoServicio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtDescripcion" runat="server" MaxLength="30"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtDescripcion" runat="server" Text="Descripción:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoMantenimiento" InitialValue="-1" 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="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoMantenimiento" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="TipoMantenimiento" DataValueField="CveTipoMantenimiento"></asp:DropDownList>
|
||||
<label for="<%= DdlTipoMantenimiento.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblTipo" Text="Tipo Mantenimiento:"></asp:Label>
|
||||
<asp:Label runat="server" ID="LblTipo" Text="Tipo :"></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoServicio" runat="server" InitialValue="-1" ControlToValidate="DdlTipoMantenimiento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Mantenimientp''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtDuracion" runat="server" MaxLength="5"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDuracion" FilterType="Numbers,Custom" InvalidChars="-*+" ValidChars="1234567890." />
|
||||
<asp:Label AssociatedControlID="TxtDuracion" runat="server" Text="Duración:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtDuracion" runat="server" ControlToValidate="TxtDuracion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Duración''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTipoServicio" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtTipoServicio" runat="server" Text="Descripción:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtTipoServicio" runat="server" ControlToValidate="TxtTipoServicio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -133,7 +121,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
|
||||
@@ -181,13 +169,14 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActividades" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveActividad" GridLines="None">
|
||||
OnRowDataBound="GvActividades_RowDataBound"
|
||||
DataKeyNames="CveTipoServicioActividad,CveActividad,Duracion" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
<asp:CheckBox runat="server" ID="Chk" OnCheckedChanged="Chk_CheckedChanged" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -217,19 +206,35 @@
|
||||
<ajax:TabPanel ID="TabCheckList" runat="server" HeaderText="Check List">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvCheckList" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCheckList" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames=""
|
||||
OnRowDataBound="GvCheckList_RowDataBound"
|
||||
DataKeyNames="CveCheckListActividad,CheckListActividadGrupo,CveCheckList,CveTipoServicio"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="No.">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNROW" runat="server" Text='<%# Eval("NROW")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Componentes Inspección">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Unidad")%>'></asp:Literal>
|
||||
<asp:Literal ID="LtlCheckListActividad" runat="server" Text='<%# Eval("CheckListActividad")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
@@ -67,6 +67,9 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -77,57 +80,23 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
CveTipoServicio = Request("CveTipoServicio").ToEntero
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
|
||||
|
||||
If CveTipoServicio = -1 Then
|
||||
CrearTablas()
|
||||
CargaActividades()
|
||||
CargaCheckList()
|
||||
Else
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Property IndexMaterial As Integer
|
||||
Get
|
||||
If ViewState("IndexMaterial") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("IndexMaterial").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IndexMaterial") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Property IndexActividades As Integer
|
||||
Get
|
||||
If ViewState("IndexActividades") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("IndexActividades").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IndexActividades") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property IndexCheckList As Integer
|
||||
Get
|
||||
If ViewState("IndexCheckList") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("IndexCheckList").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IndexCheckList") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -157,10 +126,6 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
|
||||
If CveTipoServicio <= 0 Then
|
||||
CargaActividades()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -221,6 +186,25 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
Dim ObjAf As New ClsAF
|
||||
|
||||
If ObjAf.GetTiposServicios(CveTipoServicio, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
|
||||
If ObjAf.DtResultados.Rows.Count > 0 Then
|
||||
TxtTipoServicio.Text = ObjAf.DtResultados(0)("Nombre").ToString
|
||||
DdlTipoMantenimiento.SelectedValueExist(ObjAf.DtResultados(0)("CveTipoMantenimiento").ToString)
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
ObjAf.Dispose()
|
||||
|
||||
CargaMateriales()
|
||||
CargaActividades()
|
||||
CargaCheckList()
|
||||
@@ -233,7 +217,9 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposServiciosMaterial(-1, CveTipoServicio) Then
|
||||
If ObjAF.GetTiposServiciosMaterial(-1, CveTipoServicio, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DTMateriales = ObjAF.DtResultados
|
||||
GvMaterial.DataSource = DTMateriales
|
||||
|
||||
Else
|
||||
@@ -256,20 +242,26 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If CveTipoServicio <= 0 Then
|
||||
If CveTipoServicio > 0 Then
|
||||
|
||||
If ObjAF.GetActividades(-1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjAF.GetTiposServiciosActividades(-1, CveTipoServicio, -1) Then
|
||||
GvActividades.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvActividades.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Else
|
||||
If ObjAF.GetActividades(-1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvActividades.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvActividades.DataSource = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvActividades.DataBind()
|
||||
|
||||
UpGvActividades.Update()
|
||||
|
||||
End Sub
|
||||
@@ -278,17 +270,51 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If CveTipoServicio > 0 Then
|
||||
|
||||
If ObjAF.GetCheckList(-1, CveTipoServicio, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvCheckList.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvCheckList.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Else
|
||||
If ObjAF.GetCheckListActividad(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvCheckList.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvCheckList.DataSource = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
GvCheckList.DataBind()
|
||||
UpGvCheckList.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs)
|
||||
|
||||
|
||||
|
||||
Protected Sub GvCheckList_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Chk As CheckBox = e.Row.FCCheckBox("Chk")
|
||||
|
||||
If e.Row.DataKey("CveCheckListActividad").ToEntero = 0 Then
|
||||
|
||||
e.Row.FCLiteral("LtlNROW").Text = e.Row.DataKey("CheckListActividadGrupo").ToString
|
||||
Chk.Visible = False
|
||||
e.Row.Attributes.Add("style", "background-color:#DDD")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DataKey("CveTipoServicio").ToEntero > 0 Then
|
||||
Chk.Checked = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
@@ -572,36 +598,146 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
'validacion?
|
||||
|
||||
If CveTipoServicio = -1 Then
|
||||
|
||||
If ObjAF.AddTiposServicios(TxtTipoServicio.Text.Trim, DdlTipoMantenimiento.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
|
||||
If ObjAF.AddTiposServicios(TxtTipoServicio.Text.Trim, DdlTipoMantenimiento.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
CveTipoServicio = ObjAF.CveTipoServicio
|
||||
|
||||
For Each GvRow As GridViewRow In GvMaterial.Rows
|
||||
|
||||
If Not ObjAF.AddTiposServiciosMaterial(CveTipoServicio, GvRow.DataKey("Cantidad").ToDecimal, GvRow.DataKey("CveUM").ToEntero, GvRow.DataKey("CvePS").ToEntero, GvRow.DataKey("Tipo").ToEntero) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
For Each GvRow As GridViewRow In GvActividades.Rows
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim Horas As Decimal = GvRow.FCTextBox("TxtHoras").Text.ToDecimal
|
||||
|
||||
If Chk.Checked Then
|
||||
If Not ObjAF.AddTiposServiciosActividades(GvRow.DataKey("CveActividad").ToEntero, CveTipoServicio, Horas, "") Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
CveTipoServicio = ObjAF.CveTipoServicio
|
||||
For Each GvRow As GridViewRow In GvCheckList.Rows
|
||||
|
||||
For Each GvRow As GridViewRow In GvMaterial.Rows
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim CveCheckListActividad As Integer = GvRow.DataKey("CveCheckListActividad").ToEntero
|
||||
|
||||
If Chk.Checked Then
|
||||
If Not ObjAF.AddCheckList(CveTipoServicio, CveCheckListActividad) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If Not ObjAF.UpdateTiposServicios(CveTipoServicio, TxtTipoServicio.Text.Trim, DdlTipoMantenimiento.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
|
||||
For Each GvRow As GridViewRow In GvActividades.Rows
|
||||
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim CveTipoServicioActividad As Integer = GvRow.DataKey("CveTipoServicioActividad").ToEntero
|
||||
Dim CveActividad As Integer = GvRow.DataKey("CveActividad").ToEntero
|
||||
|
||||
Dim Horas As Decimal = GvRow.FCTextBox("TxtHoras").Text.ToDecimal
|
||||
|
||||
If Chk.Checked Then
|
||||
|
||||
If CveTipoServicioActividad > 0 Then
|
||||
If Not ObjAF.UpdateTiposServiciosActividades(CveTipoServicioActividad, CveActividad, Horas, "") Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
If Not ObjAF.AddTiposServiciosActividades(CveActividad, CveTipoServicio, Horas, "") Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If CveTipoServicioActividad > 0 Then
|
||||
If Not ObjAF.DeleteTiposServiciosActividades(CveTipoServicioActividad, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorProceso Then
|
||||
|
||||
For Each GvRow As GridViewRow In GvCheckList.Rows
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
|
||||
|
||||
If Chk.Visible Then
|
||||
|
||||
Dim CveTipoServicioTmp As Integer = GvRow.DataKey("CveTipoServicio").ToEntero
|
||||
Dim CveCheckList As Integer = GvRow.DataKey("CveCheckList").ToEntero
|
||||
Dim CveCheckListActividad As Integer = GvRow.DataKey("CveCheckListActividad").ToEntero
|
||||
|
||||
If CveTipoServicioTmp > 0 Then
|
||||
|
||||
If Not Chk.Checked Then
|
||||
|
||||
If Not ObjAF.DeleteCheckList(CveCheckList) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If Chk.Checked Then
|
||||
If Not ObjAF.AddCheckList(CveTipoServicio, CveCheckListActividad) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If Not ObjAF.AddTiposServiciosMaterial(CveTipoServicio, GvRow.DataKey("Cantidad").ToDecimal, GvRow.DataKey("CveUM").ToEntero, GvRow.DataKey("CvePS").ToEntero, GvRow.DataKey("Tipo").ToEntero) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
For Each GvRow As GridViewRow In GvActividades.Rows
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim Horas As Decimal = GvRow.FCTextBox("").Text.ToDecimal
|
||||
|
||||
|
||||
If ObjAF.AddTiposServiciosActividades(GvRow.DataKey("").ToEntero) Then
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If ErrorProceso Then
|
||||
ObjAF.RollBack()
|
||||
Else
|
||||
@@ -612,6 +748,77 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub Chk_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
'Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, CheckBox).BindingContainer, GridViewRow)
|
||||
'Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
|
||||
'Dim CveTipoServicioActividad As Integer = GvRow.DataKey("CveTipoServicioActividad").ToEntero
|
||||
'Dim CveActividad As Integer = GvRow.DataKey("CveActividad").ToEntero
|
||||
|
||||
'Dim Horas As Decimal = GvRow.FCTextBox("TxtHoras").Text.ToDecimal
|
||||
|
||||
'Dim ObjAF As New ClsAF
|
||||
|
||||
|
||||
'If Chk.Checked Then
|
||||
|
||||
' If CveTipoServicioActividad > 0 Then
|
||||
' If ObjAF.UpdateTiposServiciosActividades(CveTipoServicioActividad, CveActividad, Horas, "") Then
|
||||
|
||||
' End If
|
||||
' Else
|
||||
' If ObjAF.AddTiposServiciosActividades(CveActividad, CveTipoServicio, Horas, "") Then
|
||||
|
||||
' End If
|
||||
' End If
|
||||
|
||||
'Else
|
||||
|
||||
|
||||
' If CveTipoServicioActividad > 0 Then
|
||||
|
||||
' If ObjAF.DeleteTiposServiciosActividades(CveTipoServicioActividad, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
'End If
|
||||
|
||||
|
||||
'ObjAF.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvActividades_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim CveTipoServicioActividad As Integer = e.Row.DataKey("CveTipoServicioActividad").ToEntero
|
||||
Dim TxtHoras As TextBox = e.Row.FCTextBox("TxtHoras")
|
||||
Dim Chk As CheckBox = e.Row.FCCheckBox("Chk")
|
||||
|
||||
If CveTipoServicioActividad > 0 Then
|
||||
|
||||
Chk.Checked = True
|
||||
TxtHoras.Text = e.Row.DataKey("Duracion")
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -91,6 +91,8 @@ Public Class ClsAF
|
||||
Public Property CveDispositivo As Integer
|
||||
Public Property MedidaVehicular As Integer
|
||||
Public Property CveTipoServicio As Integer
|
||||
Public Property CveOrdenTrabajo As Integer
|
||||
Public Property FolioOT As Integer
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -3480,6 +3482,7 @@ Public Class ClsAF
|
||||
#End Region
|
||||
|
||||
#Region "TIPO SERVICIO"
|
||||
|
||||
Public Function GetTiposServicios(CveTipoServicio As Integer, CveTipoMantenimiento As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -3572,7 +3575,7 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetTiposServiciosActividades(CveTipoServicioActividad As Integer, CveActividad As Integer) As Boolean
|
||||
Public Function GetTiposServiciosActividades(CveTipoServicioActividad As Integer, CveTipoServicio As Integer, CveActividad As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_TiposServiciosActividadesGet")
|
||||
@@ -3580,6 +3583,7 @@ Public Class ClsAF
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTipoServicioActividad", SqlDbType.Int).Value = CveTipoServicioActividad
|
||||
.Add("@CveActividad", SqlDbType.Int).Value = CveActividad
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3592,14 +3596,15 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddTiposServiciosActividades(CveActividad As Integer, Duracion As Integer, Observaciones As String) As Boolean
|
||||
Public Function AddTiposServiciosActividades(CveActividad As Integer, CveTipoServicio As Integer, Duracion As Decimal, Observaciones As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_TiposServiciosActividadesAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveActividad", SqlDbType.Int).Value = CveActividad
|
||||
.Add("@Duracion", SqlDbType.Int).Value = Duracion
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
.Add("@Duracion", SqlDbType.SmallMoney).Value = Duracion
|
||||
.Add("@Observaciones", SqlDbType.NVarChar).Value = Observaciones
|
||||
End With
|
||||
|
||||
@@ -3613,7 +3618,7 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateTiposServiciosActividades(CveTipoServicioActividad As Integer, CveActividad As Integer, Duracion As Integer, Observaciones As String) As Boolean
|
||||
Public Function UpdateTiposServiciosActividades(CveTipoServicioActividad As Integer, CveActividad As Integer, Duracion As Decimal, Observaciones As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_TiposServiciosActividadesUpdate")
|
||||
@@ -3621,7 +3626,7 @@ Public Class ClsAF
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTipoServicioActividad", SqlDbType.Int).Value = CveTipoServicioActividad
|
||||
.Add("@CveActividad", SqlDbType.Int).Value = CveActividad
|
||||
.Add("@Duracion", SqlDbType.Int).Value = Duracion
|
||||
.Add("@Duracion", SqlDbType.SmallMoney).Value = Duracion
|
||||
.Add("@Observaciones", SqlDbType.NVarChar).Value = Observaciones
|
||||
End With
|
||||
|
||||
@@ -3635,13 +3640,14 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DeleteTiposServiciosActividades(CveTipoServicioActividad As Integer) As Boolean
|
||||
Public Function DeleteTiposServiciosActividades(CveTipoServicioActividad As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_TiposServiciosActividadesDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTipoServicioActividad", SqlDbType.Int).Value = CveTipoServicioActividad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3654,7 +3660,7 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetTiposServiciosMaterial(CveTipoServicioMaterial As Integer, CveTipoServicio As Integer) As Boolean
|
||||
Public Function GetTiposServiciosMaterial(CveTipoServicioMaterial As Integer, CveTipoServicio As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_TiposServiciosMaterialGet")
|
||||
@@ -3662,6 +3668,7 @@ Public Class ClsAF
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTipoServicioMaterial", SqlDbType.Int).Value = CveTipoServicioMaterial
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -4005,7 +4012,7 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCheckListActividad(CveCheckListActividad As Integer, CveCheckListActividadGrupo As Integer) As Boolean
|
||||
Public Function GetCheckListActividad(CveCheckListActividad As Integer, CveCheckListActividadGrupo As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListActividadGet")
|
||||
@@ -4013,6 +4020,7 @@ Public Class ClsAF
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListActividad", SqlDbType.Int).Value = CveCheckListActividad
|
||||
.Add("@CveCheckListActividadGrupo", SqlDbType.Int).Value = CveCheckListActividadGrupo
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -4085,7 +4093,7 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCheckList(CveCheckList As Integer, CveTipoServicio As Integer, CveCheckListActividad As Integer) As Boolean
|
||||
Public Function GetCheckList(CveCheckList As Integer, CveTipoServicio As Integer, CveCheckListActividad As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListGet")
|
||||
@@ -4094,6 +4102,7 @@ Public Class ClsAF
|
||||
.Add("@CveCheckList", SqlDbType.Int).Value = CveCheckList
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
.Add("@CveCheckListActividad", SqlDbType.Int).Value = CveCheckListActividad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -4166,6 +4175,112 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "O R D E N E S D E T R A B A J O"
|
||||
|
||||
Public Function GetOrdenesTrabajoEstatus(CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_OrdenesTrabajoEstatusGet")
|
||||
|
||||
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 los estatus", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetOrdenesTrabajo(CveOrdenTrabajo As Integer, CveTipoServicio As Integer, Folio As Integer, CveAF As Integer, CveSubProyecto As Integer, Prioridad As Integer, FechaInicio As Date, FechaFin As Date, FechaFinReal As Date, CveEstatusOT As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_OrdenesTrabajoGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOrdenTrabajo", SqlDbType.Int).Value = CveOrdenTrabajo
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Prioridad", SqlDbType.Int).Value = Prioridad
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
'.Add("@FechaFinReal", SqlDbType.Date).Value = FechaFinReal
|
||||
.Add("@CveEstatusOT", SqlDbType.Int).Value = CveEstatusOT
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar las ordenes de trabajo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddOrdenesTrabajo(CveTipoServicio As Integer, CveAF As Integer, Servicio As String, CveSubProyecto As Integer, Prioridad As Integer, FechaInicio As Date, FechaFin As Date, FechaFinReal As Date, CveEstatusOT As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_OrdenesTrabajoAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@Servicio", SqlDbType.VarChar).Value = Servicio
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Prioridad", SqlDbType.Int).Value = Prioridad
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@FechaFinReal", SqlDbType.Date).Value = FechaFinReal
|
||||
.Add("@CveEstatusOT", SqlDbType.Int).Value = CveEstatusOT
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
.Add("@CveOrdenTrabajo", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@Folio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
CveOrdenTrabajo = SqlAdapter.SelectCommand.Parameters("@CveOrdenTrabajo").Value.ToString.ToEntero
|
||||
FolioOT = SqlAdapter.SelectCommand.Parameters("@Folio").Value.ToString.ToEntero
|
||||
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar la orden de trabajo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -1646,12 +1646,14 @@ Public Class ClsCompProveedores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetTiposContratosDcumentos(CveEmpresa As Integer) As Boolean
|
||||
Public Function GetTiposContratosDcumentos(CveEmpresa As Integer, Optional CveDocumentacion As Integer = -1, Optional CveTipoContrato As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Prov_SAT_CatTipoContratosDocumentosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDocumentacion", SqlDbType.Int).Value = CveDocumentacion
|
||||
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
@@ -1756,7 +1758,7 @@ Public Class ClsCompProveedores
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetContrato(CveContrato As Integer, CveSubProyecto As Integer, CveProveedor As Integer, CveTipoContrato As Integer, CveRepresentanteLegal As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetContrato(CveContrato As Integer, CveSubProyecto As Integer, CveProveedor As Integer, CveTipoContrato As Integer, CveRepresentanteLegal As Integer, Estatus As Integer, CveEmpresa As Integer, FechaI As Date, FechaF As Date) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1771,6 +1773,10 @@ Public Class ClsCompProveedores
|
||||
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
|
||||
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -3928,7 +3928,8 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddTrasladoSolicitudDetalle(CveTrasladoSolicitud As Integer, Cantidad As Integer, CveUM As Integer, CvePS As Integer, Precio As Double, Observaciones As String, CveContratoDetalle As Integer) As Boolean
|
||||
Public Function AddTrasladoSolicitudDetalle(CveTrasladoSolicitud As Integer, Cantidad As Integer, CveUM As Integer, CvePS As Integer, Precio As Double, Observaciones As String,
|
||||
CveContratoDetalle As Integer, Optional Serie As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim CveTraspasoSolicitud As Integer = 0
|
||||
DataAdapter("PA_Inv_TraspasoSolicitudDetalleAdd")
|
||||
@@ -3941,6 +3942,7 @@ Public Class ClsInventarios
|
||||
.Add("@Precio", SqlDbType.Float).Value = Precio
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||
.Add("@Serie", SqlDbType.NVarChar).Value = Serie
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4851,7 +4851,6 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/CatImpuestosLocales.aspx".ToUpper(), 394)
|
||||
PaginaDict.Add("/Ventas/ActualizarPrecios.aspx".ToUpper(), 397)
|
||||
PaginaDict.Add("/Ventas/ClientesAbonar.aspx".ToUpper(), 321)
|
||||
PaginaDict.Add("/Ventas/Reportes.aspx".ToUpper(), 567)
|
||||
PaginaDict.Add("/Ventas/DiseñadorReportes.aspx".ToUpper(), 569)
|
||||
PaginaDict.Add("/Ventas/ReporteDetalle.aspx".ToUpper(), 576)
|
||||
PaginaDict.Add("/Ventas/PopUpBuscarPs.aspx".ToUpper(), 13)
|
||||
@@ -4912,7 +4911,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721)
|
||||
PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722)
|
||||
PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723)
|
||||
PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 704)
|
||||
PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 567)
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -6991,7 +6990,7 @@ Public Class ClsPaginas
|
||||
Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = If(Vta.DtNCVinculadas IsNot Nothing, Vta.DtNCVinculadas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||
lrds.Add(rds5)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 141 AndAlso (RutaFormato.Contains("Factura") Or RutaFormato.Contains("Cotizacion")) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(141, 152) AndAlso (RutaFormato.Contains("Factura") Or RutaFormato.Contains("Cotizacion")) Then
|
||||
params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString))
|
||||
End If
|
||||
'Imprime los parametros
|
||||
@@ -8138,7 +8137,7 @@ Public Class ClsPaginas
|
||||
Case 1
|
||||
If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Visible = False
|
||||
If LblSubProyecto IsNot Nothing Then LblSubProyecto.Text = "Centro Costo"
|
||||
If LblSubProyecto IsNot Nothing Then LblSubProyecto.Text = "Centro de costo"
|
||||
Case 2
|
||||
If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Visible = False
|
||||
|
||||
@@ -1956,14 +1956,14 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateSalarioImss(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiarioSS As Double) As Boolean
|
||||
Public Function UpdateSalariointegrado(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiario As Double) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_RH_PersonalUpdateSalarioImss")
|
||||
SqlDataAdapter("PA_RH_PersonalUpdateSalarioIntegrado")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@SDI", SqlDbType.Money).Value = SDI
|
||||
.Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
|
||||
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1619,7 +1619,8 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
|
||||
Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0) As Boolean
|
||||
Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
|
||||
Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepPSEconoGet")
|
||||
|
||||
@@ -1634,6 +1635,9 @@ Public Class ClsVentas
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
|
||||
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
|
||||
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
|
||||
.Add("@Linea", SqlDbType.VarChar).Value = Linea
|
||||
.Add("@Marca", SqlDbType.VarChar).Value = Marca
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -2053,7 +2053,166 @@ Namespace Extensiones
|
||||
style.Clear()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Sub ExportToExcelGembox(GridView As GridView, NombreArchivoXLSx As String, Usuario As Usuario, FechaIMes As String, FechaFMes As String, Titulo As String, SubProyecto As String, Divisor As Integer, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional DatoTituloExtra As String = "")
|
||||
|
||||
Dim sw1 As New StringWriter()
|
||||
Dim htw1 As New HtmlTextWriter(sw1)
|
||||
GridView.RenderControl(htw1)
|
||||
|
||||
Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
||||
|
||||
Dim htmlStream1 = New MemoryStream(options.Encoding.GetBytes(sw1.ToString()))
|
||||
|
||||
htmlStream1.Position = 0
|
||||
Dim sr1 As New StreamReader(htmlStream1)
|
||||
Dim myStr1 = sr1.ReadToEnd()
|
||||
sr1.Dispose()
|
||||
htmlStream1.Dispose()
|
||||
sw1.Dispose()
|
||||
|
||||
Dim HtmlCompleto As String = myStr1
|
||||
|
||||
HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "")
|
||||
|
||||
Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto))
|
||||
|
||||
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim excel As GemBox.Spreadsheet.ExcelFile
|
||||
|
||||
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream5, options)
|
||||
|
||||
If Usuario IsNot Nothing Then
|
||||
|
||||
Dim TotalRowHeader As Integer = 8
|
||||
Dim TotalRowFooter As Integer = 2
|
||||
|
||||
|
||||
Dim worksheet = excel.Worksheets(0)
|
||||
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
|
||||
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
|
||||
celdasConTexto.Style.Font.Name = "Calibri Light"
|
||||
|
||||
Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
|
||||
RangoNombreEmpresa.Merged = True
|
||||
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
|
||||
RangoNombreEmpresa.Style.Font.Size = 18 * 20
|
||||
RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
|
||||
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
||||
RangoTitulo.Merged = True
|
||||
RangoTitulo.Value = Titulo
|
||||
RangoTitulo.Style.Font.Size = 20 * 20
|
||||
RangoTitulo.Style.Font.Name = "Calibri Light"
|
||||
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
If FechaIMes.Trim.Length > 0 And FechaFMes.Trim.Length > 0 Then
|
||||
Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex)
|
||||
RangoFechas.Merged = True
|
||||
RangoFechas.Value = $"Fechas: {FechaIMes} a {FechaFMes}"
|
||||
RangoFechas.Style.Font.Size = 15 * 20
|
||||
RangoFechas.Style.Font.Name = "Calibri Light"
|
||||
RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
End If
|
||||
|
||||
|
||||
If SubProyecto.Length > 0 Then
|
||||
Dim RangoSubProyecto = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex)
|
||||
RangoSubProyecto.Merged = True
|
||||
RangoSubProyecto.Value = SubProyecto
|
||||
RangoSubProyecto.Style.Font.Size = 20 * 20
|
||||
RangoSubProyecto.Style.Font.Name = "Calibri Light"
|
||||
RangoSubProyecto.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoSubProyecto.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
End If
|
||||
|
||||
|
||||
If DatoTituloExtra.Length > 0 Then
|
||||
Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
|
||||
RangoDatoTituloExtra.Merged = True
|
||||
RangoDatoTituloExtra.Value = DatoTituloExtra
|
||||
RangoDatoTituloExtra.Style.Font.Size = 20 * 20
|
||||
RangoDatoTituloExtra.Style.Font.Name = "Calibri Light"
|
||||
RangoDatoTituloExtra.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoDatoTituloExtra.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
End If
|
||||
|
||||
|
||||
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
|
||||
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
|
||||
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
|
||||
|
||||
If i > 0 Then
|
||||
Try
|
||||
worksheet.Columns(i).AutoFit(1)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Dim IndexEndTable As Integer = GridView.Rows.Count + TotalRowHeader + TotalRowFooter
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(0).Value = "Usuario Imprimió"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||
|
||||
If Imagen.Exists Then
|
||||
Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
|
||||
Using sr As New StreamReader(Ruta)
|
||||
Dim ms As New MemoryStream()
|
||||
sr.BaseStream.CopyTo(ms)
|
||||
worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
|
||||
End Using
|
||||
End If
|
||||
|
||||
|
||||
For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
|
||||
If I > 0 Then
|
||||
|
||||
If Divisor = 1 Then
|
||||
worksheet.Columns(I + 1).Style.NumberFormat = "#,##0.00"
|
||||
Else
|
||||
worksheet.Columns(I + 1).Style.NumberFormat = "#,##"
|
||||
End If
|
||||
|
||||
Try
|
||||
worksheet.Columns(I).AutoFit(1)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Sub ExportToExcel(GridView As HtmlTable, NombreArchivoXLS As String)
|
||||
Dim sb As StringBuilder = New StringBuilder()
|
||||
|
||||
@@ -2598,7 +2598,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus ='True'")
|
||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
|
||||
trCuentaDeposito.Visible = True
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<asp:HyperLink Visible="false" NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Cortes"></asp:Label>
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Reporte Cortes"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -72,7 +72,8 @@
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
SubProyecto
|
||||
<asp:Label runat="server" ID="LblSubProyecto" Text="SubProyecto"/>
|
||||
<%--SubProyecto--%>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyectos" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm">
|
||||
@@ -160,7 +161,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Ventas Credito" runat="server" CausesValidation="false"> </asp:Label>
|
||||
<asp:Label Text="Ventas Crédito" runat="server" CausesValidation="false"> </asp:Label>
|
||||
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -187,7 +188,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Tarj. Debito" runat="server" CausesValidation="false"> </asp:Label>
|
||||
<asp:Label Text="Tarj. Débito" runat="server" CausesValidation="false"> </asp:Label>
|
||||
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -196,7 +197,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Tarj. Credito" runat="server" CausesValidation="false"> </asp:Label>
|
||||
<asp:Label Text="Tarj. Crédito" runat="server" CausesValidation="false"> </asp:Label>
|
||||
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -298,7 +299,7 @@
|
||||
<b>Detalles del Corte</b>
|
||||
<asp:GridView ID="GvP" runat="server" AutoGenerateColumns="False" GridLines="None" Caption="Resumen" CssClass="table table-striped table-advance table-hover ScrollAD">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Metodo Pago" DataField="MetodoPago" />
|
||||
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
@@ -306,15 +307,15 @@
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
SerieFolio
|
||||
Serie - Folio
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LBDescripcion" runat="server" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>' ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="NombreComercial" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Total" DataField="ImportePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Metodo Pago" DataField="MetodoPago" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
|
||||
@@ -61,9 +61,7 @@ Partial Class Bancos_RepCortes
|
||||
txtFechaVI.Text = Now.ToShortDateString
|
||||
txtFechaVF.Text = Now.ToShortDateString
|
||||
Me.Form.DefaultButton = BtnConsultar.UniqueID
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectos.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvESC" runat="server" DataKeyNames="CveIE, Saldo, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Proveedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvESC" runat="server" DataKeyNames="CveIE, Saldo, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal,CveSubProyecto" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Proveedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
@@ -219,7 +219,7 @@
|
||||
<asp:UpdatePanel ID="upDatosPersonal" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPersonal" runat="server" AutoGenerateColumns="False" DataKeyNames="CveIE, Saldo, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal"
|
||||
<asp:GridView ID="GvPersonal" runat="server" AutoGenerateColumns="False" DataKeyNames="CveIE, Saldo, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal,CveSubProyecto"
|
||||
EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Funcionarios Empleados" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="10%">
|
||||
|
||||
@@ -248,7 +248,7 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero, CveCuenta:=CveCuenta) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -2835,8 +2835,8 @@ Partial Class Compras_Compras
|
||||
GvAnticiposSel.DataBind()
|
||||
|
||||
|
||||
'' VALIDA ELIMINAR COMPRA
|
||||
If UsuarioActual.TienePermisoProceso(77) OrElse UsuarioActual.TienePermisoProceso(135) Then ' Eliminar compra
|
||||
'' VALIDA ELIMINAR COMPRA, QUE NO TENGA PAGOS CONCILIADOS
|
||||
If (UsuarioActual.TienePermisoProceso(77) OrElse UsuarioActual.TienePermisoProceso(135)) AndAlso dr("NumPagosConciliados").ToString.ToEntero = 0 Then ' Eliminar compra
|
||||
|
||||
'SIN VINCULACIÓN
|
||||
If UsuarioActual.TienePermisoProceso(135) Then
|
||||
@@ -10858,10 +10858,11 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
If e.Row.DataKey("DifPSSat").ToEntero = 1 Then
|
||||
'#e35b5a
|
||||
e.Row.BackColor = Drawing.Color.FromArgb(1, 227, 91, 90)
|
||||
|
||||
e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#EFD569") 'Drawing.Color.FromArgb(1, 227, 91, 90)'#e35b5a
|
||||
e.Row.Attributes.Add("data-toggle", "tooltip")
|
||||
e.Row.Attributes.Add("title", "El código del producto del SAT no es igual al código del producto registrado.")
|
||||
e.Row.Attributes.Add("data-html", "true")
|
||||
e.Row.Attributes.Add("title", String.Format("El código del producto del SAT no es igual al código del producto registrado. <br/>Código XML:{0} <br/> Código Sistema:{1} ", e.Row.DBCampo("ClaveProdServ"), e.Row.DBCampo("SATClavePS")))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -518,7 +518,7 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
ObjVenta.Dispose()
|
||||
ObjPuntoVenta.Dispose()
|
||||
Dim FechaCorte As String = $" <b>Fecha Corte:</b> {Fecha}"
|
||||
Dim FechaCorte As String = $" <b>Fecha fin:</b> {Fecha}"
|
||||
Dim Usuario As String = $" <b>Usuario:</b> {Nombre}"
|
||||
If DtCortesVentas.Rows.Count > 0 Or DtCortesVentasResumen.Rows.Count > 0 Then
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
@@ -1,38 +1,70 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoAnual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoAnual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Anexo del Catálogo - Anual
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoAnual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoAnual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.fa.fa-bar-chart {
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Anexo del Catálogo - Anual
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Ejercicio Inicio:
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Ejercicio Fin:
|
||||
<asp:DropDownList ID="DdlEjercicio2" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
<li> <label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl" >Periodo: </label>
|
||||
|
||||
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Ejercicio Fin:
|
||||
|
||||
<asp:DropDownList ID="DdlEjercicio2" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
|
||||
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
@@ -47,145 +79,407 @@
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</li>
|
||||
|
||||
</li>
|
||||
<li>SubProyecto:
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Divisor:
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me" ClientIDMode="Static">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me" ClientIDMode="Static">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpAnual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAnual" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px" ControlStyle-Width="250px">
|
||||
<HeaderTemplate>
|
||||
<div style="width: 200px;">Nombre</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" CssClass="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AppendDataBoundItems="true" Class="DdlGrafica select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
let cdatos;
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#DivModalGrafica").modal();
|
||||
cdatos = $(obj).data('values');
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
$('.LblTituloGrafica').text($(obj).parent().parent().text());
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
$('.DdlGrafica').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
currentid = data.id;
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
});
|
||||
$('.DdlGrafica').removeClass('DdlGrafica');
|
||||
initamgrafica();
|
||||
}
|
||||
|
||||
function cargaGraficaBarras2() {
|
||||
//Hypgrafica
|
||||
$("#DivModalGrafica").modal();
|
||||
$('.LblTituloGrafica').text('grafica');
|
||||
let items = []
|
||||
let data;
|
||||
let series = [];
|
||||
$('.chkgraf input:checked').each(function () {
|
||||
data = $(this).closest('tr').find('.Hypgrafica').data('values')
|
||||
let name = $(this).closest('tr').text().trim()
|
||||
items.push({ data: data, name: name })
|
||||
});
|
||||
if (items) {
|
||||
data = items[0].data;
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[0].name,
|
||||
"valueField": 'Valor'
|
||||
})
|
||||
for (var indexcol = 1; indexcol < items.length; indexcol++) {
|
||||
let cdatos = items[indexcol].data;
|
||||
let valueField = 'Valor' + indexcol;
|
||||
for (var i = 0; i < cdatos.length; i++) {
|
||||
data[i][valueField] = cdatos[i].Valor
|
||||
}
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[indexcol].name,
|
||||
"valueField": valueField
|
||||
})
|
||||
}
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2, "legend": {
|
||||
|
||||
"generateFromData": true // "data": data.map(function(num) { return {title:num.Texto ,color:num.Color}; })
|
||||
},
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": series,
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function initamgrafica() {
|
||||
AmCharts.addInitHandler(function (chart) {
|
||||
function handleCustomMarkerToggle(legendEvent) {
|
||||
var dataProvider = legendEvent.chart.dataProvider;
|
||||
var itemIndex;
|
||||
legendEvent.chart.toggleLegend = true;
|
||||
if (undefined !== legendEvent.dataItem.hidden && legendEvent.dataItem.hidden) {
|
||||
legendEvent.dataItem.hidden = false;
|
||||
dataProvider.push(legendEvent.dataItem.storedObj);
|
||||
legendEvent.dataItem.storedObj = undefined;
|
||||
dataProvider.sort(function (lhs, rhs) {
|
||||
return lhs.dataIdx - rhs.dataIdx;
|
||||
});
|
||||
} else {
|
||||
legendEvent.dataItem.hidden = true;
|
||||
for (var i = 0; i < dataProvider.length; ++i) {
|
||||
if (dataProvider[i].dataIdx === legendEvent.dataItem.dataIdx) {
|
||||
itemIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
legendEvent.dataItem.storedObj = dataProvider[itemIndex];
|
||||
dataProvider.splice(itemIndex, 1);
|
||||
}
|
||||
legendEvent.chart.validateData();
|
||||
}
|
||||
if (!chart.legend || !chart.legend.enabled || !chart.legend.generateFromData) {
|
||||
return;
|
||||
}
|
||||
var categoryField = chart.categoryField;
|
||||
var colorField = chart.graphs[0].lineColorField || chart.graphs[0].fillColorsField || chart.graphs[0].colorField;
|
||||
var legendData = chart.dataProvider.map(function (data, idx) {
|
||||
var markerData = {
|
||||
"title": data[categoryField],
|
||||
"color": data[colorField],
|
||||
"dataIdx": idx
|
||||
};
|
||||
if (!markerData.color) {
|
||||
markerData.color = chart.graphs[0].lineColor;
|
||||
}
|
||||
data.dataIdx = idx;
|
||||
return markerData;
|
||||
});
|
||||
|
||||
<asp:UpdatePanel ID="UpAnual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAnual" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" CssClass="table table-hover">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
chart.legend.data = legendData;
|
||||
chart.legend.switchable = true;
|
||||
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
|
||||
|
||||
}, ["serial"]);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
function LimpiaCeros() {
|
||||
|
||||
let Divisor = $("#DdlDivisor option:selected").val();
|
||||
|
||||
$('.ceros').each(function (i, obj) {
|
||||
debugger;
|
||||
|
||||
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
|
||||
$(this).html('-');
|
||||
@@ -200,7 +494,7 @@
|
||||
//}
|
||||
///$(this).html(FormatoNumeroIPP(ToDouble($(this).html()) / Divisor, ((Divisor == 1) ? 2 : 0)));
|
||||
|
||||
$(this).html(FormatoNumeroIPP(ToDouble($(this).html()) , ((Divisor == 1) ? 2 : 0)));
|
||||
$(this).html(FormatoNumeroIPP(ToDouble($(this).html()), ((Divisor == 1) ? 2 : 0)));
|
||||
}
|
||||
|
||||
if (ToDouble($(this).html()) < 0) {
|
||||
@@ -210,7 +504,6 @@
|
||||
}
|
||||
|
||||
function FormatoNumeroIPP(Importe, Decimales) {
|
||||
debugger;
|
||||
if (typeof Decimales === 'undefined') { Decimales = 2; }
|
||||
|
||||
if (isNaN(parseInt(Importe))) return "NaN";
|
||||
@@ -229,7 +522,7 @@
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -22,12 +22,45 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
Set(value As Integer)
|
||||
ViewState("EsVertical") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
|
||||
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property listaCamposanios As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCamposanios"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCamposanios") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCamposanios = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
Dim EjercicioParametro, EjercicioParametroFinal, SubProyectoParametro, DivisorParametro, Periodo As Integer
|
||||
|
||||
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
|
||||
@@ -95,26 +128,27 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
|
||||
GvAnual.DataSource = Conta.DSResultados.Tables(1)
|
||||
|
||||
Dim Index = 1
|
||||
For Index = 1 To GvAnual.Columns.Count - 1
|
||||
Dim Index = 2
|
||||
For Index = 2 To GvAnual.Columns.Count - 1
|
||||
GvAnual.Columns(Index).Visible = False
|
||||
Next Index
|
||||
|
||||
Index = 1
|
||||
listaCamposanios.Clear()
|
||||
Index = 2
|
||||
For Each Dr As DataRow In DtHeaders.Rows
|
||||
GvAnual.Columns(Index).Visible = True
|
||||
CType(GvAnual.Columns(Index), BoundField).DataField = $"Ejercicio{Dr("Ejercicio").ToString}"
|
||||
GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
|
||||
CType(GvAnual.Columns(Index), BoundField).DataField = String.Format("Ejercicio{0}", Dr("Ejercicio"))
|
||||
GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
|
||||
listaCamposanios.Add(New String() {String.Format("Ejercicio{0}", Dr("Ejercicio")), Dr("Ejercicio").ToString()})
|
||||
|
||||
If Not DdlEjercicio.SelectedValue = Dr("Ejercicio").ToString Then
|
||||
If EsVertical <> 1 Then
|
||||
GvAnual.Columns(Index + 1).Visible = True
|
||||
CType(GvAnual.Columns(Index + 1), BoundField).DataField = $"Ejercicio{Dr("Ejercicio").ToString}VariacionImporte"
|
||||
CType(GvAnual.Columns(Index + 1), BoundField).DataField = String.Format("Ejercicio{0}VariacionImporte", Dr("Ejercicio"))
|
||||
GvAnual.Columns(Index + 1).HeaderText = "$"
|
||||
End If
|
||||
|
||||
GvAnual.Columns(Index + 2).Visible = True
|
||||
CType(GvAnual.Columns(Index + 2), BoundField).DataField = $"Ejercicio{Dr("Ejercicio").ToString}{If(EsVertical = 1, "", "Variacion")}Porcentaje"
|
||||
CType(GvAnual.Columns(Index + 2), BoundField).DataField = String.Format("Ejercicio{0}{1}Porcentaje", Dr("Ejercicio"), If(EsVertical = 1, "", "Variacion"))
|
||||
GvAnual.Columns(Index + 2).HeaderText = "%"
|
||||
End If
|
||||
|
||||
@@ -133,26 +167,68 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
|
||||
'RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
|
||||
RegistraScript($"LimpiaCeros();")
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
|
||||
|
||||
If GvAnual.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAnual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
setgraficaCC(e)
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
End If
|
||||
|
||||
e.Row.Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub setgraficaCC(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCamposanios
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
GvAnual.ExportToExcelGembox("AnexoCatálogoAnual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio2.SelectedValue}", "Anexo del Catálogo - Anual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,41 +1,68 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoCC.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoCC" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoCC.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoCC" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.fa.fa-bar-chart {
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Anexo de Catálogo - Centro Costo
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Ejercicio:
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
<li><asp:Label runat="server" ID="LblSubProyecto" ></asp:Label>
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li> <label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl" >Periodo: </label>
|
||||
|
||||
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
|
||||
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
@@ -50,182 +77,444 @@
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>Divisor:
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpCC" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div>
|
||||
<div style="background-color: #fff;">
|
||||
<asp:GridView ID="GvCC" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px" ControlStyle-Width="250px">
|
||||
<HeaderTemplate>
|
||||
<div style="width: 200px;">Nombre</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" CssClass="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AppendDataBoundItems="true" Class="DdlGrafica select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
let cdatos;
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#DivModalGrafica").modal();
|
||||
cdatos = $(obj).data('values');
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
$('.LblTituloGrafica').text($(obj).parent().parent().text());
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
$('.DdlGrafica').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
currentid = data.id;
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
});
|
||||
$('.DdlGrafica').removeClass('DdlGrafica');
|
||||
initamgrafica();
|
||||
}
|
||||
|
||||
function cargaGraficaBarras2() {
|
||||
//Hypgrafica
|
||||
$("#DivModalGrafica").modal();
|
||||
$('.LblTituloGrafica').text('grafica');
|
||||
let items = []
|
||||
let data;
|
||||
let series = [];
|
||||
$('.chkgraf input:checked').each(function () {
|
||||
data = $(this).closest('tr').find('.Hypgrafica').data('values')
|
||||
let name = $(this).closest('tr').text().trim()
|
||||
items.push({ data: data, name: name })
|
||||
});
|
||||
if (items) {
|
||||
data = items[0].data;
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[0].name,
|
||||
"valueField": 'Valor'
|
||||
})
|
||||
for (var indexcol = 1; indexcol < items.length; indexcol++) {
|
||||
let cdatos = items[indexcol].data;
|
||||
let valueField = 'Valor' + indexcol;
|
||||
for (var i = 0; i < cdatos.length; i++) {
|
||||
data[i][valueField] = cdatos[i].Valor
|
||||
}
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[indexcol].name,
|
||||
"valueField": valueField
|
||||
})
|
||||
}
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2, "legend": {
|
||||
|
||||
"generateFromData": true // "data": data.map(function(num) { return {title:num.Texto ,color:num.Color}; })
|
||||
},
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": series,
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function initamgrafica() {
|
||||
AmCharts.addInitHandler(function (chart) {
|
||||
function handleCustomMarkerToggle(legendEvent) {
|
||||
var dataProvider = legendEvent.chart.dataProvider;
|
||||
var itemIndex;
|
||||
legendEvent.chart.toggleLegend = true;
|
||||
if (undefined !== legendEvent.dataItem.hidden && legendEvent.dataItem.hidden) {
|
||||
legendEvent.dataItem.hidden = false;
|
||||
dataProvider.push(legendEvent.dataItem.storedObj);
|
||||
legendEvent.dataItem.storedObj = undefined;
|
||||
dataProvider.sort(function (lhs, rhs) {
|
||||
return lhs.dataIdx - rhs.dataIdx;
|
||||
});
|
||||
} else {
|
||||
legendEvent.dataItem.hidden = true;
|
||||
for (var i = 0; i < dataProvider.length; ++i) {
|
||||
if (dataProvider[i].dataIdx === legendEvent.dataItem.dataIdx) {
|
||||
itemIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
legendEvent.dataItem.storedObj = dataProvider[itemIndex];
|
||||
dataProvider.splice(itemIndex, 1);
|
||||
}
|
||||
legendEvent.chart.validateData();
|
||||
}
|
||||
if (!chart.legend || !chart.legend.enabled || !chart.legend.generateFromData) {
|
||||
return;
|
||||
}
|
||||
var categoryField = chart.categoryField;
|
||||
var colorField = chart.graphs[0].lineColorField || chart.graphs[0].fillColorsField || chart.graphs[0].colorField;
|
||||
var legendData = chart.dataProvider.map(function (data, idx) {
|
||||
var markerData = {
|
||||
"title": data[categoryField],
|
||||
"color": data[colorField],
|
||||
"dataIdx": idx
|
||||
};
|
||||
if (!markerData.color) {
|
||||
markerData.color = chart.graphs[0].lineColor;
|
||||
}
|
||||
data.dataIdx = idx;
|
||||
return markerData;
|
||||
});
|
||||
|
||||
<asp:UpdatePanel ID="UpCC" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="overflow:auto!important">
|
||||
<asp:GridView ID="GvCC" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" CssClass="table table-hover">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="500px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
chart.legend.data = legendData;
|
||||
chart.legend.switchable = true;
|
||||
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
|
||||
|
||||
}, ["serial"]);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
function LimpiaCeros(Divisor) {
|
||||
$('.ceros').each(function (i, obj) {
|
||||
@@ -270,7 +559,7 @@
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property CveCuenta As Integer
|
||||
Get
|
||||
@@ -14,12 +14,44 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property listaCampos As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCampos"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCampos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCampos = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
'Dim EjercicioParametro, SubProyectoParametro, DivisorParametro As Integer
|
||||
'CveCuenta = IfNull(Request("C"), "-1").ToString.ToEntero
|
||||
'EjercicioParametro = IfNull(Request("E"), "-1").ToString.ToEntero
|
||||
@@ -91,17 +123,19 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Dim Index = 4
|
||||
For Index = 4 To GvCC.Columns.Count - 1
|
||||
GvCC.Columns(Index).Visible = False
|
||||
Next Index
|
||||
Next Index
|
||||
listaCampos.Clear()
|
||||
|
||||
Index = 4
|
||||
For Each Dr As DataRow In DtHeaders.Rows
|
||||
GvCC.Columns(Index).Visible = True
|
||||
CType(GvCC.Columns(Index), BoundField).DataField = $"SubProyecto{Dr("SubProyecto").ToString}"
|
||||
GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString
|
||||
CType(GvCC.Columns(Index), BoundField).DataField = String.Format("SubProyecto{0}", Dr("SubProyecto"))
|
||||
GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString()
|
||||
listaCampos.Add(New String() {String.Format("SubProyecto{0}", Dr("SubProyecto")), Dr("SubProyecto").ToString()})
|
||||
|
||||
|
||||
GvCC.Columns(Index + 1).Visible = True
|
||||
CType(GvCC.Columns(Index + 1), BoundField).DataField = $"SubProyecto{Dr("SubProyecto").ToString}Porcentaje"
|
||||
CType(GvCC.Columns(Index + 1), BoundField).DataField = String.Format("SubProyecto{0}Porcentaje", Dr("SubProyecto"))
|
||||
GvCC.Columns(Index + 1).HeaderText = "%"
|
||||
|
||||
Index += 2
|
||||
@@ -112,15 +146,23 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
|
||||
Else
|
||||
GvCC.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If GvCC.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvCC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -128,13 +170,39 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
End If
|
||||
|
||||
e.Row.Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
setgraficaCC(e)
|
||||
e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Public Sub setgraficaCC(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCampos
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}", "Anexo del Catálogo - Mensual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,43 +1,70 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMensual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoMensual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMensual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoMensual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<style>
|
||||
#C_GvMensual2 > tbody > tr:nth-child(1) > th:nth-child(1), #C_GvMensual2 > tbody > tr:nth-child(2) > td:nth-child(1){
|
||||
width:500px!important;
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
|
||||
.fa.fa-bar-chart {
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
/*#C_GvMensual2 > tbody > tr:nth-child(1) > th:nth-child(1), #C_GvMensual2 > tbody > tr:nth-child(2) > td:nth-child(1) {
|
||||
width: 500px !important;
|
||||
}*/
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Anexo del Catálogo - Mensual
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Ejercicio:
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl" >Periodo: </label>
|
||||
|
||||
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
|
||||
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
@@ -52,91 +79,352 @@
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</li>
|
||||
|
||||
</li>
|
||||
<li>SubProyecto:
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Divisor:
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpMensual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style="overflow:auto">
|
||||
<asp:GridView ID="GvMensual2" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" CssClass="table table-hover">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="500px" ControlStyle-Width="500px" />
|
||||
<asp:BoundField HeaderText="Enero" DataField="Enero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Febrero" DataField="Febrero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionFebreroImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionFebreroPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Marzo" DataField="Marzo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionMarzoImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionMarzoPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Abril" DataField="Abril" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionAbrilImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionAbrilPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Mayo" DataField="Mayo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionMayoImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionMayoPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Junio" DataField="Junio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionJunioImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionJunioPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Julio" DataField="Julio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionJulioImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionJulioPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Agosto" DataField="Agosto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionAgostoImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionAgostoPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionSeptiembreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionSeptiembrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Octubre" DataField="Octubre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionOctubreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionOctubrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionNoviembreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionNoviembrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionDiciembreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionDiciembrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div style="background-color: #fff;">
|
||||
<asp:GridView ID="GvMensual2" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px" ControlStyle-Width="250px">
|
||||
<HeaderTemplate>
|
||||
<div style="width: 200px;">Nombre</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Enero" DataField="Enero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Febrero" DataField="Febrero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionFebreroImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionFebreroPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Marzo" DataField="Marzo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionMarzoImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionMarzoPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Abril" DataField="Abril" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionAbrilImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionAbrilPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Mayo" DataField="Mayo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionMayoImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionMayoPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Junio" DataField="Junio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionJunioImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionJunioPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Julio" DataField="Julio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionJulioImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionJulioPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Agosto" DataField="Agosto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionAgostoImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionAgostoPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionSeptiembreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionSeptiembrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Octubre" DataField="Octubre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionOctubreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionOctubrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionNoviembreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionNoviembrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionDiciembreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionDiciembrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" CssClass="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AppendDataBoundItems="true" Class="DdlGrafica select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
let cdatos;
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#DivModalGrafica").modal();
|
||||
cdatos = $(obj).data('values');
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
$('.LblTituloGrafica').text($(obj).parent().parent().text().trim());
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
$('.DdlGrafica').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
currentid = data.id;
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
});
|
||||
$('.DdlGrafica').removeClass('DdlGrafica')
|
||||
initamgrafica();
|
||||
}
|
||||
|
||||
function cargaGraficaBarras2() {
|
||||
//Hypgrafica
|
||||
$("#DivModalGrafica").modal();
|
||||
$('.LblTituloGrafica').text('grafica');
|
||||
let items = []
|
||||
let data;
|
||||
let series = [];
|
||||
$('.chkgraf input:checked').each(function () {
|
||||
data = $(this).closest('tr').find('.Hypgrafica').data('values')
|
||||
let name = $(this).closest('tr').text().trim()
|
||||
items.push({ data: data, name: name })
|
||||
});
|
||||
if (items) {
|
||||
data = items[0].data;
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[0].name,
|
||||
"valueField": 'Valor'
|
||||
})
|
||||
for (var indexcol = 1; indexcol < items.length; indexcol++) {
|
||||
let cdatos = items[indexcol].data;
|
||||
let valueField = 'Valor' + indexcol;
|
||||
for (var i = 0; i < cdatos.length; i++) {
|
||||
data[i][valueField] = cdatos[i].Valor
|
||||
}
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[indexcol].name,
|
||||
"valueField": valueField
|
||||
})
|
||||
}
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2, "legend": {
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
"generateFromData": true // "data": data.map(function(num) { return {title:num.Texto ,color:num.Color}; })
|
||||
},
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": series,
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function initamgrafica() {
|
||||
AmCharts.addInitHandler(function (chart) {
|
||||
function handleCustomMarkerToggle(legendEvent) {
|
||||
var dataProvider = legendEvent.chart.dataProvider;
|
||||
var itemIndex;
|
||||
legendEvent.chart.toggleLegend = true;
|
||||
if (undefined !== legendEvent.dataItem.hidden && legendEvent.dataItem.hidden) {
|
||||
legendEvent.dataItem.hidden = false;
|
||||
dataProvider.push(legendEvent.dataItem.storedObj);
|
||||
legendEvent.dataItem.storedObj = undefined;
|
||||
dataProvider.sort(function (lhs, rhs) {
|
||||
return lhs.dataIdx - rhs.dataIdx;
|
||||
});
|
||||
} else {
|
||||
legendEvent.dataItem.hidden = true;
|
||||
for (var i = 0; i < dataProvider.length; ++i) {
|
||||
if (dataProvider[i].dataIdx === legendEvent.dataItem.dataIdx) {
|
||||
itemIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
legendEvent.dataItem.storedObj = dataProvider[itemIndex];
|
||||
dataProvider.splice(itemIndex, 1);
|
||||
}
|
||||
legendEvent.chart.validateData();
|
||||
}
|
||||
if (!chart.legend || !chart.legend.enabled || !chart.legend.generateFromData) {
|
||||
return;
|
||||
}
|
||||
var categoryField = chart.categoryField;
|
||||
var colorField = chart.graphs[0].lineColorField || chart.graphs[0].fillColorsField || chart.graphs[0].colorField;
|
||||
var legendData = chart.dataProvider.map(function (data, idx) {
|
||||
var markerData = {
|
||||
"title": data[categoryField],
|
||||
"color": data[colorField],
|
||||
"dataIdx": idx
|
||||
};
|
||||
if (!markerData.color) {
|
||||
markerData.color = chart.graphs[0].lineColor;
|
||||
}
|
||||
data.dataIdx = idx;
|
||||
return markerData;
|
||||
});
|
||||
|
||||
chart.legend.data = legendData;
|
||||
chart.legend.switchable = true;
|
||||
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
|
||||
|
||||
}, ["serial"]);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
function LimpiaCeros() {
|
||||
|
||||
let Divisor = 1;
|
||||
|
||||
$('.ceros').each(function (i, obj) {
|
||||
debugger;
|
||||
|
||||
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
|
||||
$(this).html('-');
|
||||
@@ -158,7 +446,6 @@
|
||||
}
|
||||
|
||||
function FormatoNumeroIPP(Importe, Decimales) {
|
||||
debugger;
|
||||
if (typeof Decimales === 'undefined') { Decimales = 2; }
|
||||
|
||||
if (isNaN(parseInt(Importe))) return "NaN";
|
||||
@@ -178,7 +465,7 @@
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -14,13 +14,44 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property listaCampos As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCampos"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCampos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCampos = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro, Periodo As Integer
|
||||
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
|
||||
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
|
||||
@@ -79,15 +110,23 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
GvMensual2.DataSource = Nothing
|
||||
End If
|
||||
GvMensual2.DataBind()
|
||||
UpMensual.Update()
|
||||
UpMensual.Update()
|
||||
|
||||
If GvMensual2.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
RegistraScript($"LimpiaCeros();")
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -95,13 +134,44 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
End If
|
||||
|
||||
e.Row.Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
setgrafica(e)
|
||||
e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Public Sub setgrafica(e As GridViewRowEventArgs)
|
||||
|
||||
Dim lista As New List(Of Object)
|
||||
lista.Add(New With {.Texto = "Enero", .Valor = e.Row.DBCampo("Enero").ToDecimal(), .Color = "#FF0F00"})
|
||||
lista.Add(New With {.Texto = "Febrero", .Valor = e.Row.DBCampo("Febrero").ToDecimal(), .Color = "#FF6600"})
|
||||
lista.Add(New With {.Texto = "Marzo", .Valor = e.Row.DBCampo("Marzo").ToDecimal(), .Color = "#F8FF01"})
|
||||
lista.Add(New With {.Texto = "Abril", .Valor = e.Row.DBCampo("Abril").ToDecimal(), .Color = "#04D215"})
|
||||
lista.Add(New With {.Texto = "Mayo", .Valor = e.Row.DBCampo("Mayo").ToDecimal(), .Color = "#2A0CD0"})
|
||||
lista.Add(New With {.Texto = "Junio", .Valor = e.Row.DBCampo("Junio").ToDecimal(), .Color = "#8A0CCF"})
|
||||
lista.Add(New With {.Texto = "Julio", .Valor = e.Row.DBCampo("Julio").ToDecimal(), .Color = "#CD0D74"})
|
||||
lista.Add(New With {.Texto = "Agosto", .Valor = e.Row.DBCampo("Agosto").ToDecimal(), .Color = "#754DEB"})
|
||||
lista.Add(New With {.Texto = "Septiembre", .Valor = e.Row.DBCampo("Septiembre").ToDecimal(), .Color = "#DDDDDD"})
|
||||
lista.Add(New With {.Texto = "Octubre", .Valor = e.Row.DBCampo("Octubre").ToDecimal(), .Color = "#999999"})
|
||||
lista.Add(New With {.Texto = "Noviembre", .Valor = e.Row.DBCampo("Noviembre").ToDecimal(), .Color = "#000000"})
|
||||
lista.Add(New With {.Texto = "Diciembre", .Valor = e.Row.DBCampo("Diciembre").ToDecimal(), .Color = "#FF0F00"})
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}", "Anexo del Catálogo - Mensual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -75,6 +75,48 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property listaCampos As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCampos"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCampos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property listaCamposanios As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCamposanios"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCamposanios") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property listaCamposaniosGastos As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCamposaniosGastos"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCamposaniosGastos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property listaCamposaniosTotal As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCamposaniosTotal"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCamposaniosTotal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property ReporteComplementario As Boolean
|
||||
' Get
|
||||
' ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
|
||||
@@ -174,6 +216,22 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CountDinamicoAnual As Integer
|
||||
|
||||
Get
|
||||
If ViewState("CountDinamicoAnual") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("CountDinamicoAnual").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CountDinamicoAnual") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " S U B P R O Y E C T O H O R I Z O N T A L "
|
||||
@@ -230,12 +288,45 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CountDinamicoSubProyecto As Integer
|
||||
|
||||
Get
|
||||
If ViewState("CountDinamicoSubProyecto") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("CountDinamicoSubProyecto").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CountDinamicoSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCampos = New List(Of String())
|
||||
listaCamposanios = New List(Of String())
|
||||
listaCamposaniosGastos = New List(Of String())
|
||||
listaCamposaniosTotal = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
|
||||
TotalActualMes = 0
|
||||
TotalAnteriorMes = 0
|
||||
@@ -243,7 +334,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
CargaEjercicios()
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubproyecto, Nothing, LblSubProyecto)
|
||||
TabSubProyecto.HeaderText = LblSubProyecto.Text & " H."
|
||||
TabSubProyecto.HeaderText = LblSubProyecto.Text & " "
|
||||
|
||||
|
||||
|
||||
@@ -859,6 +950,10 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
|
||||
End If
|
||||
|
||||
setgrafica(e)
|
||||
|
||||
|
||||
|
||||
|
||||
e.Row.FCHyperLink("HLEnero").ForeColor = If(e.Row.DataKey("Enero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLEnero").ForeColor)
|
||||
e.Row.FCHyperLink("HLFebrero").ForeColor = If(e.Row.DataKey("Febrero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLFebrero").ForeColor)
|
||||
@@ -955,6 +1050,10 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
setgrafica(e)
|
||||
|
||||
|
||||
e.Row.FCHyperLink("HLEnero").ForeColor = If(e.Row.DataKey("Enero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLEnero").ForeColor)
|
||||
e.Row.FCHyperLink("HLFebrero").ForeColor = If(e.Row.DataKey("Febrero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLFebrero").ForeColor)
|
||||
e.Row.FCHyperLink("HLMarzo").ForeColor = If(e.Row.DataKey("Marzo").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLMarzo").ForeColor)
|
||||
@@ -1017,6 +1116,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
e.Row.FCHyperLink("HLDiciembre").Text = e.Row.DataKey("Diciembre").ToDecimal.ToString("###,###,##0.00")
|
||||
End If
|
||||
|
||||
setgrafica(e)
|
||||
|
||||
e.Row.FCHyperLink("HLEnero").ForeColor = If(e.Row.DataKey("Enero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLEnero").ForeColor)
|
||||
e.Row.FCHyperLink("HLFebrero").ForeColor = If(e.Row.DataKey("Febrero").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLFebrero").ForeColor)
|
||||
e.Row.FCHyperLink("HLMarzo").ForeColor = If(e.Row.DataKey("Marzo").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLMarzo").ForeColor)
|
||||
@@ -1035,6 +1136,23 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub setgrafica(e As GridViewRowEventArgs)
|
||||
|
||||
Dim lista As New List(Of Object)
|
||||
lista.Add(New With {.Texto = "Enero", .Valor = e.Row.DataKey("Enero").ToDecimal(), .Color = "#FF0F00"})
|
||||
lista.Add(New With {.Texto = "Febrero", .Valor = e.Row.DataKey("Febrero").ToDecimal(), .Color = "#FF6600"})
|
||||
lista.Add(New With {.Texto = "Marzo", .Valor = e.Row.DataKey("Marzo").ToDecimal(), .Color = "#F8FF01"})
|
||||
lista.Add(New With {.Texto = "Abril", .Valor = e.Row.DataKey("Abril").ToDecimal(), .Color = "#04D215"})
|
||||
lista.Add(New With {.Texto = "Mayo", .Valor = e.Row.DataKey("Mayo").ToDecimal(), .Color = "#2A0CD0"})
|
||||
lista.Add(New With {.Texto = "Junio", .Valor = e.Row.DataKey("Junio").ToDecimal(), .Color = "#8A0CCF"})
|
||||
lista.Add(New With {.Texto = "Julio", .Valor = e.Row.DataKey("Julio").ToDecimal(), .Color = "#CD0D74"})
|
||||
lista.Add(New With {.Texto = "Agosto", .Valor = e.Row.DataKey("Agosto").ToDecimal(), .Color = "#754DEB"})
|
||||
lista.Add(New With {.Texto = "Septiembre", .Valor = e.Row.DataKey("Septiembre").ToDecimal(), .Color = "#DDDDDD"})
|
||||
lista.Add(New With {.Texto = "Octubre", .Valor = e.Row.DataKey("Octubre").ToDecimal(), .Color = "#999999"})
|
||||
lista.Add(New With {.Texto = "Noviembre", .Valor = e.Row.DataKey("Noviembre").ToDecimal(), .Color = "#000000"})
|
||||
lista.Add(New With {.Texto = "Diciembre", .Valor = e.Row.DataKey("Diciembre").ToDecimal(), .Color = "#FF0F00"})
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1081,6 +1199,19 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
Dim IndexGv As Integer = 1
|
||||
Dim IndexMax As Integer = 1
|
||||
|
||||
|
||||
Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
For IDX_LIMPIAR = 1 To 25
|
||||
|
||||
GvIngresosAnualH.Columns(IDX_LIMPIAR).Visible = False
|
||||
GvGastosAnualH.Columns(IDX_LIMPIAR).Visible = False
|
||||
GvTotalesAnualH.Columns(IDX_LIMPIAR).Visible = False
|
||||
Next
|
||||
listaCamposanios.Clear()
|
||||
listaCamposaniosGastos.Clear()
|
||||
listaCamposaniosTotal.Clear()
|
||||
|
||||
If DtIngresosAnualH.Rows.Count > 0 Then
|
||||
|
||||
|
||||
@@ -1096,6 +1227,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
|
||||
|
||||
|
||||
listaCamposanios.Add(New String() {dCoumn.ColumnName.ToString(), dCoumn.ColumnName.ToString()})
|
||||
|
||||
listaCamposaniosTotal.Add(New String() {dCoumn.ColumnName.ToString(), dCoumn.ColumnName.ToString()})
|
||||
'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
|
||||
'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
|
||||
GvIngresosAnualH.Columns(IndexGv).Visible = True
|
||||
@@ -1142,6 +1276,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
Row.Item("PorcentajeAcumulado") = "100.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
Row.Item("CountDinamico") = DtGastosAnualH.MAX("CountDinamico")
|
||||
CountDinamicoAnual = DtGastosAnualH.MAX("CountDinamico").ToEntero
|
||||
DtIngresosAnualH.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
@@ -1174,6 +1309,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
|
||||
CType(GvGastosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
|
||||
CType(GvGastosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName
|
||||
listaCamposaniosGastos.Add(New String() {dCoumn.ColumnName.ToString(), dCoumn.ColumnName.ToString()})
|
||||
|
||||
'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFields = {"CveCuenta", "FechaInicial", "FechaFActual", "CveSubProyecto"}
|
||||
'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFormatString = "/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}"
|
||||
|
||||
@@ -1258,10 +1395,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
|
||||
|
||||
Protected Sub GvIngresosAnualH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
setgraficaCCAnual(e, listaCamposanios)
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
@@ -1323,6 +1458,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
|
||||
Protected Sub GvGastosAnualH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
setgraficaCCAnual(e, listaCamposaniosGastos)
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActualMes -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalAnteriorMes -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
@@ -1383,12 +1519,24 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
setgraficaCCAnual(e, listaCamposaniosTotal)
|
||||
e.Row.Attributes.Add("style", "Font-weight: bold")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub setgraficaCCAnual(e As GridViewRowEventArgs, listaCampos As List(Of String()))
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCampos
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1441,11 +1589,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
'34
|
||||
Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
For IDX_LIMPIAR = 1 To 34
|
||||
For IDX_LIMPIAR = 1 To 35
|
||||
CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
|
||||
CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).HeaderText = ""
|
||||
GvIngresosSubProyectoH.Columns(IDX_LIMPIAR).Visible = False
|
||||
Next
|
||||
|
||||
listaCampos.Clear()
|
||||
|
||||
|
||||
If DtIngresosSubProyectoH.Rows.Count > 0 Then
|
||||
@@ -1467,7 +1616,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
CType(GvTotalesSubProyectoH.Columns(IndexGv), BoundField).HeaderText = DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString
|
||||
CType(GvGastosSubProyectoH.Columns(IndexGv), BoundField).HeaderText = DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString
|
||||
End If
|
||||
|
||||
listaCampos.Add(New String() {dCoumn.ColumnName.ToString(), DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString()})
|
||||
Else
|
||||
GvIngresosSubProyectoH.Columns(IndexGv).Visible = False
|
||||
GvTotalesSubProyectoH.Columns(IndexGv).Visible = False
|
||||
@@ -1499,6 +1648,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
Row.Item("PorcentajeAcumulado") = "100.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
Row.Item("CountDinamico") = DtIngresosSubProyectoH.MAX("CountDinamico")
|
||||
CountDinamicoSubProyecto = DtIngresosSubProyectoH.MAX("CountDinamico").ToEntero
|
||||
DtIngresosSubProyectoH.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
@@ -1631,9 +1781,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Font.Size = 13
|
||||
End If
|
||||
|
||||
|
||||
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
setgraficaCC(e)
|
||||
'Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
|
||||
@@ -1686,18 +1835,18 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
|
||||
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("HLAnterior").Text = If(DdlDivisor.SelectedValue.ToEntero > 1, e.Row.DBCampo("ImporteAcumulado").ToString.ToDecimal.ToString("###,###,##0"), e.Row.DBCampo("ImporteAcumulado").ToString.ToDecimal.ToString("###,###,##0.00"))
|
||||
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvGastosSubProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
setgraficaCC(e)
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActualMes -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalAnteriorMes -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
@@ -1706,9 +1855,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
'e.Row.CssClass = "SubTotales"
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
@@ -1716,18 +1862,27 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
End Sub
|
||||
|
||||
Protected Sub GvTotalesSubProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
' e.Row.Attributes.Add("style", "display:none")
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
setgraficaCC(e)
|
||||
e.Row.Attributes.Add("style", "Font-weight: bold")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub setgraficaCC(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCampos
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1751,7 +1906,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
ExportToExcelG(GvIngresosAnualH, GvGastosAnualH, TMesT1, "Reporte_Anual_Horizontal", UsuarioActual, "Anual Horizontal", Gv3:=GvTotalesAnualH)
|
||||
|
||||
ElseIf Tab.ActiveTabIndex = 3 AndAlso GvIngresosSubProyectoH.Rows.Count > 0 Then
|
||||
ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, "Proyecto Horizontal", Gv3:=GvTotalesSubProyectoH, EsPorSubProtyecto:=True)
|
||||
ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, $"{LblSubProyecto.Text} Horizontal", Gv3:=GvTotalesSubProyectoH, EsPorSubProtyecto:=True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1829,28 +1984,21 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
|
||||
HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "")
|
||||
|
||||
Dim asd As String = ""
|
||||
|
||||
|
||||
Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto))
|
||||
|
||||
|
||||
|
||||
|
||||
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8")
|
||||
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim excel As GemBox.Spreadsheet.ExcelFile
|
||||
'Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
||||
|
||||
'Using htmlStream = New MemoryStream(options.Encoding.GetBytes(sw.ToString()))
|
||||
' excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream, options)
|
||||
|
||||
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream5, options)
|
||||
|
||||
If Usuario IsNot Nothing Then
|
||||
|
||||
Dim TotalRowHeader As Integer = 8
|
||||
Dim TotalRowFooter As Integer = 2
|
||||
|
||||
|
||||
Dim worksheet = excel.Worksheets(0)
|
||||
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
|
||||
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
|
||||
@@ -1865,15 +2013,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
'Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
|
||||
'RangoFiltros.Merged = True
|
||||
'RangoFiltros.Value = "Filtros"
|
||||
'RangoFiltros.Style.Font.Size = 15 * 20
|
||||
'RangoFiltros.Style.Font.Name = "Calibri Light"
|
||||
'RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||
'RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
||||
RangoTitulo.Merged = True
|
||||
RangoTitulo.Value = Titulo
|
||||
@@ -1882,7 +2021,27 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex)
|
||||
RangoFechas.Merged = True
|
||||
RangoFechas.Value = $"Fechas: {FechaIMes} a {FechaFMes}"
|
||||
RangoFechas.Style.Font.Size = 15 * 20
|
||||
RangoFechas.Style.Font.Name = "Calibri Light"
|
||||
RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
If EsPorSubProtyecto And DdlSubproyecto.SelectedValue.ToEntero > 0 Then
|
||||
Dim RangoSubProyecto = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex)
|
||||
RangoSubProyecto.Merged = True
|
||||
RangoSubProyecto.Value = DdlSubproyecto.SelectedItem.Text
|
||||
RangoSubProyecto.Style.Font.Size = 20 * 20
|
||||
RangoSubProyecto.Style.Font.Name = "Calibri Light"
|
||||
RangoSubProyecto.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoSubProyecto.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
End If
|
||||
|
||||
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
|
||||
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
|
||||
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
@@ -1929,10 +2088,30 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
End Using
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'End Using
|
||||
'htw.Dispose()
|
||||
|
||||
|
||||
|
||||
|
||||
For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
|
||||
If I > 0 Then
|
||||
|
||||
If DdlDivisor.SelectedValue.ToEntero = 1 Then
|
||||
worksheet.Columns(I + 1).Style.NumberFormat = "#,##0.00"
|
||||
Else
|
||||
worksheet.Columns(I + 1).Style.NumberFormat = "#,##"
|
||||
End If
|
||||
|
||||
Try
|
||||
worksheet.Columns(I).AutoFit(1)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
|
||||
|
||||
|
||||
@@ -20,10 +20,70 @@
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" OnClick="btConsultar_Click" /></td>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1 ">Documento:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlDocumentacion" runat="server" CssClass="select2me" Width="100%" DataTextField="Documentacion" DataValueField="CveDocumentacion" >
|
||||
</asp:DropDownList >
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Tipo Contrato:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlTipoContratoFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="TipoContrato" DataValueField="CveTipoContrato">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 ">Estatus:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100%" >
|
||||
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1" >Vigente</asp:ListItem>
|
||||
<asp:ListItem Value="2" >Rescindido</asp:ListItem>
|
||||
<asp:ListItem Value="3" >Suspendido</asp:ListItem>
|
||||
<asp:ListItem Value="4" >Terminado</asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
@@ -11,17 +11,53 @@ Partial Class Edoc_CatDocumentosContratos
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDropDownList()
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDropDownList()
|
||||
|
||||
|
||||
|
||||
Dim ObjProveedor As New ClsCompProveedores
|
||||
|
||||
|
||||
If ObjProveedor.GetTiposContratos(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlTipoContratoFiltro.DataSource = ObjProveedor.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjProveedor.Dispose()
|
||||
|
||||
DdlTipoContratoFiltro.DataBind()
|
||||
DdlTipoContratoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
Dim ObjEdoc As New ClsEdocumentacion
|
||||
|
||||
If ObjEdoc.DocumentacionGet(-1, -1, 1, UsuarioActual.CveEmpresa, 3) Then
|
||||
DdlDocumentacion.DataSource = ObjEdoc.DtResultados
|
||||
Else
|
||||
DdlDocumentacion.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjEdoc.Dispose()
|
||||
|
||||
DdlDocumentacion.DataBind()
|
||||
DdlDocumentacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.GetTiposContratosDcumentos(UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.GetTiposContratosDcumentos(UsuarioActual.CveEmpresa, DdlDocumentacion.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjProv.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
@@ -30,7 +66,7 @@ Partial Class Edoc_CatDocumentosContratos
|
||||
ObjProv.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -49,4 +85,7 @@ Partial Class Edoc_CatDocumentosContratos
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -71,23 +71,47 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="portlet-body">
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 ">Estatus:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100%" >
|
||||
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1" >Vigente</asp:ListItem>
|
||||
<asp:ListItem Value="2" >Rescindido</asp:ListItem>
|
||||
<asp:ListItem Value="3" >Suspendido</asp:ListItem>
|
||||
<asp:ListItem Value="4" >Terminado</asp:ListItem>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-2" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-2" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -37,6 +37,9 @@ Partial Class Proveedores_Contratos
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
txtFechaI.Text = $"01/01/{Now.Year}"
|
||||
txtFechaF.Text = $"31/12/{Now.AddYears(3).Year}"
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -47,7 +50,7 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.GetContrato(-1, DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlProveedorFiltro.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.GetContrato(-1, DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlProveedorFiltro.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero, -1, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate) Then
|
||||
GvDatos.DataSource = ObjProv.DtResultados
|
||||
DtDatos = ObjProv.DtResultados
|
||||
Else
|
||||
|
||||
1093
Empresas/Grales/Formatos/RepAuxiliarFacturas.rdlc
Normal file
1093
Empresas/Grales/Formatos/RepAuxiliarFacturas.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -52,10 +52,10 @@
|
||||
<Width>4.42895cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.2021cm</Width>
|
||||
<Width>3.06732cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.36938cm</Width>
|
||||
<Width>3.6031cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.89562cm</Width>
|
||||
@@ -156,7 +156,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha Ven.</Value>
|
||||
<Value>Fecha Vencimiento.</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
@@ -191,7 +191,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Movto.</Value>
|
||||
<Value>Cheque.</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
@@ -226,14 +226,14 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Abono</Value>
|
||||
<Value>Abonado</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
@@ -250,47 +250,14 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<ColSpan>2</ColSpan>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox21">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox21</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>Silver</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>Silver</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell />
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<Height>0.46771cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -303,7 +270,8 @@
|
||||
<TextRun>
|
||||
<Value>= IIF( IsNothing(Fields!CveVenta.Value) , (Fields!Banco.Value & " - " & Fields!NumCuenta.Value),Fields!SerieFolio.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -336,7 +304,8 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Fecha.Value</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -372,7 +341,8 @@
|
||||
<TextRun>
|
||||
<Value>= IIF( IsNothing(Fields!CveVenta.Value), Fields!FechaDocumento.Value,Fields!FechaVencimiento.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -408,7 +378,8 @@
|
||||
<TextRun>
|
||||
<Value>= IIF( IsNothing(Fields!CveVenta.Value) , Fields!FolioCobro.Value,"")</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -441,7 +412,8 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!ImporteAbonado.Value</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
<Format>'$'#,0.00;('$'#,0.00)</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -478,7 +450,8 @@
|
||||
<TextRun>
|
||||
<Value>=IIF(Fields!CveVenta.Value > 0,Fields!MonedaVenta.Value, Fields!MonedaIE.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -527,8 +500,8 @@
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>1.00112cm</Top>
|
||||
<Left>0.12912cm</Left>
|
||||
<Height>1.2cm</Height>
|
||||
<Width>19.74272cm</Width>
|
||||
<Height>1.06771cm</Height>
|
||||
<Width>19.84166cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>SubProyecto</Value>
|
||||
<Value>=Parameters!SubProyectoHeader.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -1485,6 +1485,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="SubProyectoHeader">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<Language>es-MX</Language>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
|
||||
@@ -864,17 +864,18 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
{
|
||||
|
||||
ClsVentas ObjVenta = new ClsVentas();
|
||||
if (ObjVenta.GetVentaDetalle(CveVenta))
|
||||
if (ObjVenta.GetVenta(CveVenta,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DataTable VentasDetalle = ObjVenta.DtResultados;
|
||||
if (VentasDetalle.Rows.Count > 0)
|
||||
if (ObjVenta.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
double Total = VentasDetalle.SUM("Total");
|
||||
DataRow VentasDetalle = ObjVenta.DtResultados.Rows[0];
|
||||
double Total = VentasDetalle["Total"].ToString().ToDouble();
|
||||
bool Mostrar = (Total >= 100000.00);
|
||||
tdLblPolizaSeguro.Visible = Mostrar;
|
||||
tdTxtPolizaSeguro.Visible = Mostrar;
|
||||
}
|
||||
}
|
||||
ObjVenta.Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -806,7 +806,7 @@ Partial Class Inventarios_Apartados
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad")))
|
||||
If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero > 0 Then
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero).FiltraParametros("Predeterminado = 1")
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
|
||||
@@ -290,6 +290,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
RVFecha.MaximumValue = Now.ToShortDateString
|
||||
|
||||
If Not UsuarioActual.CveEmpresa = 48 Then
|
||||
TxtFecha.Enabled = False
|
||||
ImgFecha.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
CantidadTotal = 0
|
||||
IndexSeccionAlmacen = 0
|
||||
@@ -482,6 +487,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlCConcepto.DataSource = GlobalDTInvConceptos.FiltraParametros("CveConcepto NOT IN (4,5)")
|
||||
DdlCConcepto.DataBind()
|
||||
|
||||
|
||||
'Llenar el dropdownlist de almacén
|
||||
If Not IfNull(Request("CI"), -1).ToString.ToEntero > 0 Then
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
@@ -508,6 +514,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlConcepto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
CargaPS()
|
||||
|
||||
' CargaDdlPaqueteria()
|
||||
@@ -2025,11 +2033,16 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlConcepto.Items.Insert(0, New ListItem("Entrada Almacen ", "2"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 72 AndAlso CveTipoAlmacen.Contiene(12, 14, 19) AndAlso (UsuarioActual.CveUsuario = 2185 OrElse UsuarioActual.CveRol = 1) Then
|
||||
|
||||
If UsuarioActual.CveEmpresa = 72 AndAlso (UsuarioActual.CveUsuario = 2185 OrElse UsuarioActual.CveRol = 1) Then
|
||||
|
||||
'DdlConcepto.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlConcepto.Items.Add(New ListItem("Entrada por Ajuste", "32"))
|
||||
DdlConcepto.Items.Add(New ListItem("Salida por Ajuste", "34"))
|
||||
|
||||
If CveTipoAlmacen.Contiene(12, 14, 19) Then
|
||||
DdlConcepto.Items.Add(New ListItem("Salida por Ajuste", "34"))
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -67,6 +67,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-ad-pdf"></i> Genera PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCargarMaximosMinimos" OnClick="LnkCargarMaximosMinimos_Click" runat="server"><i class="fa fa-ad-excel"></i> Cargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Genera Excel</asp:LinkButton>
|
||||
</li>
|
||||
@@ -149,6 +152,11 @@
|
||||
<asp:Label ID="LtMarca" CssClass="truncate2" runat="server" Text='<%# Eval("Marca")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="30%" HeaderText="Almacen">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtAlmacen" CssClass="truncate2" runat="server" Text='<%# Eval("Almacen")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10%" HeaderText="Existencia" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtExistencia" runat="server" Text='<%# If(Eval("Existencia").ToString() = "0" Or Eval("Existencia").ToString() = "", "-", (Eval("Existencia", "{0:#,##0.##}"))) %>'></asp:Literal>
|
||||
@@ -347,7 +355,74 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div id="DmodalCargarMaximosMinimos" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="Upcargamasiva" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content rowpadding">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title uppercase" runat="server" style="text-align: left">CARGA MáSIVA DE MAXIMOS Y MINIMOS</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="portlet light smmallpadding bordered" id="DownFormato">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-download font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Paso 1: Formato</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="text-center">
|
||||
|
||||
<asp:LinkButton ID="LnkDescargarFormato" OnClick="LnkDescargarFormato_Click" CssClass="btn btn-primary" runat="server"> <i class="fa fa-download"></i> Descargar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light smmallpadding bordered" id="CargarArchivo">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-download font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Paso 2:Cargar Formato</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding " style="display: none;">
|
||||
|
||||
<asp:TextBox ID="TxtArchivoMaxMin" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkUpFile" OnClick="LnkUpFile_Click" CssClass="btn btn-primary" runat="server"><i class="fa fa-upload"></i> Subir</asp:LinkButton>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargarFormato" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
|
||||
@@ -55,7 +55,6 @@ Partial Class Inventarios_RepMaximoMinimo
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
@@ -357,4 +356,82 @@ Partial Class Inventarios_RepMaximoMinimo
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkUpFile_Click(sender As Object, e As EventArgs)
|
||||
Dim Filesgral As List(Of Archivo) = TxtArchivoMaxMin.getfiles().Archivos
|
||||
Dim continuar As Boolean = Filesgral.Count > 0
|
||||
Dim stringError As String = ""
|
||||
Dim fileItem As Archivo = If(continuar, Filesgral(0), Nothing)
|
||||
|
||||
If continuar Then
|
||||
Dim FileExtension As String = fileItem.Extencion.ToUpper()
|
||||
|
||||
If FileExtension = "XLS" Or FileExtension = "XLSX" Or FileExtension = "CSV" Then
|
||||
Else
|
||||
continuar = False
|
||||
stringError = "No se inserto un archivo de tipo Excel"
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DTEXcel As DataTable = New DataTable()
|
||||
If continuar Then
|
||||
DTEXcel = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, True)
|
||||
DTEXcel.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||
DTEXcel.Columns.Add(New DataColumn("CveAlmacen", GetType(Integer)))
|
||||
Dim dtAlmacen As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1)
|
||||
For Each drow As DataRow In DTEXcel.Rows
|
||||
Dim Drps As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa, -1, "-1", -1, -1, drow("Codigo").ToString())
|
||||
Dim dralmacen As DataRow = dtAlmacen.FiltroPrimero(String.Format("Almacen='{0}'", drow("Almacen")))
|
||||
If Drps.Rows.Count > 0 Then
|
||||
drow("CvePS") = Drps.Rows(0)("CvePS")
|
||||
End If
|
||||
If Not IsNothing(dralmacen) Then
|
||||
drow("CveAlmacen") = dralmacen("CveAlmacen")
|
||||
End If
|
||||
DTEXcel.AcceptChanges()
|
||||
Next
|
||||
continuar = True
|
||||
End If
|
||||
If continuar Then
|
||||
|
||||
Using ObjMaxMin As New ClsInventarios
|
||||
ObjMaxMin.IniciaTransacSQL()
|
||||
Dim DtResultados As New DataTable
|
||||
If ObjMaxMin.RepMaximoMinimo(-1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DtResultados = ObjMaxMin.DtResultados
|
||||
End If
|
||||
For Each drow As DataRow In DTEXcel.Select("CvePS>0 AND CveAlmacen >0")
|
||||
If continuar Then
|
||||
If IsNothing(DtResultados.FiltroPrimero(String.Format("CveAlmacen={0} AND CvePS={1}", drow("CveAlmacen").ToString().ToEntero(), drow("CvePS").ToString().ToEntero()))) Then
|
||||
continuar = ObjMaxMin.AddAlmacenMaximoMinimo(drow("CveAlmacen").ToString().ToEntero(), drow("CvePS").ToString().ToEntero(), drow("Maximo").ToString().ToDouble(), drow("Minimo").ToString().ToDouble(), UsuarioActual.CveUsuario)
|
||||
Else
|
||||
continuar = ObjMaxMin.UpdateAlmacenMaximoMinimo(drow("CveAlmacen").ToString().ToEntero(), drow("CvePS").ToString().ToEntero(), drow("Maximo").ToString().ToDouble(), drow("Minimo").ToString().ToDouble(), UsuarioActual.CveUsuario)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If continuar Then
|
||||
ObjMaxMin.Commit()
|
||||
Else
|
||||
ObjMaxMin.RollBack()
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
If continuar Then
|
||||
CargaGrid()
|
||||
Alert("los cambios se han guardado satisfactoriamente")
|
||||
RegistraScript("$('#DmodalCargarMaximosMinimos').modal('hide');")
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkCargarMaximosMinimos_Click(sender As Object, e As EventArgs)
|
||||
TxtArchivoMaxMin.Text = ""
|
||||
RegistraScript("$('#DmodalCargarMaximosMinimos').modal();")
|
||||
Upcargamasiva.Update()
|
||||
End Sub
|
||||
Protected Sub LnkDescargarFormato_Click(sender As Object, e As EventArgs)
|
||||
Using ObjMaxMin As New ClsInventarios
|
||||
If ObjMaxMin.RepMaximoMinimo(-1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
ObjMaxMin.DtResultados.FiltraParametros("", "", New String() {"Codigo", "Almacen", "Maximo", "Minimo"}).ExportToExcel(String.Format("MaximosyMinimos{0:dd-MM-yyyy}", DateTime.Now))
|
||||
End If
|
||||
|
||||
End Using
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -202,14 +202,14 @@
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Traspaso de Almacén"
|
||||
ToolTip="Remisiones sin Facturar"
|
||||
ToolTip="Remisiones sin Facturar" data-rows="2"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Valor" DataField="Valor" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n}" />
|
||||
</Columns>
|
||||
|
||||
@@ -107,10 +107,15 @@ Partial Class RepTraspasoAlmacen
|
||||
|
||||
e.Row.Cells(0).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida"))
|
||||
e.Row.Cells(1).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString)
|
||||
e.Row.Cells(3).Text = String.Format("Almacen Origen: {0} Almacen Destino: {1} Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio"))
|
||||
e.Row.Cells(2).Text = String.Format("<span style =""white-space: nowrap;"">{0}</span>", e.Row.DBCampo("Almacen"))
|
||||
e.Row.Cells(3).Text = String.Format("<span style =""white-space: nowrap;"">{0}</span>", e.Row.DBCampo("AlmacenDestino"))
|
||||
e.Row.Cells(4).Text = String.Format("Responsable: {0}", e.Row.DBCampo("Recibio"))
|
||||
ElseIf e.Row.DBCampo("FechaMovto") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = "Total General"
|
||||
e.Row.Cells(2).Text = String.Format("<span style =""white-space: nowrap;"">Almacen Origen</span>")
|
||||
e.Row.Cells(3).Text = String.Format("<span style =""white-space: nowrap;"">Almacen Destino</span>")
|
||||
Else
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -127,6 +127,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Try
|
||||
Dim CvePersonal As Integer = Request.QueryString("CvePersonal").ToString.ToEntero
|
||||
OcultarControles(CvePersonal)
|
||||
TxtFecha.Enabled = False
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
@@ -140,7 +141,8 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
Private Sub OcultarControles(CvePersonal As Integer)
|
||||
|
||||
DdlPersonal.ddl.SelectedValueExist(CvePersonal)
|
||||
DdlPersonal.SelectedValue = CvePersonal.ToString()
|
||||
DdlPersonal.SelectedText = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal).FiltroPrimeroValor("NombreCompleto")
|
||||
DdlPersonal.Enabled = False
|
||||
DVTipo.Visible = False
|
||||
End Sub
|
||||
@@ -931,10 +933,11 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
If Not TieneError Then
|
||||
Dim Msg As New StringBuilder
|
||||
If Concepto = 23 Then
|
||||
Msg.AppendFormat("<br/>Resguardo con Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoSalida, FolioSalida)
|
||||
'FolioEntrada
|
||||
Msg.AppendFormat("<br/>Resguardo con Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoSalida, FolioEntrada)
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Resguardo</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
||||
|
||||
Msg.AppendFormat("<br/><br/><br/>El Movimiento de control se registro con el Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
||||
Msg.AppendFormat("<br/><br/><br/>El Movimiento de control se registro con el Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioSalida)
|
||||
Else
|
||||
Msg.AppendFormat("<br/>Liberación de Resguardo con Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir liberación de Resguardo</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida" EmptyDataText="No se encontraron Productos registrados" ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida,Serie" EmptyDataText="No se encontraron Productos registrados" ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" HeaderStyle-HorizontalAlign="Left" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Center" DataField="Cantidad" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="U.M" HeaderStyle-HorizontalAlign="Center" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Center" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
@@ -308,6 +308,7 @@
|
||||
<%--<asp:BoundField HeaderText="Direccion Envio" HeaderStyle-HorizontalAlign="Left" DataField="DireccionEnvio" ItemStyle-Width="20%" />--%>
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Precio" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Right" DataField="Precio" Visible="false" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Serie" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" DataField="Serie" Visible="false" ItemStyle-Width="5%" />
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="Si" />
|
||||
@@ -475,6 +476,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row marginRowLeft">
|
||||
<div class="col-md-8 form-group form-md-line-input input-iconright" id="Div4" runat="server" visible="false">
|
||||
<asp:TextBox runat="server" ID="TxtSerie" CssClass="form-control"/>
|
||||
<label>Serie:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -36,7 +36,6 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
ViewState("CveDireccionEnvio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property CveUsuarioAutoriza As Integer
|
||||
' Get
|
||||
' If ViewState("CveUsuarioAutoriza") Is Nothing Then
|
||||
@@ -94,8 +93,9 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
TempDT.Columns.Add("Precio", Type.GetType("System.Double"))
|
||||
TempDT.Columns.Add("Observaciones", Type.GetType("System.String"))
|
||||
TempDT.Columns.Add("CveContratoDetalle", Type.GetType("System.Int32"))
|
||||
'TempDT.Columns.Add("CveContratoDetalle", Type.GetType("System.Int32"))
|
||||
'TempDT.Columns.Add("CveDireccionEnvio", Type.GetType("System.Int32"))
|
||||
'TempDT.Columns.Add("DireccionEnvio", Type.GetType("System.String"))
|
||||
TempDT.Columns.Add("Serie", Type.GetType("System.String"))
|
||||
|
||||
TempDT.Columns.Add()
|
||||
End Sub
|
||||
@@ -153,6 +153,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
GvDatos.Columns(4).Visible = False
|
||||
GvDatos.Columns(5).Visible = True
|
||||
DivFolio.Visible = True
|
||||
LbFolio.Text = ObjInventarios.DtResultados.Rows(0)("FolioTraspaso").ToString
|
||||
TxtObservaciones.Text = ObjInventarios.DtResultados.Rows(0)("ObservacionesTraspaso").ToString
|
||||
@@ -284,6 +285,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
ObjClientes.Dispose()
|
||||
MostarSerieColumn()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -347,6 +349,13 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Row("UnidadMedida") = DdlUM.SelectedItem.Text
|
||||
Row("Observaciones") = ""
|
||||
|
||||
If Div4.Visible Then
|
||||
Row("Serie") = TxtSerie.Text
|
||||
GvDatos.Columns(5).Visible = True
|
||||
Else
|
||||
Row("Serie") = "-1"
|
||||
End If
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia As Double = ObjInventarios.GetExistenciasPS(DdlProductoServicio.SelectedValue.ToEntero, DdlUM.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"))
|
||||
ObjInventarios.Dispose()
|
||||
@@ -612,8 +621,9 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Dim Precio As Double = Row.DataKey("Precio").ToEntero
|
||||
Dim Observaciones As String = Row.DataKey("Observaciones")
|
||||
Dim CveContratoDetalle As Integer = Row.DataKey("CveContratoDetalle").ToEntero
|
||||
Dim Serie As String = Row.DataKey("Serie")
|
||||
|
||||
If Not ObjInventarios.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, Precio, Observaciones, CveContratoDetalle) Then
|
||||
If Not ObjInventarios.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, Precio, Observaciones, CveContratoDetalle, Serie) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -767,6 +777,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
params.Add(New ReportParameter("Paqueteria", DdlPaqueteria.SelectedItem.Text))
|
||||
params.Add(New ReportParameter("NumeroContrato", NumContrato))
|
||||
params.Add(New ReportParameter("FechaEnvio", TxtFecha.Text.Substring(0, 10)))
|
||||
params.Add(New ReportParameter("TieneSerie", GvDatos.Columns(5).Visible.ToString()))
|
||||
|
||||
Dim RutaFormato As String = String.Format("Empresas\{0}\Formatos\RepTrasladoSolicitud.rdlc", UsuarioActual.CveEmpresa)
|
||||
Dim RutaFormatoDefault As String = String.Format("Empresas\Grales\Formatos\RepTrasladoSolicitud.rdlc")
|
||||
@@ -963,6 +974,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
DdlUM.SelectedValue = "-1"
|
||||
DdlUM.DataBind()
|
||||
DdlUM.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||
Dim AplicaSerie As Boolean = drPS("AplicaSerie").ToString = "True"
|
||||
Div4.Visible = AplicaSerie
|
||||
End If
|
||||
UpPS.Update()
|
||||
UpDatos.Update()
|
||||
@@ -1028,16 +1041,20 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Dim MandaCorre As New ClsSisMail
|
||||
MandaCorre.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoDestino, $"Solicitud de Autorización de traspaso #{Folio}", SB.ToString, Displayname:="SIG Notificaciones: Solicitud de Traspaso")
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub MostarSerieColumn()
|
||||
Dim Mostrar As Boolean = False
|
||||
For Each row As GridViewRow In GvDatos.Rows
|
||||
Dim Serie As String = row.DataKey("Serie").ToString
|
||||
If Serie IsNot "-1" And Serie IsNot "" Then
|
||||
Mostrar = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
GvDatos.Columns(5).Visible = Mostrar
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -2845,6 +2845,19 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
UpDatos.Update()
|
||||
|
||||
Dim DrAlmO As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrAlmO("CveTipoAlmacen").ToString.ToEntero = 26 Then 'costeados
|
||||
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (26) AND Estatus = 'Activo'")
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,24) AND Estatus = 'Activo'")
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -44,17 +44,18 @@ table > tr > th.adsCol, table.table > tr > th.adsCol {
|
||||
.AdsBody .ADSCroll::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.AdsBody .ADSCroll::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
width: 8px;
|
||||
height:10px;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.AdsBody .ADSCroll::-webkit-scrollbar-thumb {
|
||||
background-color: #AAA;
|
||||
border-radius: 10px;
|
||||
border-radius: 4px;
|
||||
background-image: -webkit-linear-gradient(90deg, rgba(0, 0, 0, .2) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .2) 50%, rgba(0, 0, 0, .2) 75%, transparent 75%, transparent)
|
||||
}
|
||||
|
||||
|
||||
@@ -1485,6 +1485,10 @@
|
||||
|
||||
<asp:DropDownList ID="DdlUsuariosAsignado" CssClass="select2me" Width="200px" DataTextField="Nombre" DataValueField="CveUsuario" runat="server"></asp:DropDownList>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="PnlUsuarioYaAsignado" Visible="false" Style="text-align:left;font-size:14px;height:34px;margin-top:10px">
|
||||
Asignado a:
|
||||
<asp:Label runat="server" ID="LblUsuarioYaAsignado"/><br /><br />
|
||||
</asp:Panel>
|
||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary" Style="margin-top: 5px;" runat="server" Text="Guardar" Width="170px" ValidationGroup="GrpGuardar" />
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -18,6 +18,14 @@ Partial Class OC
|
||||
ViewState("CveEmpresaActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveUsuarioAsignado As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveUsuarioAsignado")), -1, ViewState("CveUsuarioAsignado").ToString.ToEntero)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveUsuarioAsignado") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoOC As String
|
||||
Get
|
||||
TipoOC = ViewState("TipoOC").ToString
|
||||
@@ -809,6 +817,7 @@ Partial Class OC
|
||||
End If
|
||||
|
||||
End If
|
||||
MostrarUsuarioAsignado()
|
||||
Me.Form.DefaultButton = ""
|
||||
End Sub
|
||||
|
||||
@@ -1212,7 +1221,7 @@ Partial Class OC
|
||||
MPContrato.Enabled = False
|
||||
'SOLICITUD DE ANTICIPO
|
||||
CveIEAnticipo = objOC.CveIEAnticipo
|
||||
|
||||
CveUsuarioAsignado = objOC.CveUsuarioAsignado
|
||||
'LtImporteIEAnticipo.Text = objOC.ImporteAnticipo.FormatoNumero
|
||||
'LtFolioIEAnticipo.Text = $"<a class=""Texto"" href=""/Bancos/IE.aspx?CveIE={objOC.CveIEAnticipo}"" target=""_blank"">{objOC.FolioIEAnticipo}</a>"
|
||||
|
||||
@@ -3120,7 +3129,7 @@ Partial Class OC
|
||||
|
||||
Else
|
||||
If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
|
||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero(), CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||
Promocion:=Promocion) Then
|
||||
@@ -5397,9 +5406,11 @@ Partial Class OC
|
||||
|
||||
If CveEmpresaActual.Contiene(13, 83, 72, 80) Then
|
||||
PnlUsuarioAsignado.Visible = True
|
||||
DdlUsuariosAsignado.DataSource = GlobalDTUsuarios(CveEmpresa:=CveEmpresaActual)
|
||||
DdlUsuariosAsignado.DataSource = GlobalDTUsuarios(CveEmpresa:=CveEmpresaActual).FiltraParametros("Estatus = 1", "Nombre")
|
||||
DdlUsuariosAsignado.DataBind()
|
||||
DdlUsuariosAsignado.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
DdlUsuariosAsignado.SelectedValueExist(CveUsuarioAsignado)
|
||||
|
||||
End If
|
||||
Else
|
||||
VerificaCotizacionesGanadoras()
|
||||
@@ -8028,6 +8039,13 @@ Partial Class OC
|
||||
UpSolicitarAnticipo.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub MostrarUsuarioAsignado()
|
||||
If CveUsuarioAsignado > 0 Then
|
||||
PnlUsuarioYaAsignado.Visible = True
|
||||
Dim NombreUsuario As String = GlobalDTUsuarios(CveUsuario:=CveUsuarioAsignado).FiltroPrimeroValor("Nombre")
|
||||
LblUsuarioYaAsignado.Text = NombreUsuario
|
||||
End If
|
||||
End Sub
|
||||
'Private Sub CargaVentaRelacionada()
|
||||
' Dim GridViewPSAux As GridView = GvD
|
||||
' Dim CveOCDetalle As New StringBuilder()
|
||||
|
||||
@@ -97,6 +97,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LbPorAtender" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel por Atender</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LbPendientesPDF" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Pendientes</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LbPendientes" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel Pendientes</asp:LinkButton>
|
||||
</li>
|
||||
@@ -107,6 +110,7 @@
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LbPorAtender" />
|
||||
<asp:PostBackTrigger ControlID="LbPendientes" />
|
||||
<asp:PostBackTrigger ControlID="LbPendientesPDF" />
|
||||
<asp:PostBackTrigger ControlID="LbConsultar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -22,9 +22,17 @@ Partial Class RepOC
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPorAtender") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
Private Property DtPendiente As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtPendiente"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPendiente") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
txtFechaI.Text = Now.AddMonths(-3).ToShortDateString
|
||||
@@ -87,6 +95,7 @@ Partial Class RepOC
|
||||
CargarCentrosDeCosto(DdlProyectos, DdlSubProyectos, LblProyecto, LblSubProyecto)
|
||||
GvPorAtender.Columns(5).HeaderText = LblSubProyecto.Text
|
||||
GvPendientes.Columns(5).HeaderText = LblSubProyecto.Text
|
||||
GvConsultar.Columns(5).HeaderText = LblSubProyecto.Text
|
||||
DivProyectos.Visible = DdlProyectos.Visible
|
||||
End Sub
|
||||
|
||||
@@ -101,7 +110,7 @@ Partial Class RepOC
|
||||
ddlUsuario.DataBind()
|
||||
ddlUsuario.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlUsuarioAsignado.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
DdlUsuarioAsignado.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 1", "Nombre")
|
||||
DdlUsuarioAsignado.DataBind()
|
||||
DdlUsuarioAsignado.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
@@ -182,6 +191,7 @@ Partial Class RepOC
|
||||
Protected Sub btnConsultarPendientes_Click(sender As Object, e As EventArgs) Handles btnConsultarPendientes.Click
|
||||
LbPorAtender.Visible = True
|
||||
LbPendientes.Visible = True
|
||||
LbPendientesPDF.Visible = True
|
||||
LbConsultar.Visible = False
|
||||
|
||||
Tab.Visible = True
|
||||
@@ -214,6 +224,7 @@ Partial Class RepOC
|
||||
DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||
CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then
|
||||
GvPendientes.DataSource = OC.DtResultados
|
||||
DtPendiente = OC.DtResultados
|
||||
GvPendientes.DataBind()
|
||||
'If (GvPendientes.Rows.Count > 0) Then
|
||||
' GvPendientes.UseAccessibleHeader = True
|
||||
@@ -312,6 +323,7 @@ Partial Class RepOC
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click
|
||||
LbPorAtender.Visible = False
|
||||
LbPendientes.Visible = False
|
||||
LbPendientesPDF.Visible = False
|
||||
LbConsultar.Visible = True
|
||||
DivConsultar.Visible = True
|
||||
DivPendiete.Visible = False
|
||||
@@ -330,7 +342,8 @@ Partial Class RepOC
|
||||
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then
|
||||
|
||||
GvConsultar.DataSource = OC.DtResultados
|
||||
DtOC = OC.DtResultados
|
||||
DtOC = OC.DtResultados
|
||||
DtPorAtender = OC.DtResultados
|
||||
LblTotal.Text = OC.DtResultados.SUM("Total").FormatoNumero
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(227) Then
|
||||
@@ -459,6 +472,7 @@ Partial Class RepOC
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Folio}{Tipo}{Proyecto}{SubProyecto}{Estatus}{AF}{Usuario}{FI}{FF}{Clasificacion}{Producto}{Completa}{Proveedor}{Cliente}"))
|
||||
params.Add(New ReportParameter("SubProyectoHeader", LblSubProyecto.Text))
|
||||
params.Add(New ReportParameter("Titulo", "REPORTE DE ORDENES DE COMPRA POR ATENDER"))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
@@ -480,7 +494,27 @@ Partial Class RepOC
|
||||
|
||||
End Sub
|
||||
Protected Sub LbPendientes_Click(sender As Object, e As System.EventArgs) Handles LbPendientes.Click
|
||||
GvPendientes.ExportToExcel("OrdenesCompraPendientes" & Now.ToShortDateString)
|
||||
'GvPendientes.ExportToExcel("OrdenesCompraPendientes" & Now.ToShortDateString)
|
||||
ImprimirPendientes("EXCEL")
|
||||
End Sub
|
||||
Protected Sub LbPendientesPDF_Click(sender As Object, e As System.EventArgs) Handles LbPendientesPDF.Click
|
||||
ImprimirPendientes("PDF")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirPendientes(format As String)
|
||||
If UsuarioActual.CveEmpresa.Contiene(72) Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", If(txtFechaI.Text = "", "-1", txtFechaI.Text)))
|
||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text = "", "-1", txtFechaF.Text)))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString))
|
||||
params.Add(New ReportParameter("SubProyecto", LblSubProyecto.Text))
|
||||
|
||||
ImprimirPDF(String.Format(UsuarioActual.Empresa.Ruta & "/Formatos/RepRequisicionesOC.rdlc", UsuarioActual.Empresa.Ruta), DtPendiente, params, Formato:=format)
|
||||
Else
|
||||
GvConsultar.ExportToExcel("OrdenesCompra" & Now.ToShortDateString)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LbConsultar_Click(sender As Object, e As System.EventArgs) Handles LbConsultar.Click
|
||||
If UsuarioActual.CveEmpresa.Contiene(72) Then
|
||||
|
||||
@@ -138,10 +138,10 @@
|
||||
<asp:LinkButton ID="LnkUpUsuarios" OnClick="LnkUpUsuarios_Click" Visible="true" runat="server"><i class="fa fa-pencil"></i> Actualizar Participantes</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkOpenModalAsistencia" OnClick="LnkOpenModalAsistencia_Click" Visible="false" runat="server"><i class="fa fa-users"></i>Asistencia</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkOpenModalAsistencia" OnClick="LnkOpenModalAsistencia_Click" Visible="false" runat="server"><i class="fa fa-users"></i>Asistencia</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkEnviarCorreo" OnClick="LnkEnviarCorreo_Click" Visible="false" runat="server"><i class="fa fa-paper-plane-o"></i>Enviar correo</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkEnviarCorreo" OnClick="LnkEnviarCorreo_Click" Visible="false" runat="server"><i class="fa fa-paper-plane-o"></i>Enviar correo</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -150,7 +150,7 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpContenido" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UpContenido" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
@@ -198,7 +198,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDuracion" runat="server" CssClass="form-control " CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtDuracion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDuracion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
@@ -219,7 +219,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6" style ="display:none;">
|
||||
<div class="col-sm-6" style="display: none;">
|
||||
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px " placeholder=""></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVtxtFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>--%>
|
||||
@@ -445,7 +445,7 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id='<%= iddivTomarAsistencia %>' class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpTomarASistencia" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
@@ -470,7 +470,7 @@
|
||||
Asistió
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkAsistio" CssClass="ChkOk" Checked='<%# Eval("Asistencia").ToString()=="1" %>' runat="server" />
|
||||
<asp:CheckBox ID="ChkAsistio" CssClass="ChkOk" Checked='<%# Eval("Asistencia").ToString()=="1" %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
@@ -487,11 +487,11 @@
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtAsistentesExternos" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Externos" AssociatedControlID="TxtAsistentesExternos"></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtAsistentesExternos" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Externos" AssociatedControlID="TxtAsistentesExternos"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkUpAsistencia" OnClick="LnkUpAsistencia_Click" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
||||
@@ -509,7 +509,18 @@
|
||||
|
||||
|
||||
|
||||
function download(filename, text) {
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
|
||||
element.setAttribute('download', filename);
|
||||
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
|
||||
element.click();
|
||||
|
||||
document.body.removeChild(element);
|
||||
}
|
||||
|
||||
let CveRol = -1;
|
||||
let CveSucursal = -1;
|
||||
|
||||
@@ -401,7 +401,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
ruta = string.Format("{0}{1}", ruta, archivoname);//, ArchivoExtencion);
|
||||
System.IO.File.Move(rutaarchivoOri, ruta);
|
||||
}
|
||||
this.Alert("Se ha agregadó la nueva convocatoria", ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/ConvocatoriaDetalle.aspx?CveEvento={0}\");", CveEvento));
|
||||
this.Alert(string.Format("Se ha agregadó la nueva convocatoria.<br/><a href=\"data:text/plain;charset=utf-8,{0}\" download=\"Agendar.ics\" class=\"btn btn-default\">⏰ Agendar</a>", HttpUtility.UrlEncode(ICString)), ModExtensiones.TipoMensaje.MsgInformacion, string.Format("location.replace(\"/OI/ConvocatoriaDetalle.aspx?CveEvento={0}\");", CveEvento));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -422,7 +422,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
{
|
||||
objOI.Commit();
|
||||
enviarConvocatoria(RCveEvento);
|
||||
Alert("Convocatoria actualizada");
|
||||
Alert(string.Format("Convocatoria actualizada.<br/><a href=\"data:text/plain;charset=utf-8,{0}\" download=\"Agendar.ics\" class=\"btn btn-default\">⏰ Agendar</a>", HttpUtility.UrlEncode(ICString)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -585,14 +585,21 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
{
|
||||
return string.Format("{0}/{1}", HttpContext.Current.Request.Url.ToString().Replace(HttpContext.Current.Request.Url.PathAndQuery, ""), addstr);
|
||||
}
|
||||
string UsuarioDemail = "";
|
||||
private string MailgetBodyConvocatoria(int RCveEvento)
|
||||
string UsuarioDemail = "";
|
||||
string ICString = "";
|
||||
private void enviarConvocatoria(int RCveEvento)
|
||||
{
|
||||
|
||||
int Folio = 0; string Link = ""; string Asunto = ""; string Acuerdos = ""; string Descripcion = ""; DateTime DFechai = DateTime.MinValue; DateTime DFechaf = DateTime.MinValue;
|
||||
string Body;
|
||||
string UsuarioDe = "";
|
||||
|
||||
#region "Body"
|
||||
int Folio = 0; string Link = ""; string Asunto = ""; string Acuerdos = ""; string Descripcion = ""; DateTime DFechai = DateTime.MinValue; DateTime DFechaf = DateTime.MinValue;
|
||||
UsuarioDe = "";
|
||||
string UsuarioPara = "";
|
||||
string UsuarioDeAbr = "";
|
||||
string CorreoRegistro = "";
|
||||
|
||||
System.Data.DataTable dttareas;
|
||||
using (ClsOIEventos ObjOI_E = new ClsOIEventos())
|
||||
{
|
||||
@@ -600,7 +607,8 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
{
|
||||
System.Data.DataRow drow = ObjOI_E.DtResultados.Rows[0];
|
||||
UsuarioDe = drow["NombreRegistro"].ToString();
|
||||
UsuarioDemail= drow["NombreRegistro"].ToString();
|
||||
UsuarioDemail = drow["NombreRegistro"].ToString();
|
||||
CorreoRegistro = drow["CorreoRegistro"].ToString().Split(',')[0].Split(';')[0];
|
||||
Folio = drow["Folio"].ToString().ToEntero();
|
||||
Link = GetDominio(string.Format("OI/ConvocatoriaDetalle.aspx?CveEvento={0}", RCveEvento));
|
||||
Asunto = drow["Asunto"].ToString();
|
||||
@@ -700,13 +708,12 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
StrMail.Append(" </div>");
|
||||
StrMail.Append(" </div>");
|
||||
StrMail.Append("</html></body>");
|
||||
return StrMail.ToString();
|
||||
}
|
||||
private void enviarConvocatoria(int RCveEvento)
|
||||
{
|
||||
|
||||
string Body;
|
||||
Body = MailgetBodyConvocatoria(RCveEvento);
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
Body = StrMail.ToString();//MailgetBodyConvocatoria(RCveEvento);
|
||||
string ArrayCC = "";
|
||||
//ViewState("Para") = GlobalDTUsuarios(CveUsuarioIng)(0)("correo").ToString;
|
||||
//ViewState("Asunto") = string.Format("SIG - Minuta {0}", TxtAsunto.Text);
|
||||
@@ -728,7 +735,11 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
}
|
||||
List<ClsSisMail.ArchivoMail> LSRutasMail = new List<ClsSisMail.ArchivoMail>();
|
||||
ClsSisMail.ArchivoMail mailfile = new ClsSisMail.ArchivoMail { Ruta = string.Format("{0}Imagenes\\Bell.png", ModExtensiones.DirectorioBaseEmpresas), NombreArchivo = "Bell.png" };
|
||||
LSRutasMail.Add(mailfile);
|
||||
LSRutasMail.Add(mailfile);
|
||||
ICString = GenerateIcsContent(string.Format("{0:yyyy/MM/dd} 00:00", txtFechaI.Text.ToDateTime()).ToDateTime(), string.Format("{0:yyyy/MM/dd} 23:59", txtFechaI.Text.ToDateTime()).ToDateTime(),
|
||||
UsuarioDe, CorreoRegistro, TxtLugar.Text, Asunto,Descripcion,string.Format("Convocatoria_{0}",RCveEvento) );
|
||||
ClsSisMail.ArchivoMail ICSFile = new ClsSisMail.ArchivoMail { Ruta = "",ArchivoBinario= Encoding.ASCII.GetBytes(ICString), NombreArchivo = "Agendar.ics" };
|
||||
LSRutasMail.Add(ICSFile);
|
||||
ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail();
|
||||
|
||||
|
||||
@@ -742,31 +753,44 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas
|
||||
}
|
||||
|
||||
|
||||
public string GenerateIcsContent(DateTime dateStart,
|
||||
DateTime dateEnd, string email, string location,
|
||||
string summary, string description)
|
||||
public string GenerateIcsContent(DateTime FechaInicio, DateTime FechaFin, string Nombreorganizador, string Correoorganizador, string Ubicacion, string Asunto, string descripcion, string uuid)
|
||||
{
|
||||
string DateFormat = "yyyyMMddTHHmmssZ";
|
||||
var s = dateStart.ToUniversalTime().ToString(DateFormat);
|
||||
var e = dateEnd.ToUniversalTime().ToString(DateFormat);
|
||||
var iCal = string.Format(@"BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
METHOD:PUBLISH
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:MAILTO:{0}
|
||||
DTSTART:{1}
|
||||
DTEND:{2}
|
||||
LOCATION:{3}
|
||||
UID:{4}
|
||||
DTSTAMP:{4}
|
||||
SUMMARY:{5}
|
||||
DESCRIPTION:{6}
|
||||
PRIORITY:5
|
||||
CLASS:PUBLIC
|
||||
END:VEVENT
|
||||
END:VCALENDAR", email, s, e, location,
|
||||
DateTime.Now.ToUniversalTime().ToString(DateFormat),
|
||||
summary, description);
|
||||
return iCal;
|
||||
var DTSTART = FechaInicio.ToUniversalTime().ToString("yyyyMMddTHHmmssZ");
|
||||
var DTEND = FechaFin.ToUniversalTime().ToString("yyyyMMddTHHmmssZ");
|
||||
|
||||
/*
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
|
||||
BEGIN:VEVENT
|
||||
UID:uid1@example.com
|
||||
DTSTAMP:19970714T170000Z
|
||||
ORGANIZER;CN=John Doe:MAILTO:john.doe@example.com
|
||||
DTSTART:19970714T170000Z
|
||||
DTEND:19970715T035959Z
|
||||
SUMMARY:Bastille Day Party
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
*/
|
||||
StringBuilder strICS = new StringBuilder();
|
||||
strICS.AppendLine("BEGIN:VCALENDAR");
|
||||
strICS.AppendLine("VERSION:2.0");
|
||||
strICS.AppendLine("METHOD:PUBLISH");
|
||||
strICS.AppendLine("BEGIN:VEVENT");
|
||||
strICS.AppendLine(string.Format("ORGANIZER;CN={0}:MAILTO:{1}", Nombreorganizador.Replace(":", "").Replace(";", ""), Correoorganizador));
|
||||
strICS.AppendLine(string.Format("DTSTART:{0}", DTSTART));
|
||||
strICS.AppendLine(string.Format("DTEND:{0}", DTEND));
|
||||
strICS.AppendLine(string.Format("LOCATION:{0}", Ubicacion));
|
||||
strICS.AppendLine(string.Format("UID:{0}", uuid));
|
||||
strICS.AppendLine(string.Format("DTSTAMP:{0}", DateTime.Now.ToUniversalTime().ToString("yyyyMMddTHHmmssZ")));
|
||||
strICS.AppendLine(string.Format("SUMMARY:{0}", Asunto));
|
||||
strICS.AppendLine(string.Format("DESCRIPTION:{0}", descripcion));
|
||||
strICS.AppendLine("PRIORITY:5");
|
||||
strICS.AppendLine("CLASS:PUBLIC");
|
||||
strICS.AppendLine("END:VEVENT");
|
||||
strICS.AppendLine("END:VCALENDAR");
|
||||
return strICS.ToString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -16,7 +16,17 @@
|
||||
<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 runat="server" ID="LkbPDF" OnClick="LkbPDF_Click" data-toggle="tooltip" data-placement="left" title="ImprimirPDF" Text="<i class='fa fa-file-pdf-o'></i> PDF"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LkbExcel" OnClick="LkbExcel_Click" data-toggle="tooltip" data-placement="left" title="ImprimirExcel" Text="<i class='fa fa-file-excel-o'></i> Excel"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LkbPDF"/>
|
||||
<asp:PostBackTrigger ControlID="LkbExcel"/>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
@@ -154,7 +164,7 @@
|
||||
<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>
|
||||
<textarea runat="server" id="TxtComentarios" class="form-control" style="border: 1px solid #e5e5e5" rows="2" maxlength="300"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarPropuesta" OnClick="BtnAgregarPropuesta_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
|
||||
@@ -8,6 +8,7 @@ using Extensiones;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
@@ -89,6 +90,19 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
ViewState["CveAsignacion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable DtUsuariosParticipantes
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((DataTable) ViewState["DtUsuariosParticipantes"]);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtUsuariosParticipantes"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -149,6 +163,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
if (ObjOI.GetDocumentoAutorizacion(this.CveDocumento))
|
||||
{
|
||||
GvUsuarios.DataSource = ObjOI.DtResultados;
|
||||
DtUsuariosParticipantes = ObjOI.DtResultados;
|
||||
UsuariosAux = ObjOI.DtResultados;
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
@@ -300,7 +315,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
bool MostrarSegunEnProceso = (LblEstatus.Text == "Estatus: En Proceso");
|
||||
LkbActualizar.Visible = !(MostrarSegunRechazado) && (UsuarioActual.CveUsuario == this.CveUsuarioResponsable);
|
||||
DivBotonesAcciones.Visible = !(MostrarSegunAprobado || MostrarSegunRechazado);
|
||||
UpAgregar.Visible = MostrarSegunAprobado;
|
||||
LkbNuevaVersion.Visible = MostrarSegunAprobado;
|
||||
}
|
||||
|
||||
private void CargarCategorias()
|
||||
@@ -832,7 +847,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "Rechazar"
|
||||
#region "RECHAZAR"
|
||||
protected void LkbRechazar_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
@@ -845,4 +860,40 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", this.CveDocumento, "Rechazado"));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "IMPRIMIR"
|
||||
private void Imprimir(string Formato)
|
||||
{
|
||||
List<ReportParameter> Params = new List<ReportParameter>();
|
||||
Params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
Params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
Params.Add(new ReportParameter("LogoPath", ""));
|
||||
Params.Add(new ReportParameter("Descripcion", TxtDescripcion.Text));
|
||||
Params.Add(new ReportParameter("Categoria", DdlCategoria.SelectedItem.Text));
|
||||
Params.Add(new ReportParameter("SubCategoria", DdlSubCategoria.SelectedItem.Text));
|
||||
Params.Add(new ReportParameter("Estatus", LblEstatus.Text.Substring(9)));
|
||||
Params.Add(new ReportParameter("Version", TxtVersion.Text));
|
||||
Params.Add(new ReportParameter("Responsable", TxtResponsable.Text));
|
||||
Params.Add(new ReportParameter("Observaciones", TxtObs.InnerText));
|
||||
Params.Add(new ReportParameter("Documento", this.ArchivoAdjuntoNombre));
|
||||
|
||||
|
||||
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
string LogoRuta = (Imagen.Exists) ? logouri : "" ;
|
||||
Params.Add(new ReportParameter("LogoPath", LogoRuta));
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepDocumentos.rdlc", this.DtUsuariosParticipantes, Params, "Detalle del documento", Formato);
|
||||
}
|
||||
|
||||
protected void LkbPDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("PDF");
|
||||
}
|
||||
|
||||
protected void LkbExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("Excel");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -746,25 +746,31 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
protected void LnkTerminarMinuta_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Cambiar el estatus a Terminada para inabilitarla y que no se pueda modificar
|
||||
ClsOIEventos objOI = new ClsOIEventos();
|
||||
int tCveSeguimiento;
|
||||
bool HuboError = false;
|
||||
|
||||
objOI.IniciaTransacSQL();
|
||||
|
||||
tCveSeguimiento = objOI.AddEventoComentario2(RCveEvento, "Termino minuta.", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
if (tCveSeguimiento > 0)
|
||||
using (ClsOIEventos objOI = new ClsOIEventos())
|
||||
{
|
||||
if (!objOI.UpdateEstatusEvento2(4, tCveSeguimiento, RCveEvento, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
HuboError = true;
|
||||
objOI.IniciaTransacSQL();
|
||||
tCveSeguimiento = objOI.AddEventoComentario2(RCveEvento, "Termino minuta.", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
if (tCveSeguimiento > 0)
|
||||
{
|
||||
if (!objOI.UpdateEstatusEvento2(4, tCveSeguimiento, RCveEvento, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
HuboError = true;
|
||||
}
|
||||
else { HuboError = true; }
|
||||
if (HuboError == false)
|
||||
{
|
||||
objOI.Commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
objOI.RollBack();
|
||||
}
|
||||
}
|
||||
if (HuboError == false)
|
||||
{
|
||||
if (!EnviarMinuta()) { HuboError = true; Alert("Ocurrió un error al terminar la minuta. no se pudo enviar el correo.", ModExtensiones.TipoMensaje.MsgError); }
|
||||
}
|
||||
else
|
||||
HuboError = true;
|
||||
|
||||
|
||||
// 'Envia minuta si es modificada
|
||||
|
||||
|
||||
|
||||
if (HuboError == false)
|
||||
@@ -775,22 +781,6 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
script = string.Format("location.replace(\"/OI/ConvocatoriaDetalle.aspx?CveEventoPadre={0}\");", RCveEvento);
|
||||
}
|
||||
Alert("La minuta ha finalizado.", ModExtensiones.TipoMensaje.MsgInformacion, script);
|
||||
objOI.Commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Ocurrió un error al terminar la minuta. Por favor vuelva a intentar.", ModExtensiones.TipoMensaje.MsgError);
|
||||
objOI.RollBack();
|
||||
}
|
||||
|
||||
objOI.Dispose();
|
||||
|
||||
|
||||
if (HuboError == false)
|
||||
{
|
||||
if (!EnviarMinuta())
|
||||
HuboError = true;
|
||||
Alert("La minuta se termino con exito.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
|
||||
LnkEnviarMinuta.Visible = true;
|
||||
@@ -833,7 +823,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
private string MailgetBodyMinuta()
|
||||
{
|
||||
|
||||
int Folio=0; string Link=""; string Asunto = ""; string Acuerdos = ""; string Descripcion = ""; DateTime DFechai=DateTime.MinValue; DateTime DFechaf = DateTime.MinValue;
|
||||
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 = "";
|
||||
@@ -875,7 +865,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
if (UsuarioPara != null)
|
||||
{
|
||||
string[] str = UsuarioPara.Split(' ');
|
||||
if (str.Length > 0 && str[0].Length >0)
|
||||
if (str.Length > 0 && str[0].Length > 0)
|
||||
{
|
||||
UsuariParaAbr = str[0].Substring(0, 1).ToUpper();
|
||||
}
|
||||
@@ -899,7 +889,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
StrMail.Append(" <span style=\"color: #6C6C6C; font-size: 17px;\">Moderador:</span>");
|
||||
StrMail.Append($" <span style=\"color: #ED7D31; font-size: 22px;font-weight: bold;\">{UsuarioDeAbr}</span>");
|
||||
StrMail.Append($" <span style=\"color: #6C6C6C; font-size: 17px;\">{UsuarioDe}</span><br />");
|
||||
StrMail.Append(" <span style=\"color: #6C6C6C; font-size: 17px;\">Fecha:</span>");
|
||||
StrMail.Append(" <span style=\"color: #6C6C6C; font-size: 17px;\">Fecha:</span>");
|
||||
StrMail.Append($" <span style=\"color: #6C6C6C; font-size: 17px;\">{DFechai: dd} de {DFechai: MMMM yyyy HH:mm}</span><br />");
|
||||
StrMail.Append(" </td>");
|
||||
StrMail.Append(" <td style=\"width: 20%;\">");
|
||||
@@ -940,21 +930,21 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
|
||||
|
||||
|
||||
if(dttareas != null && dttareas.Rows.Count > 0)
|
||||
if (dttareas != null && dttareas.Rows.Count > 0)
|
||||
{
|
||||
StrMail.Append("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">");
|
||||
StrMail.Append(" <thead>");
|
||||
StrMail.Append(" <tr style=\"background-color:#dddddd;\">");
|
||||
StrMail.Append(" <th scope=\"col\">Folio</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Asunto</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Descripción</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Para</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Inicio</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Fin</th>");
|
||||
StrMail.Append(" </tr>");
|
||||
StrMail.Append(" </thead>");
|
||||
StrMail.Append(" <tbody>");
|
||||
foreach (System.Data.DataRow drow in dttareas.Rows )
|
||||
StrMail.Append("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">");
|
||||
StrMail.Append(" <thead>");
|
||||
StrMail.Append(" <tr style=\"background-color:#dddddd;\">");
|
||||
StrMail.Append(" <th scope=\"col\">Folio</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Asunto</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Descripción</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Para</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Inicio</th>");
|
||||
StrMail.Append(" <th scope=\"col\">Fin</th>");
|
||||
StrMail.Append(" </tr>");
|
||||
StrMail.Append(" </thead>");
|
||||
StrMail.Append(" <tbody>");
|
||||
foreach (System.Data.DataRow drow in dttareas.Rows)
|
||||
{
|
||||
|
||||
StrMail.Append(" <tr>");
|
||||
@@ -966,8 +956,8 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
StrMail.Append($" <td>{drow["FechaFin"]: dd/MM/yyyy}</td>");
|
||||
StrMail.Append(" </tr>");
|
||||
}
|
||||
StrMail.Append(" </tbody>");
|
||||
StrMail.Append("</table>");
|
||||
StrMail.Append(" </tbody>");
|
||||
StrMail.Append("</table>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1006,14 +996,14 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
//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)
|
||||
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 )
|
||||
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());
|
||||
if (item["Correo"].ToString().Trim().Length > 0)
|
||||
ArrayCC = string.Format("{0}{1}{2}", ArrayCC, abre, item["Correo"].ToString().Trim());
|
||||
abre = ";";
|
||||
}
|
||||
}
|
||||
@@ -1025,7 +1015,7 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
|
||||
|
||||
ClsSisMail Mail = new ClsSisMail();
|
||||
Mail.SendMail(EmpresaNotificaciones, get_GlobalDTUsuarios(UsuarioActual.CveUsuario).Rows[0]["correo"].ToString() +";"+ TxtCorreoExterno.Text, TxtAsunto.Text, Body, CCP: ArrayCC,Archivos: LSRutasMail);
|
||||
Mail.SendMail(EmpresaNotificaciones, get_GlobalDTUsuarios(UsuarioActual.CveUsuario).Rows[0]["correo"].ToString() + ";" + TxtCorreoExterno.Text, TxtAsunto.Text, Body, CCP: ArrayCC, Archivos: LSRutasMail);
|
||||
//Alert("Se Envió por correo la Minuta", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
Retorno = true;
|
||||
}
|
||||
@@ -1378,8 +1368,44 @@ public partial class OI_MinutaDetalle : ClsPaginas
|
||||
LnkTerminarMinuta_Click(null, null);
|
||||
}
|
||||
|
||||
public string GenerateIcsContent(DateTime FechaInicio, DateTime FechaFin, string Nombreorganizador, string Correoorganizador, string Ubicacion, string Asunto, string descripcion, string uuid)
|
||||
{
|
||||
var DTSTART = FechaInicio.ToUniversalTime().ToString("yyyyMMddTHHmmssZ");
|
||||
var DTEND = FechaFin.ToUniversalTime().ToString("yyyyMMddTHHmmssZ");
|
||||
|
||||
|
||||
/*
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
|
||||
BEGIN:VEVENT
|
||||
UID:uid1@example.com
|
||||
DTSTAMP:19970714T170000Z
|
||||
ORGANIZER;CN=John Doe:MAILTO:john.doe@example.com
|
||||
DTSTART:19970714T170000Z
|
||||
DTEND:19970715T035959Z
|
||||
SUMMARY:Bastille Day Party
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
*/
|
||||
StringBuilder strICS = new StringBuilder();
|
||||
strICS.Append("BEGIN:VCALENDAR");
|
||||
strICS.Append("VERSION:2.0");
|
||||
strICS.Append("METHOD:PUBLISH");
|
||||
strICS.Append("BEGIN:VEVENT");
|
||||
strICS.AppendFormat("ORGANIZER;CN={0}:MAILTO:{1}", Nombreorganizador.Replace(":", "").Replace(";", ""), Correoorganizador);
|
||||
strICS.AppendFormat("DTSTART:{0}", DTSTART);
|
||||
strICS.AppendFormat("DTEND:{0}", DTEND);
|
||||
strICS.AppendFormat("LOCATION:{0}", Ubicacion);
|
||||
strICS.AppendFormat("UID:{0}", uuid);
|
||||
strICS.AppendFormat("DTSTAMP:{0}", DateTime.Now.ToUniversalTime().ToString("yyyyMMddTHHmmssZ"));
|
||||
strICS.AppendFormat("SUMMARY:{0}", Asunto);
|
||||
strICS.AppendFormat("DESCRIPTION:{0}", descripcion);
|
||||
strICS.Append("PRIORITY:5");
|
||||
strICS.Append("CLASS:PUBLIC");
|
||||
strICS.Append("END:VEVENT");
|
||||
strICS.Append("END:VCALENDAR");
|
||||
return strICS.ToString();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkOpenModalAsistencia_Click(object sender, EventArgs e)
|
||||
|
||||
494
OI/Proyecto.aspx
494
OI/Proyecto.aspx
@@ -31,12 +31,17 @@
|
||||
padding-left: 10px;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.gantt-samples-banner_controls_bar.controls_bar, .gantt_scale_line .gantt_scale_cell, .gantt_grid_scale .gantt_grid_head_cell, .gantt_grid_scale .gantt_grid_head_cell a, .gantt_grid_scale .gantt_grid_head_cell a:hover {
|
||||
background-color: #95a5a6 !important;
|
||||
color: #FFF !important;
|
||||
}
|
||||
</style>
|
||||
<%--<link href="/Metronic/assets/global/plugins/GantJS/jsgantt.css" rel="stylesheet" type="text/css" />--%>
|
||||
<link rel="stylesheet" href="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.css" type="text/css">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Proyecto:
|
||||
Proyecto:<asp:Label ID="LblAsunto" runat="server" Text=""></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -58,143 +63,146 @@
|
||||
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="gantt-samples-banner_controls_bar controls_bar">
|
||||
<div class="gantt-samples-banner_controls_bar controls_bar">
|
||||
|
||||
<strong>Formato: </strong>
|
||||
<label>
|
||||
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="week">
|
||||
<span>Horas</span></label>
|
||||
<label>
|
||||
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="trplweek" checked="true">
|
||||
<span>Día</span></label>
|
||||
<label>
|
||||
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="year">
|
||||
<span>Mes</span></label>
|
||||
<strong>Formato: </strong>
|
||||
<label>
|
||||
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="week">
|
||||
<span>Horas</span></label>
|
||||
<label>
|
||||
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="trplweek" checked="true">
|
||||
<span>Día</span></label>
|
||||
<label>
|
||||
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="year">
|
||||
<span>Mes</span></label>
|
||||
<label>
|
||||
<input name="scales" onclick="zoom_tasks(this)" type="radio" value="yearyear">
|
||||
<span>año</span></label>
|
||||
|
||||
<div id="filter_hours" style="display: none;">
|
||||
<div id="filter_hours" style="display: none;">
|
||||
|
||||
<span> | </span>
|
||||
<strong>Mostrar: </strong>
|
||||
<label>
|
||||
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="full_day">
|
||||
<span>Dia Completo</span>
|
||||
</label>
|
||||
<label>
|
||||
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="work_hours">
|
||||
<span>Horario de Oficina</span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="filter_days" style="">
|
||||
<span> | </span>
|
||||
<strong>Mostrar: </strong>
|
||||
<label>
|
||||
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="full_day">
|
||||
<span>Dia Completo</span>
|
||||
</label>
|
||||
<label>
|
||||
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="work_hours">
|
||||
<span>Horario de Oficina</span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="filter_days" style="">
|
||||
|
||||
<span> | </span>
|
||||
<strong>Mostrar: </strong>
|
||||
<label>
|
||||
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="full_week">
|
||||
<span>Semana completa</span>
|
||||
</label>
|
||||
<label>
|
||||
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="work_week">
|
||||
<span>Dias de Trabajo</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gantt_here" style='width: 100%; height: 100vh;'></div>
|
||||
<span> | </span>
|
||||
<strong>Mostrar: </strong>
|
||||
<label>
|
||||
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="full_week">
|
||||
<span>Semana completa</span>
|
||||
</label>
|
||||
<label>
|
||||
<input name="scales_filter" onclick="set_scale_units(this)" type="radio" value="work_week">
|
||||
<span>Dias de Trabajo</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gantt_here" style='width: 100%; height: 100vh;'></div>
|
||||
|
||||
<div id='<%= iddivAgregarProyecto %>' class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalProyecto" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> </button>
|
||||
<h4 class="modal-title" style="text-align: left">
|
||||
<asp:Literal ID="LtlTituloNewProyecto" runat="server">Proyecto</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<asp:Panel runat="server" ID="portletTarea" class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Nuevo</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div id='<%= iddivAgregarProyecto %>' class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalProyecto" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> </button>
|
||||
<h4 class="modal-title" style="text-align: left">
|
||||
<asp:Literal ID="LtlTituloNewProyecto" runat="server">Proyecto</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAsunto" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAsunto" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsunto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Asunto:" AssociatedControlID="TxtAsunto"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvDescripcion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Descripción" AssociatedControlID="TxtDescripcion"></asp:Label>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlPara" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveUsuario" DataTextField="Nombre" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlPara">Para:</asp:Label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVtxtFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label AssociatedControlID="txtFechaI" runat="server" Text="Fecha Inicio"></asp:Label>
|
||||
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Panel runat="server" ID="portletTarea" class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Nuevo</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px " placeholder=""></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVtxtFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label AssociatedControlID="txtFechaF" runat="server" Text="Fecha Fin"></asp:Label>
|
||||
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaF" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAsunto" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAsunto" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsunto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Asunto:" AssociatedControlID="TxtAsunto"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlPrioridad" runat="server" CssClass="form-control select2me input-sm" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Baja" Value="1" class="itembaja"></asp:ListItem>
|
||||
<asp:ListItem Text="Media" Value="2" class="itemmedia"></asp:ListItem>
|
||||
<asp:ListItem Text="Alta" Value="3" class="itemalta"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPrioridad" runat="server" ControlToValidate="DdlPrioridad" Display="None" ErrorMessage="El campo <b>''Prioridad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlPrioridad">Prioridad:</asp:Label>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvDescripcion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Descripción" AssociatedControlID="TxtDescripcion"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
|
||||
<asp:DropDownList ID="DdlPara" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveUsuario" DataTextField="Nombre" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlTema">Tema:</asp:Label>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlPara">Para:</asp:Label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVtxtFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label AssociatedControlID="txtFechaI" runat="server" Text="Fecha Inicio"></asp:Label>
|
||||
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px " placeholder=""></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVtxtFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label AssociatedControlID="txtFechaF" runat="server" Text="Fecha Fin"></asp:Label>
|
||||
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaF" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlPrioridad" runat="server" CssClass="form-control select2me input-sm" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Baja" Value="1" class="itembaja"></asp:ListItem>
|
||||
<asp:ListItem Text="Media" Value="2" class="itemmedia"></asp:ListItem>
|
||||
<asp:ListItem Text="Alta" Value="3" class="itemalta"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPrioridad" runat="server" ControlToValidate="DdlPrioridad" Display="None" ErrorMessage="El campo <b>''Prioridad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlPrioridad">Prioridad:</asp:Label>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlTema">Tema:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:TextBox ID="txtCveEvento" CssClass="hidden txtCveEvento" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnopenmodalClickGant" OnClick="BtnopenmodalClickGant_Click" CssClass="hidden BtnopenmodalClickGant" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:TextBox ID="txtCveEvento" CssClass="hidden txtCveEvento" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnopenmodalClickGant" OnClick="BtnopenmodalClickGant_Click" CssClass="hidden BtnopenmodalClickGant" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="btnguardarProyecto" OnClick="btnguardarProyecto_Click" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
||||
<button data-dismiss="modal" class="btn btn-danger">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="btnguardarProyecto" OnClick="btnguardarProyecto_Click" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
||||
<button data-dismiss="modal" class="btn btn-danger">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<script src="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js"></script>
|
||||
@@ -204,129 +212,141 @@
|
||||
|
||||
|
||||
<script>
|
||||
let RCveEvento =<%= RCveEvento %>;
|
||||
function NuevoEvento(CveEvento) {
|
||||
$('.txtCveEvento').val(CveEvento);
|
||||
$('.BtnopenmodalClickGant').click();
|
||||
}
|
||||
function zoom_tasks(node) {
|
||||
switch (node.value) {
|
||||
case "week":
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%d %M";
|
||||
function zoom_tasks(node) {
|
||||
switch (node.value) {
|
||||
case "week":
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%d %M";
|
||||
|
||||
gantt.config.scale_height = 60;
|
||||
gantt.config.min_column_width = 30;
|
||||
gantt.config.subscales = [
|
||||
{ unit: "hour", step: 1, date: "%H" }
|
||||
];
|
||||
show_scale_options("hour");
|
||||
break;
|
||||
case "trplweek":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%d %M";
|
||||
gantt.config.subscales = [];
|
||||
gantt.config.scale_height = 35;
|
||||
show_scale_options("day");
|
||||
break;
|
||||
case "month":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scale_unit = "week";
|
||||
gantt.config.date_scale = "Week #%W";
|
||||
gantt.config.subscales = [
|
||||
{ unit: "day", step: 1, date: "%D" }
|
||||
];
|
||||
show_scale_options();
|
||||
gantt.config.scale_height = 60;
|
||||
break;
|
||||
case "year":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scale_unit = "month";
|
||||
gantt.config.date_scale = "%M";
|
||||
gantt.config.scale_height = 60;
|
||||
show_scale_options();
|
||||
gantt.config.subscales = [
|
||||
{ unit: "week", step: 1, date: "#%W" }
|
||||
];
|
||||
break;
|
||||
}
|
||||
set_scale_units();
|
||||
gantt.render();
|
||||
gantt.config.scale_height = 60;
|
||||
gantt.config.min_column_width = 30;
|
||||
gantt.config.subscales = [
|
||||
{ unit: "hour", step: 1, date: "%H" }
|
||||
];
|
||||
show_scale_options("hour");
|
||||
break;
|
||||
case "trplweek":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%d %M";
|
||||
gantt.config.subscales = [];
|
||||
gantt.config.scale_height = 35;
|
||||
show_scale_options("day");
|
||||
break;
|
||||
case "month":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scale_unit = "week";
|
||||
gantt.config.date_scale = "Week #%W";
|
||||
gantt.config.subscales = [
|
||||
{ unit: "day", step: 1, date: "%D" }
|
||||
];
|
||||
show_scale_options();
|
||||
gantt.config.scale_height = 60;
|
||||
break;
|
||||
case "year":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scale_unit = "month";
|
||||
gantt.config.date_scale = "%M";
|
||||
gantt.config.scale_height = 60;
|
||||
show_scale_options();
|
||||
gantt.config.subscales = [
|
||||
{ unit: "week", step: 1, date: "#%W" }
|
||||
];
|
||||
break;
|
||||
case "yearyear":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scale_unit = "month";
|
||||
gantt.config.date_scale = "%y %M";
|
||||
gantt.config.scale_height = 60;
|
||||
show_scale_options();
|
||||
gantt.config.subscales = [
|
||||
{ unit: "month", step: 1, date: "#%M" }
|
||||
];
|
||||
break;
|
||||
}
|
||||
function show_scale_options(mode) {
|
||||
var hourConf = document.getElementById("filter_hours"),
|
||||
dayConf = document.getElementById("filter_days");
|
||||
if (mode == 'day') {
|
||||
hourConf.style.display = "none";
|
||||
dayConf.style.display = "";
|
||||
dayConf.getElementsByTagName("input")[0].checked = true;
|
||||
} else if (mode == "hour") {
|
||||
hourConf.style.display = "";
|
||||
dayConf.style.display = "none";
|
||||
hourConf.getElementsByTagName("input")[0].checked = true;
|
||||
} else {
|
||||
hourConf.style.display = "none";
|
||||
dayConf.style.display = "none";
|
||||
}
|
||||
set_scale_units();
|
||||
gantt.render();
|
||||
}
|
||||
function show_scale_options(mode) {
|
||||
var hourConf = document.getElementById("filter_hours"),
|
||||
dayConf = document.getElementById("filter_days");
|
||||
if (mode == 'day') {
|
||||
hourConf.style.display = "none";
|
||||
dayConf.style.display = "";
|
||||
dayConf.getElementsByTagName("input")[0].checked = true;
|
||||
} else if (mode == "hour") {
|
||||
hourConf.style.display = "";
|
||||
dayConf.style.display = "none";
|
||||
hourConf.getElementsByTagName("input")[0].checked = true;
|
||||
} else {
|
||||
hourConf.style.display = "none";
|
||||
dayConf.style.display = "none";
|
||||
}
|
||||
function set_scale_units(mode) {
|
||||
if (mode && mode.getAttribute) {
|
||||
mode = mode.getAttribute("value");
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case "work_hours":
|
||||
gantt.config.subscales = [
|
||||
{ unit: "hour", step: 1, date: "%H" }
|
||||
];
|
||||
gantt.ignore_time = function (date) {
|
||||
if (date.getHours() < 9 || date.getHours() > 16) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
break;
|
||||
case "full_day":
|
||||
gantt.config.subscales = [
|
||||
{ unit: "hour", step: 3, date: "%H" }
|
||||
];
|
||||
gantt.ignore_time = null;
|
||||
break;
|
||||
case "work_week":
|
||||
gantt.ignore_time = function (date) {
|
||||
if (date.getDay() == 0 || date.getDay() == 6) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
break;
|
||||
default:
|
||||
gantt.ignore_time = null;
|
||||
break;
|
||||
}
|
||||
gantt.render();
|
||||
}
|
||||
function set_scale_units(mode) {
|
||||
if (mode && mode.getAttribute) {
|
||||
mode = mode.getAttribute("value");
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case "work_hours":
|
||||
gantt.config.subscales = [
|
||||
{ unit: "hour", step: 1, date: "%H" }
|
||||
];
|
||||
gantt.ignore_time = function (date) {
|
||||
if (date.getHours() < 9 || date.getHours() > 16) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
break;
|
||||
case "full_day":
|
||||
gantt.config.subscales = [
|
||||
{ unit: "hour", step: 3, date: "%H" }
|
||||
];
|
||||
gantt.ignore_time = null;
|
||||
break;
|
||||
case "work_week":
|
||||
gantt.ignore_time = function (date) {
|
||||
if (date.getDay() == 0 || date.getDay() == 6) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
break;
|
||||
default:
|
||||
gantt.ignore_time = null;
|
||||
break;
|
||||
}
|
||||
gantt.render();
|
||||
}
|
||||
var datosGant = [];
|
||||
function loadGant() {
|
||||
gantt.config.date_format = "%Y-%m-%d %H:%i";
|
||||
gantt.config.order_branch = true;
|
||||
gantt.i18n.setLocale("es");
|
||||
gantt.init("gantt_here");
|
||||
gantt.config.columns = [
|
||||
{ name: "text", label: "Proyecto ", width: "*", min_width: 350, tree: true, resize: true, template: function (obj) { return "<a href=\"/OI/TareaDetalle.aspx?CveEvento="+obj.id+"\" target=\"_Blank\">" + obj.text + " </a>" } },
|
||||
{ name: "text", label: "Proyecto ", width: "*", min_width: 350, tree: true, resize: true, template: function (obj) { return "<a href=\"/OI/TareaDetalle.aspx?CveEvento=" + obj.id + "\" target=\"_Blank\">" + obj.text + " </a>" } },
|
||||
{ name: "start_date", label: "Inicio", min_width: 90, align: "center" },
|
||||
{ name: "end_date", label: "Fin", min_width: 90, align: "center" },
|
||||
{ name: "progress", label: "Avance", align: "center", template: function (obj) { return "" + (obj.progress * 100) + " %" } },
|
||||
{ name: "duration", label: "Duracion", align: "center" },
|
||||
{ name: "new", label: "<i class='fa fa-plus'></i>", align: "center",template: function (obj) { return "<a onclick=\"NuevoEvento("+obj.id+");\" target=\"_Blank\"><i class='fa fa-plus'></i> </a>" } }
|
||||
{ name: "progress", label: "Avance", align: "center", template: function (obj) { return "" + (obj.progress * 100).toFixed(2) + " %" } },
|
||||
{ name: "duration", label: "Duración", align: "center" },
|
||||
{ name: "new", label: "<a onclick=\"NuevoEvento(" + RCveEvento + ");\" target=\"_Blank\"><i class='fa fa-plus'></i></a>", align: "center", template: function (obj) { return "<a onclick=\"NuevoEvento(" + obj.id + ");\" target=\"_Blank\"><i class='fa fa-plus'></i> </a>" } }
|
||||
/*{name:"staff", label:"Holder(s)", template:function(obj){return obj.holder+"("+obj.progress+")"} },*/
|
||||
//{ name: "add", label: "" }
|
||||
];
|
||||
gantt.parse({
|
||||
data:datosGant
|
||||
data: datosGant
|
||||
//data: [
|
||||
// { id: 1, text: "Apertura de Sucursal", start_date: null, duration: null, parent: 0, progress: 0, open: true },
|
||||
// { id: 2, text: "Direccion: evaluación de mercado", start_date: "2020/04/29 00:00", end_date: "2020/05/02 00:00",/*duration: 3,*/ parent: 1, progress: 0.25 },
|
||||
@@ -336,7 +356,7 @@
|
||||
// { id: 6, text: "Propaganda,Mkt: Inaguración", start_date: "2020/05/05 00:00", duration: 6, parent: 1, progress: 0.1 },
|
||||
// //{id: 7, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
|
||||
// //{id: 8, text: "", start_date: "2020/05/ 00:00", duration:5, parent:1, progress: 1},
|
||||
|
||||
|
||||
// { id: 7, text: "Asamblea Anual", start_date: null, duration: null, parent: 0, progress: 0, open: true },
|
||||
// { id: 8, text: "Contabilidad: Impuestos", start_date: "2020/05/05 00:00", duration: 13, parent: 7, progress: 0.6 },
|
||||
// { id: 9, text: "Contabilida: utilidad o pérdida", start_date: "2020/05/06 00:00", duration: 9, parent: 7, progress: 0.5 },
|
||||
@@ -351,14 +371,30 @@
|
||||
//]
|
||||
|
||||
/*,
|
||||
links:[
|
||||
{id:1, source:2, target:3, type:"0"},
|
||||
{id:2, source:3, target:4, type:"0"},
|
||||
{id:3, source:5, target:6, type:"0"}
|
||||
]*/
|
||||
links:[
|
||||
{id:1, source:2, target:3, type:"0"},
|
||||
{id:2, source:3, target:4, type:"0"},
|
||||
{id:3, source:5, target:6, type:"0"}
|
||||
]*/
|
||||
});
|
||||
}
|
||||
gantt.attachEvent("onBeforeTaskMove", function (id, parent, tindex) {
|
||||
console.log(tindex)
|
||||
var task = gantt.getTask(id);
|
||||
if (task.parent != parent)
|
||||
return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
gantt.attachEvent("onRowDragEnd", function (id, target,tindex) {
|
||||
console.log(tindex)
|
||||
debugger;
|
||||
drag_id = null;
|
||||
gantt.render();
|
||||
});
|
||||
loadGant();
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<%--<script>
|
||||
|
||||
@@ -50,7 +50,14 @@ public partial class OI_Proyecto : ClsPaginas
|
||||
str.AppendLine("datosGant=[");
|
||||
using (ClsOIEventos oieve = new ClsOIEventos())
|
||||
{
|
||||
if (oieve.GetTareaConHijos(RCveEvento,UsuarioActual.CveEmpresa))
|
||||
|
||||
|
||||
if (oieve.GetEventos2(RCveEvento, UsuarioActual.CveEmpresa) && oieve.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
System.Data.DataRow drow = oieve.DtResultados.Rows[0];
|
||||
LblAsunto.Text = drow["Asunto"].ToString();
|
||||
}
|
||||
if (oieve.GetTareaConHijos(RCveEvento,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
foreach (System.Data.DataRow dr in oieve.DtResultados.Select("Nivel > 0"))
|
||||
{
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.sortableList h4 {
|
||||
background-color: #EEE;
|
||||
background-color: #ccc;
|
||||
margin: 0px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sortableList {
|
||||
border: 1px solid #eee;
|
||||
width: 250px;
|
||||
width: 258px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
min-height: 20px;
|
||||
width: 250px;
|
||||
padding: 5px 0 0 0;
|
||||
margin: 0;
|
||||
background-color: #eee;
|
||||
border: dotted #ccc;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.sortableList ul li {
|
||||
@@ -45,17 +47,22 @@
|
||||
padding: 7px 35px 7px 5px;
|
||||
}
|
||||
|
||||
ul.ListSorter > li {
|
||||
background-color: #fff;
|
||||
float: left;
|
||||
}
|
||||
ul.ListSorter > li {
|
||||
background-color: #fff;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sortableList ul li .btn.edit {
|
||||
padding: 2px 4px;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 4px;
|
||||
}
|
||||
.sortableList ul li .btn.edit {
|
||||
padding: 2px 4px;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 4px;
|
||||
}
|
||||
|
||||
.bootomadd {
|
||||
padding: 4px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -99,7 +106,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</ul>
|
||||
<div class="text-center">
|
||||
<div class="text-center bootomadd">
|
||||
|
||||
<%# String.Format("<a class=\"btn btn-default\" onclick=\"OpenModalNewTareaUserControl(1,-1,{{CveTableroLista:{0}}});\"> <i class=\"fa fa-plus\"'></i> </a>",Eval("CveTableroLista")) %>
|
||||
</div>
|
||||
@@ -170,15 +177,42 @@
|
||||
<asp:UpdatePanel runat="server" ID="Uppositionevento" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnUpPosition" OnClick="BtnUpPosition_Click" runat="server" Text="Agregar" CssClass="btn btn-primary hidden BtnUpPosition" UseSubmitBehavior="false" ValidationGroup="VGMTablzxczxc" />
|
||||
<asp:TextBox ID="Txtcvetablerolista" CssClass=" hidden Txtcvetablerolista" runat="server"></asp:TextBox><asp:TextBox ID="txtCveEvento" CssClass="txtCveEvento hidden" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCveOrdeList" CssClass=" hidden TxtCveOrdeList" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnOrderList" runat="server" OnClick="BtnOrderList_Click" CssClass="btn btn-primary hidden BtnOrderList" UseSubmitBehavior="false" ValidationGroup="VGMTablzxczxzc" />
|
||||
<asp:TextBox ID="Txtcvetablerolista" CssClass=" hidden Txtcvetablerolista" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="txtCveEvento" CssClass="txtCveEvento hidden" runat="server"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
let CurrentorderList = ''
|
||||
function GetOrderList() {
|
||||
|
||||
let OrdeList = '';
|
||||
let separator = '';
|
||||
let Orden = 1;
|
||||
$('.ListSorter > li').each(function () {
|
||||
OrdeList = OrdeList + separator + Orden + ':' + $(this).data('cvetablerolista');
|
||||
separator = ',';
|
||||
Orden = Orden + 1;
|
||||
});
|
||||
return OrdeList;
|
||||
}
|
||||
function GetOrderListEvento(ulelement) {
|
||||
|
||||
let OrdeList = '';
|
||||
let separator = '';
|
||||
let Orden = 1;
|
||||
ulelement.find(' li').each(function () {
|
||||
OrdeList = OrdeList + separator + Orden + ':' + $(this).data('cveevento');
|
||||
separator = ',';
|
||||
Orden = Orden + 1;
|
||||
});
|
||||
return OrdeList;
|
||||
}
|
||||
function ADSReady() {
|
||||
|
||||
CurrentorderList = GetOrderList();
|
||||
var cvetablerolistaold = 0;
|
||||
var cvetablerolistanew = 0;
|
||||
|
||||
@@ -190,7 +224,16 @@
|
||||
setTimeout(function () {
|
||||
cvetablerolistanew = $(event.srcElement).data('cvetablerolista');
|
||||
//let cveevento = $(event.srcElement).data('cveevento');
|
||||
//$('.Txtcvetablerolista').val(cvetablerolistanew);
|
||||
|
||||
setTimeout(function () {
|
||||
let OrdeList = GetOrderList();
|
||||
$('.TxtCveOrdeList').val(OrdeList);
|
||||
console.log(OrdeList);
|
||||
if (CurrentorderList != OrdeList) {
|
||||
$('.BtnOrderList').click();
|
||||
}
|
||||
CurrentorderList = OrdeList;
|
||||
}, 20);
|
||||
//$('.txtCveEvento').val(cveevento);
|
||||
//$('.BtnUpPosition').click();
|
||||
}, 20);
|
||||
@@ -202,8 +245,11 @@
|
||||
start: function (event, ui) { cvetablerolistaold = $(event.srcElement).closest('ul').data('cvetablerolista'); },
|
||||
stop: function (event, ui) {
|
||||
setTimeout(function () {
|
||||
cvetablerolistanew = $(event.srcElement).closest('ul').data('cvetablerolista');
|
||||
let ulelement = $(event.srcElement).closest('ul');
|
||||
cvetablerolistanew = ulelement.data('cvetablerolista');
|
||||
let cveevento = $(event.srcElement).data('cveevento');
|
||||
let OrdeList = GetOrderListEvento(ulelement);
|
||||
$('.TxtCveOrdeList').val(OrdeList);
|
||||
$('.Txtcvetablerolista').val(cvetablerolistanew);
|
||||
$('.txtCveEvento').val(cveevento);
|
||||
$('.BtnUpPosition').click();
|
||||
|
||||
@@ -164,9 +164,42 @@ public partial class OI_TableroDetalle : ClsPaginas
|
||||
|
||||
protected void BtnUpPosition_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool continuar = false;
|
||||
using (ClsOIEventos eveobj = new ClsOIEventos())
|
||||
{
|
||||
eveobj.UpEventoLista(Txtcvetablerolista.Text.ToEntero(), txtCveEvento.Text.ToEntero());
|
||||
eveobj.IniciaTransacSQL();
|
||||
continuar =eveobj.UpEventoLista(Txtcvetablerolista.Text.ToEntero(), txtCveEvento.Text.ToEntero());
|
||||
if (continuar)
|
||||
{
|
||||
List<string> orderlist = TxtCveOrdeList.Text.Split(',').ToList<string>();
|
||||
continuar = eveobj.OrdenaTareas(orderlist, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario);
|
||||
}
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
eveobj.Commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
eveobj.RollBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void BtnOrderList_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<string> orderlist = TxtCveOrdeList.Text.Split(',').ToList<string>();
|
||||
using (ClsOIEventos eveobj = new ClsOIEventos())
|
||||
{
|
||||
eveobj.IniciaTransacSQL();
|
||||
if(eveobj.OrdenaListas(orderlist,UsuarioActual.CveEmpresa,UsuarioActual.CveUsuario))
|
||||
{
|
||||
eveobj.Commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
eveobj.RollBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1318,28 +1318,28 @@
|
||||
<asp:Panel runat="server" ID="PnlSalarios" Visible="false">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiario" Enabled="false" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiario" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiario" Enabled="false" Text="Salario Diario (SDD):"></asp:Label>
|
||||
<%--<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Salario Diario''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtSDI" Enabled="false" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtSDI" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtSDI" Text="Salario Diario Integrado (SDI):"></asp:Label>
|
||||
<%--<asp:CompareValidator ID="CVSDI" runat="server" ControlToValidate="TxtSDI" CssClass="help-block errorimput" ErrorMessage="El campo <b>''SDI''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="display: none;">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiarioPago" Enabled="false" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiarioPago" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiarioPago" Text="Salario Diario de Pago:"></asp:Label>
|
||||
<%--<asp:CompareValidator ID="CVSalario" runat="server" ControlToValidate="TxtSalarioDiarioPago" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Salario Diario de Pago''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<asp:Panel runat="server" ID="pnlSalarioIMSS" CssClass="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtSalarioCotizado" Enabled="false" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtSalarioCotizado" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtSalarioCotizado" Text="Salario Diario IMSS:"></asp:Label>
|
||||
<%--<asp:CompareValidator ID="CVSDT" runat="server" ControlToValidate="TxtSalarioCotizado" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Salario Diario Cotizado''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
|
||||
|
||||
@@ -3952,7 +3952,7 @@
|
||||
|
||||
|
||||
<%-- MODAL SUBIR ARCHIVO --%>
|
||||
<div id="ModalArchvivo" class="modal ADS fade" role="dialog">
|
||||
<div id="ModalArchivo" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
@@ -4588,21 +4588,21 @@
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Calcular Factor de Integración</h4>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Calcular factor de integración</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtFISalariodiarioImss" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtFISalariodiarioImss">Salario Diario(IMSS):</asp:Label>
|
||||
<asp:TextBox ID="TxtFISalariodiario" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtFISalariodiario">Salario diario:</asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtFIDiasVacaciones" Text="6" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtFIDiasVacaciones">Días Vacaciones:</asp:Label>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtFIDiasVacaciones">Días vacaciones:</asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtFIPrimaVacacional" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtFIPrimaVacacional">Prima Vacacional:</asp:Label>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtFIPrimaVacacional">Prima vacacional:</asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtFIAguinaldo" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
@@ -4614,7 +4614,7 @@
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtFISalarioDiarioIntegrado" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtFISalarioDiarioIntegrado">Salario Diario Integrado:</asp:Label>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtFISalarioDiarioIntegrado">Salario Diario Integrado(SDI):</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4645,7 +4645,7 @@
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Modificar Salario</h4>
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Modificar salario</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
@@ -4677,12 +4677,12 @@
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtSalarioDiarioImSS" Enabled="true" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiarioImSS">Salario diario(Imss):</asp:Label>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiarioImSS">Salario diario(IMSS):</asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtSalarioDiarioIntegrado" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" Enabled="false" AssociatedControlID="TxtSalarioDiarioIntegrado">Salario diario integrado:</asp:Label>
|
||||
<asp:Label runat="server" Enabled="false" AssociatedControlID="TxtSalarioDiarioIntegrado">Salario Diario Integrado(SDI):</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -774,7 +774,13 @@ Partial Class RH_Personal
|
||||
End Function
|
||||
|
||||
Const wdPageBreak As Integer = 7
|
||||
Const wdCharacter As Integer = 1
|
||||
Const wdCharacter As Integer = 1
|
||||
|
||||
Public ReadOnly Property showsalarios As Boolean
|
||||
Get
|
||||
Return Not UsuarioActual.Empresa.Funcionalidad(701) = "1"
|
||||
End Get
|
||||
End Property
|
||||
'Configuración
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
@@ -782,7 +788,7 @@ Partial Class RH_Personal
|
||||
pnlSalarioIMSS.Visible = False
|
||||
End If
|
||||
'
|
||||
PnlSalarios.Visible = UsuarioActual.Empresa.Funcionalidad(701) = "1"
|
||||
PnlSalarios.Visible = showsalarios
|
||||
|
||||
ViewState("Orden") = ""
|
||||
ViewState("Orden1") = ""
|
||||
@@ -1471,7 +1477,7 @@ Partial Class RH_Personal
|
||||
TxtSalarioDiario.Text = ObjPersonal.SalarioDiario.ToString()
|
||||
TxtSDI.Text = ObjPersonal.SDI.ToString()
|
||||
TxtSalarioCotizado.Text = ObjPersonal.SalarioDiarioSS.ToString()
|
||||
TxtFISalariodiarioImss.Text = ObjPersonal.SalarioDiarioSS.ToString()
|
||||
TxtFISalariodiario.Text = ObjPersonal.SalarioDiario.ToString()
|
||||
TxtBono.Text = ObjPersonal.Bono.ToString()
|
||||
TxtNumDiasAguinaldo.Text = ObjPersonal.NumDiasAguinaldo.ToString()
|
||||
TxtFIAguinaldo.Text = ObjPersonal.NumDiasAguinaldo.ToString()
|
||||
@@ -5235,7 +5241,7 @@ Partial Class RH_Personal
|
||||
UpImage.Update()
|
||||
TxtCargaImg.Text = "[]"
|
||||
UpAddArchivo.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchivo"))
|
||||
End Sub
|
||||
|
||||
#Region "PERMISOS"
|
||||
@@ -6199,39 +6205,34 @@ Partial Class RH_Personal
|
||||
TxtFIPrimaVacacional.Text = "25"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
TxtFISalariodiarioImss.Text = TxtSalarioCotizado.Text
|
||||
TxtFISalariodiario.Text = TxtSalarioDiario.Text
|
||||
TxtFactordeIntegracion.Text = ""
|
||||
TxtFISalarioDiarioIntegrado.Text = ""
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
TxtFIDiasVacaciones.Text = "6"
|
||||
Else
|
||||
Using objRH As New ClsRH
|
||||
If objRH.VacacionesResumenGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
If objRH.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
If objRH.DtResultados.Rows.Count > 0 Then
|
||||
Dim diasvaca As Integer = objRH.DtResultados(0)("Dias").ToString().ToEntero()
|
||||
TxtFIDiasVacaciones.Text = If(diasvaca > 5, diasvaca, 6).ToString()
|
||||
Else
|
||||
TxtFIDiasVacaciones.Text = "6"
|
||||
End If
|
||||
Else
|
||||
|
||||
|
||||
Dim objRH As New ClsRH
|
||||
|
||||
If objRH.VacacionesResumenGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
If objRH.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
If objRH.DtResultados.Rows.Count > 0 Then
|
||||
TxtFIDiasVacaciones.Text = objRH.DtResultados(0)("Dias").ToString
|
||||
Else
|
||||
TxtFIDiasVacaciones.Text = "6"
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
|
||||
|
||||
End Using
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DmodalFactordeIntegraccion').modal()")
|
||||
UpFactordeintegracion.Update()
|
||||
End Sub
|
||||
Protected Sub LnkCalcularFactordeintegracion_Click(sender As Object, e As EventArgs)
|
||||
Dim SD As Decimal = TxtFISalariodiarioImss.Text.ToDecimal()
|
||||
Private Sub calcularSDI()
|
||||
Dim SD As Decimal = TxtFISalariodiario.Text.ToDecimal()
|
||||
Dim primav As Decimal = TxtFIPrimaVacacional.Text.ToDecimal()
|
||||
Dim DiasVacaciones As Decimal = TxtFIDiasVacaciones.Text.ToDecimal()
|
||||
Dim diasaguinaldo As Decimal = TxtFIAguinaldo.Text.ToDecimal()
|
||||
@@ -6239,18 +6240,26 @@ Partial Class RH_Personal
|
||||
Dim SDI As Decimal = (SD * FI)
|
||||
TxtFactordeIntegracion.Text = FI.ToString()
|
||||
TxtFISalarioDiarioIntegrado.Text = String.Format("{0:###0.########}", SDI)
|
||||
UpFactordeintegracion.Update()
|
||||
Alert(String.Format(" salario diario integreado {0:###0.########}", SDI))
|
||||
UpFactordeintegracion.Update()
|
||||
End Sub
|
||||
Protected Sub LnkCalcularFactordeintegracion_Click(sender As Object, e As EventArgs)
|
||||
calcularSDI()
|
||||
Alert(String.Format(" salario diario integreado {0}", TxtFISalarioDiarioIntegrado.Text))
|
||||
End Sub
|
||||
Protected Sub LnkCalcularFactordeintegracionyguardar_Click(sender As Object, e As EventArgs)
|
||||
LnkCalcularFactordeintegracion_Click(Nothing, Nothing)
|
||||
calcularSDI()
|
||||
|
||||
Using ObjPersonal As ClsRH = New ClsRH()
|
||||
If ObjPersonal.UpdateSalarioImss(CvePersonal, UsuarioActual.CveEmpresa, TxtFISalarioDiarioIntegrado.Text.ToDouble(), TxtFISalariodiarioImss.Text.ToDouble) Then
|
||||
TxtSalarioCotizado.Text = TxtFISalariodiarioImss.Text
|
||||
If ObjPersonal.UpdateSalariointegrado(CvePersonal, UsuarioActual.CveEmpresa, TxtFISalarioDiarioIntegrado.Text.ToDouble(), TxtFISalariodiario.Text.ToDouble) Then
|
||||
TxtSalarioDiario.Text = TxtFISalariodiario.Text
|
||||
TxtSalarioDiarioM.Text = TxtFISalariodiario.Text
|
||||
'TxtSalarioCotizado.Text = TxtFISalarioDiarioIntegrado.Text
|
||||
'TxtSalarioDiarioImSS.Text = TxtFISalarioDiarioIntegrado.Text
|
||||
TxtSalarioDiarioIntegrado.Text = TxtFISalarioDiarioIntegrado.Text
|
||||
TxtSDI.Text = TxtFISalarioDiarioIntegrado.Text
|
||||
UpDatos.Update()
|
||||
Alert("Se ha actualizado el salario diario integreado")
|
||||
Alert("Se ha actualizado el salario diario integreado")
|
||||
RegistraScript("$('#DmodalFactordeIntegraccion').modal('hide')")
|
||||
End If
|
||||
End Using
|
||||
End Sub
|
||||
@@ -6267,8 +6276,10 @@ Partial Class RH_Personal
|
||||
Using ObjPersonal As ClsRH = New ClsRH()
|
||||
If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodSalario.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, TxtSalarioDiarioM.Text.ToDecimal(), TxtSalarioDiarioIntegrado.Text.ToDecimal(), TxtSalarioDiarioImSS.Text.ToDecimal(), TxtSalarioDiarioPago.Text.ToDecimal()) Then
|
||||
TxtSalarioDiario.Text = TxtSalarioDiarioM.Text
|
||||
TxtFISalariodiario.Text = TxtSalarioDiarioM.Text
|
||||
TxtSalarioCotizado.Text = TxtSalarioDiarioImSS.Text
|
||||
TxtSDI.Text = TxtSalarioDiarioIntegrado.Text
|
||||
TxtFISalarioDiarioIntegrado.Text = TxtSalarioDiarioIntegrado.Text
|
||||
UpDatos.Update()
|
||||
Alert("Se ha actualizado el salario", TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
|
||||
@@ -359,7 +359,7 @@ function ADScroller2() {
|
||||
TVisibleCols = Tthis.clone();
|
||||
TVisibleCols.attr('id', ('ADCol' + Tid));
|
||||
Tthis.before(TVisibleCols);
|
||||
Tthis.css("width", (TWidth - ancho1 - 15))
|
||||
Tthis.css("width", (TWidth - ancho1 - 15));
|
||||
for (var i = numColumnas; i > colVisibles + 1; i--) {
|
||||
$('table#ADCol' + Tid + ' > tbody > tr > td:nth-child(' + i + '),table#ADCol' + Tid + ' > tbody > tr > th:nth-child(' + i + ')').each(function () {
|
||||
$(this).remove();
|
||||
@@ -381,12 +381,12 @@ function ADScroller2() {
|
||||
var hr1 = tr1.outerHeight();
|
||||
var hr2 = $(txx2[i]).closest('tr').outerHeight();
|
||||
if (hr1 > hr2) {
|
||||
$(txx1[i]).css('height', hr1)
|
||||
$(txx2[i]).css('height', hr1)
|
||||
$(txx1[i]).css('height', hr1);
|
||||
$(txx2[i]).css('height', hr1);
|
||||
}
|
||||
if (hr2 > hr1) {
|
||||
$(txx1[i]).css('height', hr2)
|
||||
$(txx2[i]).css('height', hr2)
|
||||
$(txx1[i]).css('height', hr2);
|
||||
$(txx2[i]).css('height', hr2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -402,8 +402,8 @@ function ADScroller2() {
|
||||
var divcenterbody = $('<div class="AdsBody" ></div>');
|
||||
Tthis.before(contenedor);
|
||||
contenedor.append(divheader);
|
||||
THeader1 = $('<tbody></tbody>')
|
||||
THeader2 = $('<tbody></tbody>')
|
||||
THeader1 = $('<tbody></tbody>');
|
||||
THeader2 = $('<tbody></tbody>');
|
||||
for (var i = rowVisibles + 1; i >= 2; i--) {
|
||||
$('table#ADCol' + Tid + ' > tbody > tr:nth-child(' + i + ')').prependTo(THeader1);
|
||||
$('table#' + Tid + ' > tbody > tr:nth-child(' + i + ')').prependTo(THeader2);
|
||||
@@ -418,7 +418,7 @@ function ADScroller2() {
|
||||
divheader.append(divheader2);
|
||||
divheader1.append(THeader1);
|
||||
|
||||
var anchoc1 = divheader1.outerWidth() + 15;
|
||||
var anchoc1 = divheader1.outerWidth();
|
||||
var altoc1 = divheader1.outerHeight() + 15;
|
||||
divheaderScroll = $('<div class="ADSCroll" style="width:' + (widthGral - anchoc1) + 'px;"></div>').append(THeader2);
|
||||
divheader2.append(divheaderScroll);
|
||||
@@ -426,6 +426,7 @@ function ADScroller2() {
|
||||
contenedor.append(divcenter);
|
||||
divcenter.append(divcenterCols);
|
||||
divcolsScroll = $('<div class="ADSCroll" style="height:' + (heightGral - altoc1) + 'px;"></div>').append(TVisibleCols);
|
||||
divcolsScroll.width(anchoc1);
|
||||
divcenterCols.append(divcolsScroll);
|
||||
divcenter.append(divcenterbody);
|
||||
divbodyScroll = $('<div class="ADSCroll" style="width:' + (widthGral - anchoc1) + 'px;height:' + (heightGral - altoc1 + 20) + 'px;"></div>').append(Tthis);
|
||||
@@ -1816,8 +1817,9 @@ jQuery(document).ready(function () {
|
||||
DataTablePaginatorScroll();
|
||||
DataTablePaginatorScroll2();
|
||||
loadAdDropzone();
|
||||
clonsbuttons();
|
||||
clonsbuttons();
|
||||
ADScroller2();
|
||||
//setTimeout(ADScroller2, 500);
|
||||
$('body').removeClass('page-portlet-fullscreen');
|
||||
|
||||
$('.form-md-floating-label input').each(function () {
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlUnidadMedida" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="206px">
|
||||
<asp:DropDownList ID="DdlUnidadMedida" OnSelectedIndexChanged="DdlUnidadMedida_SelectedIndexChanged" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" CausesValidation="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="206px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlUnidadMedida.ClientID.ToString()%>">Unidad de Medida:</label>
|
||||
|
||||
@@ -106,6 +106,15 @@ Partial Class ProductosyServicios
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveUnidadMedida As Integer
|
||||
Get
|
||||
Return ViewState("CveUnidadMedida").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveUnidadMedida") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -769,6 +778,7 @@ Partial Class ProductosyServicios
|
||||
End If
|
||||
DdlTipoPSDes.SelectedValueExist(ObjProductosServicios.CveClasificacionDetalle.ToString)
|
||||
DdlUnidadMedida.SelectedValue = ObjProductosServicios.CveUnidadMedida.ToString
|
||||
CveUnidadMedida = ObjProductosServicios.CveUnidadMedida.ToString.ToEntero
|
||||
DdlMarca.SelectedValue = ObjProductosServicios.CveMarca.ToString
|
||||
DdlMarcaPSDes.SelectedValue = ObjProductosServicios.CveMarca.ToString
|
||||
TxtCodigo.Text = ObjProductosServicios.Codigo
|
||||
@@ -2653,23 +2663,32 @@ Partial Class ProductosyServicios
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkSerie_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkSerie.Checked Then
|
||||
ddlMetodos.SelectedValueExist("5")
|
||||
If ElProductoTieneExistencia() Then
|
||||
ChkSerie.Checked = Not ChkSerie.Checked
|
||||
Alert("el producto no se puede cambiar la opcion, porque tiene existencia.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
ddlMetodos.SelectedValueExist("-1")
|
||||
If ChkSerie.Checked Then
|
||||
ddlMetodos.SelectedValueExist("5")
|
||||
Else
|
||||
ddlMetodos.SelectedValueExist("-1")
|
||||
End If
|
||||
UpConta.Update()
|
||||
End If
|
||||
UpConta.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkSeccion_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If ChkSeccion.Checked Then
|
||||
DivSeccionAlmacen.Visible = True
|
||||
If ElProductoTieneExistencia() Then
|
||||
ChkSeccion.Checked = Not ChkSerie.Checked
|
||||
Alert("el producto no se puede cambiar la opcion, porque tiene existencia.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
DivSeccionAlmacen.Visible = False
|
||||
End If
|
||||
If ChkSeccion.Checked Then
|
||||
DivSeccionAlmacen.Visible = True
|
||||
Else
|
||||
DivSeccionAlmacen.Visible = False
|
||||
End If
|
||||
|
||||
UpSeccionAlmacen.Update()
|
||||
UpSeccionAlmacen.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -2680,4 +2699,21 @@ Partial Class ProductosyServicios
|
||||
|
||||
UpModalSeccionAlmacen.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlUnidadMedida_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If ElProductoTieneExistencia() Then
|
||||
DdlUnidadMedida.SelectedValue = CveUnidadMedida.ToString
|
||||
Alert("el producto no se puede cambiar la opcion, porque tiene existencia.")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ElProductoTieneExistencia() As Boolean
|
||||
Dim Existencia As Decimal = 0
|
||||
If CvePS > 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, -1)
|
||||
ObjInventarios.Dispose()
|
||||
End If
|
||||
Return Existencia > 0
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Productos Servicios:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" Style="width: 95%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="100%" Style="width: 95%;" CssClass="DdlPS" CssClassDdl="select2me form-control" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
@@ -136,7 +136,7 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Folio" DataField="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
||||
@@ -154,6 +154,9 @@
|
||||
<asp:BoundField HeaderText="Tot. Máximo" DataField="MAX_Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<asp:BoundField HeaderText="Tot. Promedio" DataField="AVG_Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<asp:BoundField HeaderText="Tot. Mínimo" DataField="MIN_Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -58,7 +58,8 @@ Partial Class Ventas_RepAuxiliarFacturas
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If Not IsPostBack Then
|
||||
txtFechaI.Text = String.Format("01{0:/MM/yyyy}", DateTime.Now)
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
@@ -208,8 +209,7 @@ Partial Class Ventas_RepAuxiliarFacturas
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM)
|
||||
Dim FechaI, FechaF As Date
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
|
||||
|
||||
@@ -134,6 +134,32 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Productos Servicios:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:55%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Clasificación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlClasificacion" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%" data-text="Todos" SelectionMode="Multiple">
|
||||
</asp:ListBox>
|
||||
</div>
|
||||
<label runat="server" id="LblLinea" data-placement="top" class="col-md-1" visible="false">Linea:</label>
|
||||
<div runat="server" id="DivLinea" class="col-md-2" visible="false">
|
||||
<asp:ListBox ID="DdlLinea" CssClass="select2me" runat="server" DataTextField="ClasificacionDetalle" DataValueField="CveClasificacionDetalle" Style="width: 100%" data-text="Todos" SelectionMode="Multiple"></asp:ListBox>
|
||||
</div>
|
||||
|
||||
<label runat="server" id="LblMarca" title="Proveedor" data-toggle="tooltip" data-placement="top" class="col-md-1" visible="false">Marca:</label>
|
||||
<div runat="server" id="DivMarca" class="col-md-2" visible="false">
|
||||
<asp:ListBox ID="DdlMarcaPSDes" CssClass="select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Style="width: 100%" data-text="Todos" SelectionMode="Multiple"></asp:ListBox>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -142,23 +168,31 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron productos con los filtros especificados" ToolTip="Listado de Ventas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate >
|
||||
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupoPS" runat="server" Text='<%# Eval("PS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="P. Promedio" DataField="PUPromedio" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Venta Total" DataField="SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Descuentos" DataField="Descuento" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Venta Neta" DataField="VentaNeta" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="P. Promedio" DataField="PUPromedio" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Venta Total" DataField="SubTotal" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Descuentos" DataField="Descuento" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Venta Neta" DataField="VentaNeta" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -33,6 +33,39 @@ Partial Class Ventas_RepPS
|
||||
|
||||
Private Sub CargaCombos()
|
||||
CargaTipoCentroCosto()
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPS.SelectedText = ""
|
||||
DdlPS.SelectedValue = "-1"
|
||||
Else
|
||||
DdlPS.ddl.Items.Clear()
|
||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
DdlPS.ddl.DataBind()
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
||||
DivMarca.Visible = True
|
||||
LblMarca.Visible = True
|
||||
LblLinea.Visible = True
|
||||
DivLinea.Visible = True
|
||||
|
||||
Using ObjMarcas As New ClsProductosServicios
|
||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||
DdlMarcaPSDes.DataBind()
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
|
||||
DdlLinea.DataBind()
|
||||
'DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTipoCentroCosto()
|
||||
@@ -70,9 +103,12 @@ Partial Class Ventas_RepPS
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim Clasificacion As String = If(DdlClasificacion.GetSelectedValuesM = "", "-1", DdlClasificacion.GetSelectedValuesM)
|
||||
Dim Linea As String = If(DdlLinea.GetSelectedValuesM = "", "-1", DdlLinea.GetSelectedValuesM)
|
||||
Dim Marca As String = If(DdlMarcaPSDes.GetSelectedValuesM = "", "-1", DdlMarcaPSDes.GetSelectedValuesM)
|
||||
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
|
||||
Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
|
||||
Dim CvePS As Integer = -1
|
||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero()
|
||||
Dim CveMoneda As Integer = -1
|
||||
Dim TC As Integer = 1
|
||||
Dim TCEspecifico As Decimal = -1
|
||||
@@ -81,7 +117,7 @@ Partial Class Ventas_RepPS
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then
|
||||
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca) Then
|
||||
DtReporte = ObjVentas.DtResultados.Copy()
|
||||
GvDatos.DataSource = DtReporte
|
||||
Else
|
||||
@@ -97,14 +133,25 @@ Partial Class Ventas_RepPS
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Select Case e.Row.DBCampo("Orden").ToString.ToEntero()
|
||||
Case 4
|
||||
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.CssClass = "Totales"
|
||||
Case 3
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
Case 2
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.CssClass = "SubTotales"
|
||||
Case 1
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.CssClass = "SubTotalesB"
|
||||
Case 0
|
||||
e.Row.Cells(0).ColumnSpan = 1
|
||||
e.Row.Cells(1).Visible = True
|
||||
e.Row.CssClass = "Texto"
|
||||
End Select
|
||||
End If
|
||||
|
||||
@@ -295,12 +295,12 @@ Partial Class Ventas_RepProductosServicios
|
||||
DivMarca.Visible = True
|
||||
LblMarca.Visible = True
|
||||
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||
ObjMarcas.Dispose()
|
||||
DdlMarcaPSDes.DataBind()
|
||||
End If
|
||||
Using ObjMarcas As New ClsProductosServicios
|
||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||
DdlMarcaPSDes.DataBind()
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
|
||||
End Sub
|
||||
|
||||
@@ -766,7 +766,7 @@ Partial Class Ventas_RepVentas
|
||||
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(query)
|
||||
Select Case DdlGrafica.SelectedValue.ToEntero
|
||||
Case 1
|
||||
RegistraScript($"CargaGraficaBarras({json})", "22")
|
||||
RegistraScript($"CargaGraficaBarras({json});console.log({json})", "22")
|
||||
Case 2
|
||||
RegistraScript($"CargaGraficaPastel({json})", "22")
|
||||
End Select
|
||||
|
||||
@@ -2880,7 +2880,7 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAuxiliarConta" runat="server" HeaderText="Saldo" Visible="false">
|
||||
<ajax:TabPanel ID="TabAuxiliarConta" runat="server" HeaderText="Contabilidad" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="LtlTipo1" runat="server"></asp:Literal>
|
||||
<table border="0" class="contenido Widthall">
|
||||
|
||||
@@ -3668,7 +3668,7 @@ Partial Class Ventas
|
||||
HlCuentaTerminal.Visible = True
|
||||
End If
|
||||
CargarSaldoAuxiliar(CveCliente)
|
||||
TabAuxiliarConta.Visible = True
|
||||
TabAuxiliarConta.Visible = UsuarioActual.TienePermisoProceso(306)
|
||||
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
|
||||
If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
|
||||
'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<package id="Microsoft.Owin.Security.Jwt" version="4.1.0" targetFramework="net45" />
|
||||
<package id="Microsoft.Owin.Security.OAuth" version="4.1.0" targetFramework="net45" />
|
||||
<package id="Microsoft.ReportingServices.ReportViewerControl.WebForms" version="150.1358.0" targetFramework="net45" />
|
||||
<package id="Microsoft.ReportViewer.2015.Runtime" version="12.0.2.2402" targetFramework="net4" />
|
||||
<package id="Microsoft.ReportViewer.2015.Runtime" version="12.0.2.2402" targetFramework="net45" />
|
||||
<package id="Microsoft.ReportViewer.Common.v12" version="12.0.0.1" targetFramework="net45" />
|
||||
<package id="Microsoft.ReportViewer.WebForms.v12" version="12.0.0.0" targetFramework="net45" />
|
||||
<package id="Microsoft.SqlServer.Types" version="14.0.1016.290" targetFramework="net45" />
|
||||
|
||||
12
vwd.webinfo
12
vwd.webinfo
@@ -84,6 +84,18 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user