Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -95,16 +116,6 @@ Partial Class AF_OrdenTrabajo
|
||||
|
||||
|
||||
|
||||
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 +125,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 +321,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,110 @@ 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(CveTipoServicio 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("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
.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 obtener los estatus", 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
|
||||
|
||||
|
||||
|
||||
@@ -2053,7 +2053,163 @@ 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
|
||||
|
||||
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 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()
|
||||
|
||||
@@ -10,6 +10,23 @@
|
||||
<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>
|
||||
|
||||
@@ -133,12 +133,24 @@ 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
|
||||
@@ -150,9 +162,25 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
e.Row.Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
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
|
||||
|
||||
@@ -11,6 +11,18 @@
|
||||
<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>
|
||||
|
||||
@@ -112,6 +112,14 @@ 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});")
|
||||
@@ -132,9 +140,22 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
e.Row.Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
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
|
||||
|
||||
@@ -16,6 +16,21 @@
|
||||
<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>
|
||||
|
||||
@@ -79,7 +79,15 @@ 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()
|
||||
@@ -99,9 +107,22 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
e.Row.Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
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,23 @@ 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 ReporteComplementario As Boolean
|
||||
' Get
|
||||
' ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
|
||||
@@ -174,6 +191,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 +263,42 @@ 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())
|
||||
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
|
||||
@@ -859,6 +922,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 +1022,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 +1088,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 +1108,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 +1171,17 @@ 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
|
||||
|
||||
|
||||
If DtIngresosAnualH.Rows.Count > 0 Then
|
||||
|
||||
|
||||
@@ -1142,6 +1243,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 "
|
||||
@@ -1441,11 +1543,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 +1570,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 +1602,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 +1735,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 +1789,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 +1809,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 +1816,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 +1860,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 +1938,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 +1967,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 +1975,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 +2042,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")
|
||||
|
||||
|
||||
@@ -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,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
RVFecha.MaximumValue = Now.ToShortDateString
|
||||
|
||||
If Not UsuarioActual.CveEmpresa = 41 Then
|
||||
TxtFecha.Enabled = False
|
||||
End If
|
||||
|
||||
|
||||
CantidadTotal = 0
|
||||
IndexSeccionAlmacen = 0
|
||||
@@ -482,6 +486,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 +513,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlConcepto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
CargaPS()
|
||||
|
||||
' CargaDdlPaqueteria()
|
||||
@@ -2025,11 +2032,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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -186,13 +186,13 @@
|
||||
<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" />
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -104,6 +104,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user