Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1263,14 +1263,14 @@ Partial Class Compras_Compras
|
||||
Dim ObjPersonal As New ClsRH
|
||||
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataSource = ObjPersonal.DtResultados
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados
|
||||
Else
|
||||
DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
ObjPersonal.Dispose()
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonalReembolso.DataBind()
|
||||
@@ -8434,18 +8434,17 @@ Partial Class Compras_Compras
|
||||
Msg.Append("¿Desea realizar una evaluacion al proveedor?")
|
||||
Msg.AppendFormat($"</br><a class=""Texto"" target='_blank' href=""/Compras/EvaluacionProveedor.aspx?CveEvaluacionProveedor={CveEvaluacionProveedor}"">Evaluar Proveedor.</a>")
|
||||
End If
|
||||
|
||||
BtnGuardar.Enabled = False
|
||||
UpFacturar.Update()
|
||||
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar)
|
||||
Else
|
||||
ObjCompras.RollBack()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
BtnGuardar.Enabled = False
|
||||
UpFacturar.Update()
|
||||
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
@@ -367,53 +367,43 @@
|
||||
<asp:Label ID="LblCliente" runat="server" Text="Cliente:"></asp:Label></label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<ADS:Dropdownlost ID="DdlCliente" runat="server" AutoPostBack="False" DataTextField="NombreComercial" IncluyeTodos="false" DataValueField="CveCliente" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" style="display: none;">
|
||||
<label class="col-md-3 truncate ">Ubicacion:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: none;">
|
||||
<label class="col-md-3 truncate ">Ubicacion:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="row" id="divResponsable" runat="server">
|
||||
<label class="col-md-3 truncate ">Responsable:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtResponsable" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="divResponsable" runat="server">
|
||||
<label class="col-md-3 truncate ">Responsable:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtResponsable" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="div3" runat="server">
|
||||
<label class="col-md-3 truncate ">Lugar:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtLugar" runat="server" MaxLength="300" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="row" id="div3" runat="server">
|
||||
<label class="col-md-3 truncate ">Lugar:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtLugar" runat="server" MaxLength="300" Width="400px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo Contrato:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoContratoObra" runat="server" CssClass="select2me" Width="150px" >
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
<asp:ListItem Value="30">Obra</asp:ListItem>
|
||||
<asp:ListItem Value="31">Comercial</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-3 truncate">Tipo Contrato:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoContratoObra" runat="server" CssClass="select2me" Width="150px" >
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
<asp:ListItem Value="30">Obra</asp:ListItem>
|
||||
<asp:ListItem Value="31">Comercial</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoContratoObra" runat="server" InitialValue="-1" ControlToValidate="DdlTipoContratoObra" CssClass="help-block errorimput" Display="None" ErrorMessage="El campo <b>''Tipo Contrato''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERFVDdlTipoContratoObra" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoContratoObra" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoContratoObra" runat="server" InitialValue="-1" ControlToValidate="DdlTipoContratoObra" CssClass="help-block errorimput" Display="None" ErrorMessage="El campo <b>''Tipo Contrato''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERFVDdlTipoContratoObra" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoContratoObra" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Fecha Inicial:</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
@@ -571,8 +571,8 @@ Partial Class Contratos_ContratoObra
|
||||
End Function
|
||||
|
||||
Private Sub cargaClientes()
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlCliente.DataBind()
|
||||
DdlCliente.setEsWebService(True)
|
||||
DdlCliente.Attributes.Add("data-metodo", "getcliente")
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDT()
|
||||
@@ -736,8 +736,8 @@ Partial Class Contratos_ContratoObra
|
||||
TipoContrato = ObjContratos.CveContratoTipo
|
||||
CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
|
||||
DdlCliente.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCliente").ToString)
|
||||
|
||||
DdlCliente.ddl.SelectedValueExist(ObjContratos.CveCliente)
|
||||
|
||||
If ObjContratos.CveProveedor > 0 Then
|
||||
' TrProveedor.Visible = True
|
||||
TrCliente.Visible = False
|
||||
@@ -745,7 +745,7 @@ Partial Class Contratos_ContratoObra
|
||||
DdlContratista.SelectedValue = ObjContratos.CveProveedor.ToString
|
||||
Else
|
||||
cargaClientes()
|
||||
DdlCliente.SelectedValueExist(ObjContratos.CveCliente.ToString)
|
||||
DdlCliente.ddl.SelectedValueExist(ObjContratos.CveCliente)
|
||||
UpGral.Update()
|
||||
CargaSucursalCliente()
|
||||
DdlSucursalCliente.SelectedValue = ObjContratos.CveSucursalCliente.ToString
|
||||
@@ -2076,7 +2076,7 @@ Partial Class Contratos_ContratoObra
|
||||
End If
|
||||
|
||||
End If
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlUMEdit").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DataKey("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("DdlUMEdit").DataBind()
|
||||
e.Row.FCDropDownList("DdlUMEdit").SelectedValue = e.Row.DataKey("CveUM")
|
||||
|
||||
@@ -90,11 +90,17 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportaSobrantes" runat="server"><i class="fa fa-ad-excel"></i> Exporta Sobrantes</asp:LinkButton>
|
||||
</li>--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<asp:UpdatePanel runat="server" id="UPAcciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="btnFin" runat="server" Text="Finalizar" data-toggle="confirmation" data-popout="true" data-original-title="Finalizar el inventario" data-btn-ok-label="si" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCrear" runat="server"><i class=""></i> Crear a partir de</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGuardar" runat="server" Visible="false" > <i class="fa fa-floppy-o" style="font-weight:bold;"></i> Guardar</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger ControlID="btnFin" />
|
||||
@@ -177,13 +183,17 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label style="font-size: 16px"><b>Productos que Faltan</b></label>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvF.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvF.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<div class="row">
|
||||
<div class="col-md-4" align="left" id="divRegistradosFaltan" runat="server">
|
||||
<asp:Label runat="server">Número de registros: <b><asp:Literal ID="LtlTotalRegistrosFaltan" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-8" align="right" id="DivBuscadorFaltan" runat="server">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvF.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvF.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,8 +201,16 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvF" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;"
|
||||
GridLines="None">
|
||||
GridLines="None" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAllFaltante" runat="server"/>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkPSFaltante" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
|
||||
@@ -213,21 +231,34 @@
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label style="font-size: 16px"><b>Productos que Sobran</b></label>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvS.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<div class="row">
|
||||
<div class="col-md-4" align="left" id="divRegistradosSobran" runat="server">
|
||||
<asp:Label runat="server">Número de registros: <b><asp:Literal ID="LtlTotalRegistrosSobran" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-8" align="right" id="DivBuscadorSobran" runat="server">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvS.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpdateGvS" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvS" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAllSobrante" runat="server"/>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkPSSobrante" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
|
||||
@@ -250,13 +281,50 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<div id="ModalGuardar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Actualizar Fechas</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpFecha" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTitulo" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTitulos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTitulo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Titulo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTitulo.ClientID.ToString()%>">Titulo:</label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnCrear" runat="server" ClientIDMode="Static" Text="Crear" CssClass="btn btn-primary" ValidationGroup="Actualiza" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="/Scripts/DataTables.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function SeleccionarTodosFaltante(chk) {
|
||||
$("#C_GvF input:checkbox").attr("checked", chk.checked);
|
||||
}
|
||||
function SeleccionarTodosSobrante(chk) {
|
||||
$("#C_GvS input:checkbox").attr("checked", chk.checked);
|
||||
}
|
||||
function pageLoad(sender, e) {
|
||||
$(document).ready(function () {
|
||||
$('a[class="ajax__tab_tab"]').click(function () {
|
||||
|
||||
@@ -167,15 +167,19 @@ Partial Class Inventarios_RepAnomalias
|
||||
GvF.UseAccessibleHeader = True
|
||||
GvF.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
Script = "OrdenarGVF();"
|
||||
divRegistradosFaltan.Visible = True
|
||||
LtlTotalRegistrosFaltan.Text = GvF.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
If (GvS.Rows.Count > 0) Then
|
||||
GvS.UseAccessibleHeader = True
|
||||
GvS.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
Script += "OrdenarGVS();"
|
||||
divRegistradosSobran.Visible = True
|
||||
LtlTotalRegistrosSobran.Text = GvS.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
|
||||
PSIguales()
|
||||
RegistraScript(Script)
|
||||
|
||||
UPAnomalias.Update()
|
||||
@@ -207,17 +211,13 @@ Partial Class Inventarios_RepAnomalias
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvF.RowDataBound, GvS.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Costo") = "-1" Then
|
||||
e.Row.Cells(8).Text = "0"
|
||||
End If
|
||||
|
||||
If e.Row.Cells(7).Text = MinFecha.ToString Then
|
||||
e.Row.Cells(7).Text = ""
|
||||
End If
|
||||
|
||||
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -301,4 +301,135 @@ Partial Class Inventarios_RepAnomalias
|
||||
Gv.Columns(7).Visible = resultado.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
End Sub
|
||||
|
||||
Private Sub LnkCrear_Click(sender As Object, e As EventArgs) Handles LnkCrear.Click
|
||||
If GvF.Rows.Count > 0 Then
|
||||
GvF.Columns(0).Visible = True
|
||||
LnkGuardar.Visible = True
|
||||
LnkCrear.Visible = False
|
||||
GvF.HeaderRow.FCCheckBox("ChkAllFaltante").Attributes.Add("onclick", "SeleccionarTodosFaltante(this);")
|
||||
End If
|
||||
|
||||
If GvS.Rows.Count > 0 Then
|
||||
GvS.Columns(0).Visible = True
|
||||
LnkGuardar.Visible = True
|
||||
LnkCrear.Visible = False
|
||||
GvS.HeaderRow.FCCheckBox("ChkAllSobrante").Attributes.Add("onclick", "SeleccionarTodosSobrante(this);")
|
||||
End If
|
||||
UPAnomalias.Update()
|
||||
UpdateGvS.Update()
|
||||
UPAcciones.Update()
|
||||
End Sub
|
||||
Private Sub LnkGuardar_Click(sender As Object, e As EventArgs) Handles LnkGuardar.Click
|
||||
RegistraScript("$('#ModalGuardar').modal('show')")
|
||||
End Sub
|
||||
|
||||
Private Sub BtnCrear_Click(sender As Object, e As EventArgs) Handles BtnCrear.Click
|
||||
Dim ErrorClasif As Boolean = False
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
Dim CveInventarioFisicoNew As Integer
|
||||
Dim DtAlmacen, DtClasificacion, DtClasificacionExcluida, DtProveedor As DataTable
|
||||
DtAlmacen = Nothing
|
||||
DtClasificacion = Nothing
|
||||
DtClasificacionExcluida = Nothing
|
||||
DtProveedor = Nothing
|
||||
ObjInventario.IniciaTransacSQL()
|
||||
If ObjInventario.AddInventarioFisico(UsuarioActual.CveEmpresa, TxtTitulo.Text, lbObservaciones.Text, 0, CveSubProyecto) Then
|
||||
CveInventarioFisicoNew = ObjInventario.CveInventarioFisico
|
||||
|
||||
If ObjInventario.GetInventarioFisicoDetallesAlmacen(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
DtAlmacen = ObjInventario.DtResultados
|
||||
End If
|
||||
|
||||
If ObjInventario.GetInventarioFisicoDetallesClasificacion(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
DtClasificacion = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
|
||||
DtClasificacionExcluida = ObjInventario.DtResultados.FiltraParametros("Incluye = 0")
|
||||
End If
|
||||
|
||||
If ObjInventario.GetInventarioFisicoDetallesProveedores(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
DtProveedor = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
|
||||
End If
|
||||
|
||||
For Each Gvr As DataRow In DtAlmacen.Rows
|
||||
If Not ObjInventario.AddInventarioFisicoAlmacenes(CveInventarioFisicoNew, Gvr("CveAlmacen").ToString.ToEntero) Then
|
||||
ErrorClasif = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If ErrorClasif = False Then
|
||||
For Each Gvr As DataRow In DtClasificacion.Rows
|
||||
If Not ObjInventario.AddInventarioFisicoClasificaciones(CveInventarioFisicoNew, Gvr("CveClasificacion").ToString.ToEntero, UsuarioActual.CveUsuario, True) Then
|
||||
ErrorClasif = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
For Each Gvr As DataRow In DtClasificacionExcluida.Rows
|
||||
If Not ObjInventario.AddInventarioFisicoClasificaciones(CveInventarioFisicoNew, Gvr("CveClasificacion").ToString.ToEntero, UsuarioActual.CveUsuario, False) Then
|
||||
ErrorClasif = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If ErrorClasif = False Then
|
||||
For Each Gvr As GridViewRow In GvF.Rows
|
||||
If Gvr.FCCheckBox("ChkPSFaltante").Checked Then
|
||||
If Not ObjInventario.AddInventarioFisicoProductosServicios(CveInventarioFisicoNew, Gvr.DataKey("CvePS").ToString.ToEntero, True) Then
|
||||
ErrorClasif = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For Each Gvr As GridViewRow In GvS.Rows
|
||||
If Gvr.FCCheckBox("ChkPSSobrante").Checked Then
|
||||
If Not ObjInventario.AddInventarioFisicoProductosServicios(CveInventarioFisicoNew, Gvr.DataKey("CvePS").ToString.ToEntero, True) Then
|
||||
ErrorClasif = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If ErrorClasif = False Then
|
||||
For Each Gvr As DataRow In DtProveedor.Rows
|
||||
If Not ObjInventario.AddInventarioFisicoProveedores(CveInventarioFisicoNew, Gvr("CveProveedor").ToString.ToEntero, True) Then
|
||||
ErrorClasif = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
If ErrorClasif = False And CveInventarioFisicoNew > 0 Then
|
||||
ObjInventario.Commit()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalGuardar"))
|
||||
GvF.Columns(0).Visible = False
|
||||
GvS.Columns(0).Visible = False
|
||||
LnkGuardar.Visible = False
|
||||
LnkCrear.Visible = True
|
||||
CargaDatos(CveInventarioFisico)
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
End If
|
||||
ObjInventario.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PSIguales()
|
||||
Dim contadorF As Integer = 0
|
||||
Dim contadorS As Integer = 0
|
||||
For Each dtF As GridViewRow In GvF.Rows
|
||||
contadorS = 0
|
||||
For Each dtS As GridViewRow In GvS.Rows
|
||||
If dtS.DataKey("CvePS") = dtF.DataKey("CvePS") Then
|
||||
GvS.Rows(contadorS).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
GvF.Rows(contadorF).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
End If
|
||||
contadorS += 1
|
||||
Next
|
||||
contadorF += 1
|
||||
Next
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user