Exel anexos horizontales, AF
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
|
||||
|
||||
Reference in New Issue
Block a user