Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
82
AF/CatActividades.aspx
Normal file
82
AF/CatActividades.aspx
Normal file
@@ -0,0 +1,82 @@
|
||||
<%@ Page Title="AF - Catálogo de Actividades" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatActividades.aspx.cs" Inherits="AF_CatActividades" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Actividadedes
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarActividadD" OnClick="BtnAgregarActividadD_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Actividad"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveActividad, Nombre, CvePuesto, Cantidad, CveUsuario, CveEmpresa" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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>
|
||||
<div id="DivAgregarActividadD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Tipo de Servicio</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombre" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtNombre" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TxtNombre">Nombre:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPuesto" DataTextField="Puesto" DataValueField="CvePuesto" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlPuesto.ClientID.ToString()%>">Puesto:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvPuesto" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlPuesto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puesto''</b> es necesario." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvCantidad" runat="server" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TxtCantidad">Cantidad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarActividad" OnClick="BtnAgregarActividad_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
110
AF/CatActividades.aspx.cs
Normal file
110
AF/CatActividades.aspx.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatActividades : ClsPaginas
|
||||
{
|
||||
private int CveActividad
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveActividad"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveActividad"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetActividades(-1, -1, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
DdlPuesto.DataSource = get_GlobalDTRHPuestos(UsuarioActual.CveEmpresa);
|
||||
DdlPuesto.DataBind();
|
||||
DdlPuesto.Items.Insert(0,new ListItem("-1","Seleccione"));
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividadD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividad.Text = "Agregar";
|
||||
TxtNombre.Text = "";
|
||||
DdlPuesto.SelectedValueExist(-1);
|
||||
TxtCantidad.Text = "";
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarActividadD"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividad.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveActividad = GvRow.DataKey("CveActividad").ToEntero();
|
||||
TxtNombre.Text = GvRow.DataKey("Nombre");
|
||||
DdlPuesto.SelectedValueExist(GvRow.DataKey("CvePuesto"));
|
||||
TxtCantidad.Text = GvRow.DataKey("Cantidad");
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarActividadD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveActividad = GvRow.DataKey("CveActividad").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteActividades(CveActividad))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
Alert("Se eliminó la Actividad correctamente");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividad_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (BtnAgregarActividad.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddActividades(TxtNombre.Text, DdlPuesto.SelectedValue.ToEntero(),TxtCantidad.Text.ToDecimal(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
Alert("Se agregó la Actividad correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateActividades(CveActividad,TxtNombre.Text, DdlPuesto.SelectedValue.ToEntero(), TxtCantidad.Text.ToDecimal(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
Alert("Se actualizó la Actividad correctamente");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
}
|
||||
}
|
||||
74
AF/CatCheckList.aspx
Normal file
74
AF/CatCheckList.aspx
Normal file
@@ -0,0 +1,74 @@
|
||||
<%@ Page Title="AF - Catálogo de CheckList" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatCheckList.aspx.cs" Inherits="AF_CatCheckList" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de CheckList
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarCheckListD" OnClick="BtnAgregarCheckListD_Click" data-toggle="tooltip" data-placement="left" title="Agregar un CheckList" Text="<i class='fa fa-plus'></i>Agregar CheckList"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCheckList, CveTipoServicio, CveCheckListActividad, Nombre, CheckListActividad" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" />
|
||||
<asp:BoundField HeaderText="CheckList Actividad" DataField="CheckListActividad" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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>
|
||||
<div id="DivAgregarTiposServiciosD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">CheckList</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoServicio" DataTextField="Nombre" DataValueField="CveTipoServicio" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlTipoServicio.ClientID.ToString()%>">Tipo Servicio:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlTipoServicio" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlTipoServicio" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Servicio''</b> es necesario." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCheckListActividad" DataTextField="CheckListActividad" DataValueField="CveCheckListActividad" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlCheckListActividad.ClientID.ToString()%>">CheckList Actividad:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCheckListActividad" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlCheckListActividad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Mantenimiento''</b> es necesario." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarCheckList" OnClick="BtnAgregarCheckList_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
122
AF/CatCheckList.aspx.cs
Normal file
122
AF/CatCheckList.aspx.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatCheckList : ClsPaginas
|
||||
{
|
||||
private int CveCheckList
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveCheckList"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveCheckList"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetCheckList(-1, -1, -1))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
DdlTipoServicio.Items.Clear();
|
||||
if (ObjAF.GetTiposServicios(-1,-1,-1,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlTipoServicio.DataSource = ObjAF.DtResultados;
|
||||
DdlTipoServicio.DataBind();
|
||||
DdlTipoServicio.Items.Insert(0, new ListItem("Seleccione","-1"));
|
||||
}
|
||||
|
||||
DdlCheckListActividad.Items.Clear();
|
||||
if (ObjAF.GetCheckListActividad(-1, -1))
|
||||
{
|
||||
DdlCheckListActividad.DataSource = ObjAF.DtResultados;
|
||||
DdlCheckListActividad.DataBind();
|
||||
DdlCheckListActividad.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
}
|
||||
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarCheckListD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarCheckList.Text = "Agregar";
|
||||
DdlTipoServicio.SelectedValueExist(-1);
|
||||
DdlCheckListActividad.SelectedValueExist(-1);
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosD"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarCheckList.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckList = GvRow.DataKey("CveCheckList").ToEntero();
|
||||
DdlTipoServicio.SelectedValueExist(GvRow.DataKey("CveTipoServicio"));
|
||||
DdlCheckListActividad.SelectedValueExist(GvRow.DataKey("CveCheckListActividad"));
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckList = GvRow.DataKey("CveCheckList").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteCheckList(CveCheckList))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosD"));
|
||||
Alert("Se eliminó el CheckList correctamente");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarCheckList_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (BtnAgregarCheckList.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddCheckList(DdlTipoServicio.SelectedValue.ToEntero(), DdlCheckListActividad.SelectedValue.ToEntero()))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosD"));
|
||||
Alert("Se agregó el CheckList correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateCheckList(CveCheckList, DdlTipoServicio.SelectedValue.ToEntero(), DdlCheckListActividad.SelectedValue.ToEntero()))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosD"));
|
||||
Alert("Se actualizó el CheckList correctamente");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosD"));
|
||||
}
|
||||
}
|
||||
76
AF/CatCheckListActividades.aspx
Normal file
76
AF/CatCheckListActividades.aspx
Normal file
@@ -0,0 +1,76 @@
|
||||
<%@ Page Title="AF - Catálogo de Actividades de CheckList" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatCheckListActividades.aspx.cs" Inherits="AF_CatCheckListActividades" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Actividades de CheckList
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarActividadCheckListD" OnClick="BtnAgregarActividadCheckListD_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Una Actividad de CheckList"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCheckListActividad, CheckListActividad, CveCheckListActividadGrupo, CheckListActividadGrupo" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Actividad CheckList" DataField="CheckListActividad" />
|
||||
<asp:BoundField HeaderText="Grupo Actividad de CheckList" DataField="CheckListActividadGrupo" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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>
|
||||
<div id="DivAgregarTiposServiciosD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Actividad CheckList</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCheckListActividad" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCheckListActividad" runat="server" ControlToValidate="TxtCheckListActividad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="LblNombre">Actividad CheckList:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCheckListActividadGrupo" DataTextField="CheckListActividadGrupo" DataValueField="CveCheckListActividadGrupo" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlCheckListActividadGrupo.ClientID.ToString()%>">Grupo Actividad de CheckList:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCheckListActividadGrupo" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlCheckListActividadGrupo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Mantenimiento''</b> es necesario." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarActividadCheckList" OnClick="BtnAgregarActividadCheckList_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
108
AF/CatCheckListActividades.aspx.cs
Normal file
108
AF/CatCheckListActividades.aspx.cs
Normal file
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatCheckListActividades : ClsPaginas
|
||||
{
|
||||
private int CveCheckListActividad
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveCheckListActividad"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveCheckListActividad"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetCheckListActividad(-1, -1))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
if (ObjAF.GetCheckListActividadGrupo(-1))
|
||||
{
|
||||
DdlCheckListActividadGrupo.DataSource = ObjAF.DtResultados;
|
||||
DdlCheckListActividadGrupo.DataBind();
|
||||
DdlCheckListActividadGrupo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividadCheckListD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividadCheckList.Text = "Agregar";
|
||||
TxtCheckListActividad.Text = "";
|
||||
DdlCheckListActividadGrupo.SelectedValueExist(-1);
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosD"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividadCheckList.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckListActividad = GvRow.DataKey("CveCheckListActividad").ToEntero();
|
||||
TxtCheckListActividad.Text = GvRow.DataKey("CheckListActividad");
|
||||
DdlCheckListActividadGrupo.SelectedValueExist(GvRow.DataKey("CveCheckListActividadGrupo"));
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckListActividad = GvRow.DataKey("CveCheckListActividad").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteCheckListActividad(CveCheckListActividad))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosD"));
|
||||
Alert("Se eliminó la Actividad de CheckList correctamente");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividadCheckList_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (BtnAgregarActividadCheckList.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddCheckListActividad(TxtCheckListActividad.Text, DdlCheckListActividadGrupo.SelectedValue.ToEntero()))
|
||||
{
|
||||
Alert("Se agregó la Actividad de CheckList correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateCheckListActividad(CveCheckListActividad, TxtCheckListActividad.Text, DdlCheckListActividadGrupo.SelectedValue.ToEntero()))
|
||||
{
|
||||
Alert("Se actualizó la Actividad de CheckList correctamente");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosD"));
|
||||
}
|
||||
}
|
||||
70
AF/CatCheckListActividadesGrupos.aspx
Normal file
70
AF/CatCheckListActividadesGrupos.aspx
Normal file
@@ -0,0 +1,70 @@
|
||||
<%@ Page Title="AF - Catálogo de Grupos de CheckLists" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatCheckListActividadesGrupos.aspx.cs" Inherits="AF_CatCheckListActividadesGrupos" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Grupos de CheckLists
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarGrupoCheckListD" OnClick="BtnAgregarGrupoCheckListD_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Grupo CheckList"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCheckListActividadGrupo, CheckListActividadGrupo" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Grupo de CheckList" DataField="CheckListActividadGrupo" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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>
|
||||
<div id="DivAgregarGrupoCheckListD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Grupo de CheckList</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtGrupoCheckList" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtGrupoCheckList" runat="server" ControlToValidate="TxtGrupoCheckList" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Grupo CheckList''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="LblNombre">Nombre:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarGrupoCheckList" OnClick="BtnAgregarGrupoCheckList_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
100
AF/CatCheckListActividadesGrupos.aspx.cs
Normal file
100
AF/CatCheckListActividadesGrupos.aspx.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatCheckListActividadesGrupos : ClsPaginas
|
||||
{
|
||||
private int CveCheckListActividadGrupo
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveCheckListActividadGrupo"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveCheckListActividadGrupo"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetCheckListActividadGrupo(-1))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarGrupoCheckListD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarGrupoCheckList.Text = "Agregar";
|
||||
TxtGrupoCheckList.Text = "";
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarGrupoCheckListD"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarGrupoCheckList.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckListActividadGrupo = GvRow.DataKey("CveCheckListActividadGrupo").ToEntero();
|
||||
TxtGrupoCheckList.Text = GvRow.DataKey("CheckListActividadGrupo");
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarGrupoCheckListD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckListActividadGrupo = GvRow.DataKey("CveCheckListActividadGrupo").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteCheckListActividadGrupo(CveCheckListActividadGrupo))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarGrupoCheckListD"));
|
||||
Alert("Se eliminó el Grupo de CheckList correctamente");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarGrupoCheckList_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (BtnAgregarGrupoCheckList.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddCheckListActividadGrupo(TxtGrupoCheckList.Text))
|
||||
{
|
||||
Alert("Se agregó el Grupo de CheckList correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateCheckListActividadGrupo(CveCheckListActividadGrupo, TxtGrupoCheckList.Text))
|
||||
{
|
||||
Alert("Se actualizó el Grupo de CheckList correctamente");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarGrupoCheckListD"));
|
||||
}
|
||||
}
|
||||
70
AF/CatCheckListTipo.aspx
Normal file
70
AF/CatCheckListTipo.aspx
Normal file
@@ -0,0 +1,70 @@
|
||||
<%@ Page Title="AF - Catálogo de Tipos de CheckLists" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatCheckListTipo.aspx.cs" Inherits="AF_CatCheckListTipo" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Tipos de CheckLists
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarTipoCheckListD" OnClick="BtnAgregarTipoCheckListD_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Tipo CheckList"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCheckListTipo, CheckListTipo" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipos de CheckList" DataField="CheckListTipo" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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>
|
||||
<div id="DivAgregarGrupoCheckListD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Grupo de CheckList</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTipoCheckList" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtTipoCheckList" runat="server" ControlToValidate="TxtTipoCheckList" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Grupo CheckList''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TxtTipoCheckList">Tipo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarTipoCheckList" OnClick="BtnAgregarTipoCheckList_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
100
AF/CatCheckListTipo.aspx.cs
Normal file
100
AF/CatCheckListTipo.aspx.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatCheckListTipo : ClsPaginas
|
||||
{
|
||||
private int CveCheckListTipo
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveCheckListTipo"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveCheckListTipo"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetCheckListTipo(-1))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarTipoCheckListD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarTipoCheckList.Text = "Agregar";
|
||||
TxtTipoCheckList.Text = "";
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarGrupoCheckListD"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarTipoCheckList.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckListTipo = GvRow.DataKey("CveCheckListTipo").ToEntero();
|
||||
TxtTipoCheckList.Text = GvRow.DataKey("CheckListTipo");
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarGrupoCheckListD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckListTipo = GvRow.DataKey("CveCheckListTipo").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteCheckListTipo(CveCheckListTipo))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarGrupoCheckListD"));
|
||||
Alert("Se eliminó el Grupo de CheckList correctamente");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarTipoCheckList_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (BtnAgregarTipoCheckList.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddCheckListTipo(TxtTipoCheckList.Text))
|
||||
{
|
||||
Alert("Se agregó el Tipo de CheckList correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateCheckListTipo(CveCheckListTipo, TxtTipoCheckList.Text))
|
||||
{
|
||||
Alert("Se actualizó el Tipo de CheckList correctamente");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarGrupoCheckListD"));
|
||||
}
|
||||
}
|
||||
@@ -1,437 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_OrdenServicio
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
Property DT_Cabeceras As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Cabeceras") Is Nothing Then
|
||||
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Cabeceras"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Cabeceras") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property DT_Datos As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Datos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Datos"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Datos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property ReporteBytes As Byte()
|
||||
Get
|
||||
If ViewState("ReporteBytes") Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return DirectCast(ViewState("ReporteBytes"), Byte())
|
||||
End If
|
||||
End Get
|
||||
Set(value As Byte())
|
||||
ViewState("ReporteBytes") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
'CargaDatos()
|
||||
|
||||
|
||||
TxtFecha.Text = $"{Now.Day.ToString("00")}/{Now.Month.ToString("00")}/{Now.Year}"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS "
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaCombos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
LblSubProyecto2.Text = LblSubProyecto.Text
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
'Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
' CargaDatos()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetMetricasRegistro(DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtFecha.Text.ToDate) Then
|
||||
DT_Cabeceras = ObjAF.DSResultados.Tables(0)
|
||||
DT_Datos = ObjAF.DSResultados.Tables(1)
|
||||
|
||||
|
||||
If DT_Cabeceras.Rows.Count > 0 AndAlso DT_Datos.Rows.Count > 0 Then
|
||||
BtnGuardar.Visible = True
|
||||
Else
|
||||
BtnGuardar.Visible = False
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
End If
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
BtnGuardar.Visible = False
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
If DT_Datos.Rows.Count > 0 Then
|
||||
CargaTablas()
|
||||
End If
|
||||
|
||||
UpGuardar.Update()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTablas()
|
||||
|
||||
Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
For IDX_LIMPIAR = 1 To 15
|
||||
GvDatos.Columns(IDX_LIMPIAR).HeaderText = ""
|
||||
GvDatos.Columns(IDX_LIMPIAR).Visible = False
|
||||
Next
|
||||
|
||||
Dim x As Integer = 0
|
||||
Dim limite As Integer = DT_Cabeceras.Rows.Count - 1
|
||||
|
||||
|
||||
For x = 0 To limite
|
||||
GvDatos.Columns(x + 1).HeaderText = DT_Cabeceras.Rows(x)("Metrica").ToString
|
||||
GvDatos.Columns(x + 1).Visible = True
|
||||
Next x
|
||||
|
||||
|
||||
GvDatos.DataSource = DT_Datos
|
||||
GvDatos.DataBind()
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.FCDropDownList("DdlPersonal").DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("CveEstatusPersonal = 1")
|
||||
e.Row.FCDropDownList("DdlPersonal").DataBind()
|
||||
e.Row.FCDropDownList("DdlPersonal").Items.Insert(0, New ListItem("Selecione uno", "-1"))
|
||||
|
||||
e.Row.FCDropDownList("DdlPersonal").SelectedValueExist(e.Row.DataKey("CvePersonaResponsable"))
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
CargaDatos()
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim limite As Integer = DT_Cabeceras.Rows.Count - 1
|
||||
|
||||
ObjAF.IniciaTransacSQL()
|
||||
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim DdlPersonal As DropDownList = GvRow.FCDropDownList("DdlPersonal")
|
||||
|
||||
If DdlPersonal.SelectedValue.ToEntero <= 0 Then
|
||||
Alert($"unidad: {GvRow.DataKey("Unidad")} require personal", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If ObjAF.AddMetricasValores(GvRow.DataKey("CveActivoFijo").ToEntero, DdlPersonal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim CveMetricaValor As Integer = ObjAF.CveMetricaValor
|
||||
Dim x As Integer = 0
|
||||
|
||||
For x = 0 To limite
|
||||
Dim valor As Decimal = GvRow.FCTextBox($"TxtMetrica{x + 1}").Text.ToDecimal
|
||||
|
||||
' valor = If(valor.Trim.Length = 0, "0", valor)
|
||||
If ObjAF.AddMetricasValoresDetalle(CveMetricaValor, DT_Cabeceras(x)("CveMetrica").ToString.ToEntero, valor) Then
|
||||
ErrorProceso = False
|
||||
Else
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
Next x
|
||||
|
||||
If ErrorProceso Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
|
||||
ObjAF.Commit()
|
||||
ExportToExcelG(GvDatos, $"RegistroRevision{Now.ToString("yyyyMMddmmss")}", UsuarioActual, "ReporteRevision", 100, 100, filtros:=$"Filtros {LblSubProyecto.Text}: {DdlSubProyecto.SelectedItem.Text} Fecha: {TxtFecha.Text}")
|
||||
RegistraScript("$('#ModalDescargaReporte').modal({ backdrop: 'static', keyboard: false });")
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
|
||||
BtnGuardar.Visible = False
|
||||
|
||||
UpDatos.Update()
|
||||
UpGuardar.Update()
|
||||
|
||||
Else
|
||||
ObjAF.RollBack()
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "DESCARGA EXCEL"
|
||||
|
||||
Public Sub ExportToExcelG(Gv1 As GridView, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional filtros As String = "")
|
||||
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In Gv1.Rows
|
||||
|
||||
Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
For IDX_LIMPIAR = 1 To 15
|
||||
GvRow.Cells(IDX_LIMPIAR).Text = GvRow.FCTextBox($"TxtMetrica{IDX_LIMPIAR}").Text
|
||||
Next
|
||||
|
||||
If GvRow.FCDropDownList("DDLPersonal").SelectedValue.ToEntero > 0 Then
|
||||
GvRow.Cells(16).Text = GvRow.FCDropDownList("DDLPersonal").SelectedItem.Text
|
||||
Else
|
||||
GvRow.Cells(16).Text = ""
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Dim sw1 As New StringWriter()
|
||||
Dim htw1 As New HtmlTextWriter(sw1)
|
||||
Gv1.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 asd As String = ""
|
||||
|
||||
|
||||
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 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
|
||||
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
|
||||
|
||||
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 = Gv1.Rows.Count + 4 + 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
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim memoryStream As New MemoryStream()
|
||||
excel.Save(memoryStream, SaveOptions.XlsxDefault)
|
||||
ReporteBytes = memoryStream.ToArray()
|
||||
memoryStream.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkDescargaReporte_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Response.ContentType = "application/force-download"
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx")
|
||||
Response.BinaryWrite(ReporteBytes)
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OrdenServicio.aspx.vb" Inherits="AF_OrdenServicio" EnableEventValidation = "false" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OrdenTrabajo.aspx.vb" Inherits="AF_OrdenTrabajo" EnableEventValidation = "false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -74,33 +74,31 @@
|
||||
<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"></asp:Label>
|
||||
<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="RFVDdlSubProyecto" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<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 class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha Inicio Contrato: </label>
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaInicioContrato" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicioContrato" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MEEFechaInicioContrato" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaInicioContrato" TargetControlID="TxtFecha" PopupButtonID="ImgFechaInicioContrato" PopupPosition="BottomRight" BehaviorID="_content_CEFechaInicioContrato"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicioContrato" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaInicioContrato" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio Contrato''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -112,43 +110,7 @@
|
||||
|
||||
|
||||
|
||||
<%-- <div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT portletfiltrostitlee">
|
||||
<div class="tools">
|
||||
<asp:UpdatePanel runat="server" style="display: inline-block;">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnFiltrar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnFiltrar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-2">
|
||||
|
||||
</div>
|
||||
<div class="col-md-1">Fecha:</div>
|
||||
<div class="col-md-2">
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -162,12 +124,7 @@
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<%--<asp:TemplateField HeaderText="SubProyecto" >
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
@@ -339,14 +296,14 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
<p>Metricas guardadas correctamente.</p>
|
||||
<asp:LinkButton ID="LnkDescargaReporte" runat="server" OnClick="LnkDescargaReporte_Click">
|
||||
<i class="fa fa-arrow-down" style="font-weight:bold;"></i> Descarga Reporte Excel</asp:LinkButton>
|
||||
<%-- <asp:LinkButton ID="LnkDescargaReporte" runat="server" OnClick="LnkDescargaReporte_Click">
|
||||
<i class="fa fa-arrow-down" style="font-weight:bold;"></i> Descarga Reporte Excel</asp:LinkButton>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaReporte" />
|
||||
<%-- <asp:PostBackTrigger ControlID="LnkDescargaReporte" />--%>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
285
AF/OrdenTrabajo.aspx.vb
Normal file
285
AF/OrdenTrabajo.aspx.vb
Normal file
@@ -0,0 +1,285 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_OrdenTrabajo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
Property CveOrdenTrabajo As Integer
|
||||
Get
|
||||
If ViewState("CveOrdenTrabajo") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveOrdenTrabajo").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOrdenTrabajo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
|
||||
If Request("CveOrdenTrabajo") IsNot Nothing Then
|
||||
CveOrdenTrabajo = Request("CveOrdenTrabajo").ToEntero
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS "
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaCombos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposServicios(-1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTipoServicio.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlTipoServicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
DdlTipoServicio.DataBind()
|
||||
DdlTipoServicio.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpFiltro.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
'Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
' CargaDatos()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "DESCARGA EXCEL"
|
||||
|
||||
'Public Sub ExportToExcelG(Gv1 As GridView, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional filtros As String = "")
|
||||
|
||||
|
||||
|
||||
' For Each GvRow As GridViewRow In Gv1.Rows
|
||||
|
||||
' Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
' For IDX_LIMPIAR = 1 To 15
|
||||
' GvRow.Cells(IDX_LIMPIAR).Text = GvRow.FCTextBox($"TxtMetrica{IDX_LIMPIAR}").Text
|
||||
' Next
|
||||
|
||||
' If GvRow.FCDropDownList("DDLPersonal").SelectedValue.ToEntero > 0 Then
|
||||
' GvRow.Cells(16).Text = GvRow.FCDropDownList("DDLPersonal").SelectedItem.Text
|
||||
' Else
|
||||
' GvRow.Cells(16).Text = ""
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
|
||||
|
||||
' Dim sw1 As New StringWriter()
|
||||
' Dim htw1 As New HtmlTextWriter(sw1)
|
||||
' Gv1.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 asd As String = ""
|
||||
|
||||
|
||||
' 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 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
|
||||
' 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
|
||||
|
||||
' 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 = Gv1.Rows.Count + 4 + 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
|
||||
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
|
||||
' Dim memoryStream As New MemoryStream()
|
||||
' excel.Save(memoryStream, SaveOptions.XlsxDefault)
|
||||
' ReporteBytes = memoryStream.ToArray()
|
||||
' memoryStream.Dispose()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
'Protected Sub LnkDescargaReporte_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
' Response.ContentType = "application/force-download"
|
||||
' Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx")
|
||||
' Response.BinaryWrite(ReporteBytes)
|
||||
' Response.End()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
'Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
376
AF/TipoOrdenTrabajo.aspx
Normal file
376
AF/TipoOrdenTrabajo.aspx
Normal file
@@ -0,0 +1,376 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="TipoOrdenTrabajo.aspx.vb" Inherits="AF_TipoOrdenTrabajo" EnableEventValidation = "false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Tipo Servicio
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li style="text-align: left!important">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarMaterial" CssClass=" " data-html="true" data-toggle="tooltip" data-placement="left" title="Agregar Material" Text="<i class='fa fa-plus'></i> Agregar Material" OnClick="LnkAgregarMaterial_Click"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<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="LblTitulo">Tipo Servicio</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: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">
|
||||
<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>
|
||||
</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>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" >
|
||||
|
||||
<ajax:TabPanel ID="TabMaterial" runat="server" HeaderText="Material">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarMaterial" runat="server" AlternateText="Eliminar" OnClick="LnkEliminarMaterial_Click" 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>
|
||||
|
||||
|
||||
</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="CveActividad" 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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabCheckList" runat="server" HeaderText="Check List">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<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=""
|
||||
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>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
<div id="ModalMateriales" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="Literal1" runat="server">Material </asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalMaterialesBody" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" CssClassDdl="select2me" CssStyle="width: 220px;"/>
|
||||
<label for="<%= DdlPS.ClientID.ToString()%>">
|
||||
Producto:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" MaxLength="100"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidad" FilterType="Custom" ValidChars="1234567890." />
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCantidad" runat="server" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Telefono ''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterial"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">
|
||||
Cantidad:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox runat="server" Text="Continuar agregando" ID="ChkContinuarMaterial" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button runat="server" ID="BtnGuardarMaterial" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="GrpMaterial" OnClick="BtnGuardarMaterial_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalDescargaReporte" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel ID="UpModalTitleModalDescargaReporte" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="LtlModalTitleModalDescargaReporte" runat="server">Descarga reporte </asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalCuerpoModalDescargaReporte" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<p>Metricas guardadas correctamente.</p>
|
||||
<%-- <asp:LinkButton ID="LnkDescargaReporte" runat="server" OnClick="LnkDescargaReporte_Click">
|
||||
<i class="fa fa-arrow-down" style="font-weight:bold;"></i> Descarga Reporte Excel</asp:LinkButton>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<%-- <asp:PostBackTrigger ControlID="LnkDescargaReporte" />--%>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</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="true" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
617
AF/TipoOrdenTrabajo.aspx.vb
Normal file
617
AF/TipoOrdenTrabajo.aspx.vb
Normal file
@@ -0,0 +1,617 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_TipoOrdenTrabajo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
Property CveTipoServicio As Integer
|
||||
Get
|
||||
If ViewState("CveTipoServicio") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveTipoServicio").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTipoServicio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DTMateriales As DataTable
|
||||
Get
|
||||
If ViewState("DTMateriales") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTMateriales"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTMateriales") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property DTActividades As DataTable
|
||||
Get
|
||||
If ViewState("DTActividades") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTActividades"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTActividades") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property DTACheckList As DataTable
|
||||
Get
|
||||
If ViewState("DTACheckList") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTACheckList"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTACheckList") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
|
||||
If Request("CveTipoServicio") IsNot Nothing Then
|
||||
CveTipoServicio = Request("CveTipoServicio").ToEntero
|
||||
End If
|
||||
|
||||
If CveTipoServicio = -1 Then
|
||||
CrearTablas()
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS "
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
|
||||
Protected Sub CargaCombos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposMantenimiento(-1) Then
|
||||
DdlTipoMantenimiento.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlTipoMantenimiento.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
DdlTipoMantenimiento.DataBind()
|
||||
DdlTipoMantenimiento.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpFiltro.Update()
|
||||
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
|
||||
If CveTipoServicio <= 0 Then
|
||||
CargaActividades()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CREAR TABLAS"
|
||||
|
||||
Private Sub CrearTablas()
|
||||
'CveTipoServicioMaterial CveTipoServicio Cantidad CveUM CvePS Tipo
|
||||
|
||||
Dim DtTempMaterial As New DataTable
|
||||
Dim DtTempActividades As New DataTable
|
||||
|
||||
DtTempMaterial.Columns.Add("CveTipoServicioMaterial", GetType(Integer))
|
||||
DtTempMaterial.Columns.Add("CveTipoServicio", GetType(Integer))
|
||||
DtTempMaterial.Columns.Add("Cantidad", GetType(Decimal))
|
||||
DtTempMaterial.Columns.Add("CveUM", GetType(Integer))
|
||||
DtTempMaterial.Columns.Add("CvePS", GetType(Integer))
|
||||
DtTempMaterial.Columns.Add("Tipo", GetType(Integer))
|
||||
DtTempMaterial.Columns.Add("PS", GetType(String))
|
||||
DtTempMaterial.Columns.Add("Abreviatura", GetType(String))
|
||||
DtTempMaterial.AcceptChanges()
|
||||
|
||||
DTMateriales = DtTempMaterial
|
||||
|
||||
|
||||
'CveTipoServicioActividad CveActividad Duracion Observaciones
|
||||
|
||||
DtTempActividades.Columns.Add("CveTipoServicioActividad", GetType(String))
|
||||
DtTempActividades.Columns.Add("CveActividad", GetType(String))
|
||||
DtTempActividades.Columns.Add("Duracion", GetType(Decimal))
|
||||
DtTempActividades.Columns.Add("Observaciones", GetType(String))
|
||||
DtTempActividades.AcceptChanges()
|
||||
|
||||
DTActividades = DtTempActividades
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
'Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
' CargaDatos()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
CargaMateriales()
|
||||
CargaActividades()
|
||||
CargaCheckList()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMateriales()
|
||||
|
||||
If CveTipoServicio > 0 Then
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposServiciosMaterial(-1, CveTipoServicio) Then
|
||||
GvMaterial.DataSource = DTMateriales
|
||||
|
||||
Else
|
||||
GvMaterial = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvMaterial.DataBind()
|
||||
Else
|
||||
GvMaterial.DataSource = DTMateriales
|
||||
GvMaterial.DataBind()
|
||||
End If
|
||||
|
||||
UpGvMaterial.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaActividades()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If CveTipoServicio <= 0 Then
|
||||
|
||||
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
|
||||
|
||||
Private Sub CargaCheckList()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "DESCARGA EXCEL"
|
||||
|
||||
'Public Sub ExportToExcelG(Gv1 As GridView, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional filtros As String = "")
|
||||
|
||||
|
||||
|
||||
' For Each GvRow As GridViewRow In Gv1.Rows
|
||||
|
||||
' Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
' For IDX_LIMPIAR = 1 To 15
|
||||
' GvRow.Cells(IDX_LIMPIAR).Text = GvRow.FCTextBox($"TxtMetrica{IDX_LIMPIAR}").Text
|
||||
' Next
|
||||
|
||||
' If GvRow.FCDropDownList("DDLPersonal").SelectedValue.ToEntero > 0 Then
|
||||
' GvRow.Cells(16).Text = GvRow.FCDropDownList("DDLPersonal").SelectedItem.Text
|
||||
' Else
|
||||
' GvRow.Cells(16).Text = ""
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
|
||||
|
||||
' Dim sw1 As New StringWriter()
|
||||
' Dim htw1 As New HtmlTextWriter(sw1)
|
||||
' Gv1.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 asd As String = ""
|
||||
|
||||
|
||||
' 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 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
|
||||
' 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
|
||||
|
||||
' 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 = Gv1.Rows.Count + 4 + 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
|
||||
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
|
||||
' Dim memoryStream As New MemoryStream()
|
||||
' excel.Save(memoryStream, SaveOptions.XlsxDefault)
|
||||
' ReporteBytes = memoryStream.ToArray()
|
||||
' memoryStream.Dispose()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
'Protected Sub LnkDescargaReporte_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
' Response.ContentType = "application/force-download"
|
||||
' Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx")
|
||||
' Response.BinaryWrite(ReporteBytes)
|
||||
' Response.End()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
'Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkAgregarMaterial_Click(sender As Object, e As EventArgs)
|
||||
|
||||
RegistraScript("$('#ModalMateriales').modal('show');")
|
||||
ResetModalMaterial()
|
||||
End Sub
|
||||
|
||||
Private Sub ResetModalMaterial()
|
||||
|
||||
DdlPS.txtValue.Value = ""
|
||||
DdlPS.txtText.Value = ""
|
||||
TxtCantidad.Text = ""
|
||||
|
||||
UpModalMaterialesBody.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardarMaterial_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlPS.txtValue.Value.ToString.ToEntero <= 0 Then
|
||||
Alert("Debe seleccionar un producto o servicio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveUnidadMedida As Integer = -1
|
||||
Dim CvePS As Integer = DdlPS.txtValue.Value.ToEntero
|
||||
Dim Tipo As Integer = -1
|
||||
Dim UMAbreviatura As String = ""
|
||||
|
||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
CveUnidadMedida = drPS("CveUM").ToString.ToEntero
|
||||
Tipo = drPS("CveTipoPS").ToString.ToEntero
|
||||
UMAbreviatura = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Abreviatura", $"CveUnidadMedida = {CveUnidadMedida}")
|
||||
|
||||
If CveTipoServicio > 0 Then
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.AddTiposServiciosMaterial(CveTipoServicio, TxtCantidad.Text.ToDecimal, CveUnidadMedida, CvePS, Tipo) Then
|
||||
Alert("Material agregado correctamente")
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
Else
|
||||
|
||||
Dim nRow As DataRow = DTMateriales.NewRow
|
||||
|
||||
nRow("CveTipoServicioMaterial") = -1
|
||||
nRow("CveTipoServicio") = -1
|
||||
nRow("Cantidad") = TxtCantidad.Text.ToEntero
|
||||
nRow("CveUM") = CveUnidadMedida
|
||||
nRow("CvePS") = DdlPS.txtValue.Value.ToEntero
|
||||
nRow("Tipo") = Tipo
|
||||
nRow("Abreviatura") = UMAbreviatura
|
||||
nRow("PS") = DdlPS.txtText.Value
|
||||
|
||||
DTMateriales.Rows.Add(nRow)
|
||||
Alert("Material agregado correctamente")
|
||||
|
||||
End If
|
||||
|
||||
CargaMateriales()
|
||||
|
||||
ResetModalMaterial()
|
||||
|
||||
RegistraScript("$('#ModalMateriales').modal('hide');")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminarMaterial_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
If CveTipoServicio > 0 Then
|
||||
|
||||
|
||||
Dim CveTipoServicioMaterial As Integer = GvRow.DataKey("CveTipoServicioMaterial").ToEntero
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
If ObjAF.DeleteTiposServiciosMaterial(CveTipoServicioMaterial, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Material agregado correctamente")
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
Else
|
||||
|
||||
|
||||
Dim dr As DataRow = DTMateriales.Rows(GvRow.RowIndex)
|
||||
dr.Delete()
|
||||
DTMateriales.AcceptChanges()
|
||||
Alert("Material agregado correctamente")
|
||||
End If
|
||||
|
||||
CargaMateriales()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim SBError As New StringBuilder
|
||||
|
||||
ObjAF.IniciaTransacSQL()
|
||||
|
||||
'validacion?
|
||||
|
||||
|
||||
|
||||
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("").Text.ToDecimal
|
||||
|
||||
|
||||
If ObjAF.AddTiposServiciosActividades(GvRow.DataKey("").ToEntero) Then
|
||||
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If ErrorProceso Then
|
||||
ObjAF.RollBack()
|
||||
Else
|
||||
ObjAF.Commit()
|
||||
Alert("Tipo servicio guardado correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -89,10 +89,12 @@ Public Class ClsAF
|
||||
Public Property CveGrupoAF As Integer
|
||||
Public Property CveAFPadre As Integer
|
||||
Public Property CveDispositivo As Integer
|
||||
Public Property MedidaVehicular As Integer
|
||||
|
||||
Public Property MedidaVehicular As Integer
|
||||
Public Property CveTipoServicio As Integer
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||
|
||||
If TransaccionCompartida Is Nothing Then
|
||||
@@ -3502,7 +3504,7 @@ Public Class ClsAF
|
||||
|
||||
Public Function AddTiposServicios(Nombre As String, CveTipoMantenimiento As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
CveTipoServicio = -1
|
||||
DataAdapter("PA_AF_TiposServicioAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -3510,10 +3512,16 @@ Public Class ClsAF
|
||||
.Add("@CveTipoMantenimiento", SqlDbType.Int).Value = CveTipoMantenimiento
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
CveTipoServicio = SqlAdapter.SelectCommand.Parameters("@CveTipoServicio").Value.ToString.ToEntero
|
||||
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar los tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
@@ -3715,13 +3723,15 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DeleteTiposServiciosMaterial(CveTipoServicioMaterial As Integer) As Boolean
|
||||
Public Function DeleteTiposServiciosMaterial(CveTipoServicioMaterial As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_TiposServiciosMaterialDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTipoServicioMaterial", SqlDbType.Int).Value = CveTipoServicioMaterial
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3775,6 +3785,387 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddActividades(Nombre As String, CvePuesto As Integer, Cantidad As Decimal, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_ActividadesAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Nombre", SqlDbType.NVarChar).Value = Nombre
|
||||
.Add("@CvePuesto", SqlDbType.Int).Value = CvePuesto
|
||||
.Add("@Cantidad", SqlDbType.SmallMoney).Value = Cantidad
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar la actividad", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateActividades(CveActividad As Integer, Nombre As String, CvePuesto As Integer, Cantidad As Decimal, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_ActividadesUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveActividad", SqlDbType.Int).Value = CveActividad
|
||||
.Add("@Nombre", SqlDbType.NVarChar).Value = Nombre
|
||||
.Add("@CvePuesto", SqlDbType.Int).Value = CvePuesto
|
||||
.Add("@Cantidad", SqlDbType.SmallMoney).Value = Cantidad
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar la actividad", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DeleteActividades(CveActividad As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_ActividadesDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveActividad", SqlDbType.Int).Value = CveActividad
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar la actividad", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCheckListActividadGrupo(CveCheckListActividadGrupo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListGrupoGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListActividadGrupo", SqlDbType.Int).Value = CveCheckListActividadGrupo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el grupo de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddCheckListActividadGrupo(CheckListActividadGrupo As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListGrupoAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CheckListActividadGrupo", SqlDbType.NVarChar).Value = CheckListActividadGrupo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el grupo de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCheckListActividadGrupo(CveCheckListActividadGrupo As Integer, CheckListActividadGrupo As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListGrupoUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListActividadGrupo", SqlDbType.Int).Value = CveCheckListActividadGrupo
|
||||
.Add("@CheckListActividadGrupo", SqlDbType.NVarChar).Value = CheckListActividadGrupo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el grupo de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DeleteCheckListActividadGrupo(CveCheckListActividadGrupo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListGrupoDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListActividadGrupo", SqlDbType.Int).Value = CveCheckListActividadGrupo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el grupo de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCheckListTipo(CveCheckListTipo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListTipoGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListTipo", SqlDbType.Int).Value = CveCheckListTipo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el tipo de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddCheckListTipo(CheckListTipo As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListTipoAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CheckListTipo", SqlDbType.NVarChar).Value = CheckListTipo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el tipo de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCheckListTipo(CveCheckListTipo As Integer, CheckListTipo As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListTipoUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListTipo", SqlDbType.Int).Value = CveCheckListTipo
|
||||
.Add("@CheckListTipo", SqlDbType.NVarChar).Value = CheckListTipo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el tipo de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DeleteCheckListTipo(CveCheckListTipo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListTipoDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListTipo", SqlDbType.Int).Value = CveCheckListTipo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el tipo de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCheckListActividad(CveCheckListActividad As Integer, CveCheckListActividadGrupo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListActividadGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListActividad", SqlDbType.Int).Value = CveCheckListActividad
|
||||
.Add("@CveCheckListActividadGrupo", SqlDbType.Int).Value = CveCheckListActividadGrupo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las actividades de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddCheckListActividad(CheckListActividad As String, CveCheckListActividadGrupo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListActividadAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CheckListActividad", SqlDbType.NVarChar).Value = CheckListActividad
|
||||
.Add("@CveCheckListActividadGrupo", SqlDbType.Int).Value = CveCheckListActividadGrupo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar las actividades de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCheckListActividad(CveCheckListActividad As Integer, CheckListActividad As String, CveCheckListActividadGrupo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListActividadUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListActividad", SqlDbType.Int).Value = CveCheckListActividad
|
||||
.Add("@CheckListActividad", SqlDbType.NVarChar).Value = CheckListActividad
|
||||
.Add("@CveCheckListActividadGrupo", SqlDbType.Int).Value = CveCheckListActividadGrupo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar las actividades de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DeleteCheckListActividad(CveCheckListActividad As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListActividadDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckListActividad", SqlDbType.Int).Value = CveCheckListActividad
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar las actividades de CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCheckList(CveCheckList As Integer, CveTipoServicio As Integer, CveCheckListActividad As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckList", SqlDbType.Int).Value = CveCheckList
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
.Add("@CveCheckListActividad", SqlDbType.Int).Value = CveCheckListActividad
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddCheckList(CveTipoServicio As Integer, CveCheckListActividad As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
.Add("@CveCheckListActividad", SqlDbType.Int).Value = CveCheckListActividad
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCheckList(CveCheckList As Integer, CveTipoServicio As Integer, CveCheckListActividad As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckList", SqlDbType.Int).Value = CveCheckList
|
||||
.Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio
|
||||
.Add("@CveCheckListActividad", SqlDbType.Int).Value = CveCheckListActividad
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DeleteCheckList(CveCheckList As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_CheckListDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCheckList", SqlDbType.Int).Value = CveCheckList
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el CheckList", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -1785,6 +1785,27 @@ Public Class ClsCompProveedores
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetContratoProvedores(CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Prov_SAT_ContratosProveedoresGet")
|
||||
|
||||
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 contratos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function RemoveContrato(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -1812,7 +1833,7 @@ Public Class ClsCompProveedores
|
||||
|
||||
|
||||
|
||||
Public Function AddRePresentanteLegal(RepresentanteLegal As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function AddRePresentanteLegal(RepresentanteLegal As String, CveUsuario As Integer, CveEmpresa As Integer, CveProveedor As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1822,6 +1843,7 @@ Public Class ClsCompProveedores
|
||||
.Add("@RepresentanteLegal", SqlDbType.VarChar).Value = RepresentanteLegal
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -458,7 +458,8 @@ Public Class ClsEdocumentacion
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DocumentacionElectronicaAuditoriaGet(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional Modulo As Integer = 3, Optional Estatus As Integer = -1) As Boolean
|
||||
Public Function DocumentacionElectronicaAuditoriaGet(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional Modulo As Integer = 3, Optional Estatus As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||
Optional CveTipoContrato As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Edoc_DocumentacionElectronicaAuditoriaGet")
|
||||
@@ -471,6 +472,8 @@ Public Class ClsEdocumentacion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Modulo", SqlDbType.Int).Value = Modulo
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -2728,7 +2728,7 @@ Public Class ClsGenerales
|
||||
#Region "P A Q U E T E R I A S G U I A S"
|
||||
Public Function AddPaqueteriasGuias(CvePaqueteria As Integer, CvePaqueteriaGuiaTipo As Integer, CveEstatus As Integer, CveSubProyecto As Integer, Fecha As String, Rastreo As String, Guia As String, NumCajas As Integer,
|
||||
Peso As Double, Dimensiones As String, FechaEstimada As String, Observaciones As String, CveUsuario As Integer, CveEmpresa As Integer, Optional ImplicaCosto As Boolean = True,
|
||||
Optional EsEntregaInterna As Boolean = False) As Integer
|
||||
Optional EsEntregaInterna As Boolean = False, Optional PolizaSeguro As String = "-1") As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
@@ -2755,6 +2755,7 @@ Public Class ClsGenerales
|
||||
.Add("@CvePaqueteriaGuiaTipo", SqlDbType.SmallInt).Value = CvePaqueteriaGuiaTipo
|
||||
|
||||
.Add("@EsEntregaInterna", SqlDbType.Bit).Value = EsEntregaInterna
|
||||
.Add("@PolizaSeguro", SqlDbType.NVarChar).Value = PolizaSeguro
|
||||
|
||||
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
|
||||
@@ -1729,9 +1729,11 @@ Public Class ClsOC
|
||||
'End Function
|
||||
#End Region
|
||||
|
||||
Public Function GetOrdenesCompraRep(Tipo As String, CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveEstatus As Integer,
|
||||
FechaInicio As Date, FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuarioRegistro As Integer, CveUsuario As Integer, CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1", Optional CveActivoFijo As Integer = -1,
|
||||
Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
|
||||
Public Function GetOrdenesCompraRep(Tipo As String, CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveEstatus As Integer, FechaInicio As Date,
|
||||
FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuarioRegistro As Integer, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1",
|
||||
Optional CveActivoFijo As Integer = -1, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1,
|
||||
Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraRep")
|
||||
@@ -1757,6 +1759,8 @@ Public Class ClsOC
|
||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||
.Add("@SoloSubProyectosConPermiso", SqlDbType.Bit).Value = SoloSubProyectosConPermiso
|
||||
.Add("@CveUsuarioAutorizo", SqlDbType.Int).Value = CveUsuarioAutorizo
|
||||
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
|
||||
.Add("@EntregaDirecta", SqlDbType.Int).Value = EntregaDirecta
|
||||
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||
|
||||
End With
|
||||
@@ -1863,7 +1867,7 @@ Public Class ClsOC
|
||||
End Function
|
||||
|
||||
Public Function GetOrdenesPendientes(pTipo As String, pTipoBusqueda As Integer, pCveEmpresa As Integer, pCveProyecto As Integer, pCveSubProyecto As Integer, pCveEstatusCompra As Integer,
|
||||
pCveUsuario As Integer, CveCliente As Integer, Optional SoloSubProyectosConPermiso As Boolean = False) As Boolean
|
||||
pCveUsuario As Integer, CveCliente As Integer, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraPendientes")
|
||||
@@ -1878,6 +1882,8 @@ Public Class ClsOC
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@TipoBusqueda", SqlDbType.Int).Value = pTipoBusqueda
|
||||
.Add("@SoloSubProyectosConPermiso", SqlDbType.Bit).Value = SoloSubProyectosConPermiso
|
||||
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
|
||||
.Add("@EntregaDirecta", SqlDbType.Int).Value = EntregaDirecta
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -3955,6 +3955,16 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/AF/CatTiposServicios.aspx".ToUpper(), 765)
|
||||
PaginaDict.Add("/AF/CatTiposServiciosActividades.aspx".ToUpper(), 766)
|
||||
PaginaDict.Add("/AF/CatTiposServiciosMateriales.aspx".ToUpper(), 767)
|
||||
PaginaDict.Add("/AF/CatActividades.aspx".ToUpper(), 768)
|
||||
PaginaDict.Add("/AF/CatCheckListActividadesGrupos.aspx".ToUpper(), 769)
|
||||
PaginaDict.Add("/AF/CatCheckListTipo.aspx".ToUpper(), 770)
|
||||
PaginaDict.Add("/AF/CatCheckListActividades.aspx".ToUpper(), 771)
|
||||
PaginaDict.Add("/AF/CatCheckList.aspx".ToUpper(), 772)
|
||||
|
||||
PaginaDict.Add("/AF/TipoOrdenTrabajo.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/AF/OrdenTrabajo.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/AF/RepOrdenTrabajo.aspx".ToUpper(), -1)
|
||||
|
||||
#End Region
|
||||
'AIMMGM
|
||||
#Region "AIMMGM"
|
||||
|
||||
@@ -3839,7 +3839,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al agregar el Curso CursoAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al agregar el Curso CursoAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -3875,7 +3875,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Actualizar el Curso CursoUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Actualizar el Curso CursoUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -3894,12 +3894,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Retorno = True
|
||||
Catch exs As SqlException
|
||||
If exs.ErrorCode = -2146232060 Then
|
||||
OnError("Ocurrió al Eliminar el Curso, Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Curso, Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió al Eliminar el Curso CursoRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Curso CursoRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Eliminar el Curso CursoRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Curso CursoRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
|
||||
@@ -3924,7 +3924,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al consultar el reporte CursosRepGet.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al consultar el reporte CursosRepGet.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -4115,7 +4115,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al agregar el Tema TemaAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al agregar el Tema TemaAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -4140,7 +4140,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Actualizar el Tema TemaUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió error al Actualizar el Tema TemaUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -4161,9 +4161,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
|
||||
|
||||
If exs.Message.Contains("Número: 547;") Then
|
||||
OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("El Tema no se puede eliminar porque tiene registros relacionados..", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió al Eliminar el Tema TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("El Tema no se puede eliminar porque tiene registros relacionados. TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
|
||||
|
||||
@@ -4174,7 +4174,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
'End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Eliminar el Tema TemasRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Tema TemasRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
@@ -4225,7 +4225,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al agregar el Subtema SubtemaAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al agregar el Subtema SubtemaAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -4251,7 +4251,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Actualizar el Subtema SubtemaUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Actualizar el Subtema SubtemaUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -4270,12 +4270,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
|
||||
Catch exs As SqlException
|
||||
If exs.ErrorCode = -2146232060 Then
|
||||
OnError("Ocurrió al Eliminar el Subtema, Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Subtema, Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió al Eliminar el Subtema SubtemaRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Subtema SubtemaRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Eliminar el Subtema SubtemaRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Subtema SubtemaRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
@@ -4329,7 +4329,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al agregar el Capacitador CapacitadorAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al agregar el Capacitador CapacitadorAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -4358,7 +4358,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Actualizar el Capacitador CapacitadorUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Actualizar el Capacitador CapacitadorUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -4376,12 +4376,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Retorno = True
|
||||
Catch exs As SqlException
|
||||
If exs.ErrorCode = -2146232060 Then
|
||||
OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió al Eliminar el Tema CapaditadorRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Tema CapaditadorRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Eliminar el Tema CapacitadorRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al Eliminar el Tema CapacitadorRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
@@ -460,8 +460,7 @@ Public Class ClsVentas
|
||||
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
|
||||
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
|
||||
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
|
||||
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveVendedor As Integer = -1, Optional ObsAlm As String = "", Optional FormaPaqueteria As Integer = -1,
|
||||
Optional CorreoNot As String = "-1") As Boolean
|
||||
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUpdate")
|
||||
|
||||
@@ -492,10 +491,6 @@ Public Class ClsVentas
|
||||
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
|
||||
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@ObservacionesAlm", SqlDbType.NVarChar).Value = ObsAlm
|
||||
.Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
|
||||
.Add("@CorreoNotificacion", SqlDbType.NVarChar).Value = CorreoNot
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -507,6 +502,32 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateObservacionesVenta(CveVenta As Integer, CveEmpresa As Integer, CveVendedor As Integer, Observaciones As String, FormaPaqueteria As Integer, CorreoNotificaciones As String, ObservacionesAlm As String,
|
||||
Pedido As String, OrdenCompra As String, FechaPago As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasObservacionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@Observaciones", SqlDbType.NVarChar).Value = Observaciones
|
||||
.Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
|
||||
.Add("@CorreoNotificaciones", SqlDbType.NVarChar).Value = CorreoNotificaciones
|
||||
.Add("@ObservacionesAlm", SqlDbType.NVarChar).Value = ObservacionesAlm
|
||||
.Add("@Pedido", SqlDbType.NVarChar).Value = Pedido
|
||||
.Add("@OrdenCompra", SqlDbType.NVarChar).Value = OrdenCompra
|
||||
.Add("@FechaPago", SqlDbType.Date).Value = FechaPago
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar las observaciones de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateFechaVencimientoVenta(CveVenta As Integer, FechaVencimiento As Date) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasFechaVencimientoUpdate")
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<xs:element name="DtDatos" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_DataSetName="DtDatos" msprop:Generator_UserDSName="DtDatos">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="DataTable1" msprop:Generator_TableClassName="DataTable1DataTable" msprop:Generator_TableVarName="tableDataTable1" msprop:Generator_RowChangedName="DataTable1RowChanged" msprop:Generator_TablePropName="DataTable1" msprop:Generator_RowDeletingName="DataTable1RowDeleting" msprop:Generator_RowChangingName="DataTable1RowChanging" msprop:Generator_RowEvHandlerName="DataTable1RowChangeEventHandler" msprop:Generator_RowDeletedName="DataTable1RowDeleted" msprop:Generator_RowClassName="DataTable1Row" msprop:Generator_UserTableName="DataTable1" msprop:Generator_RowEvArgName="DataTable1RowChangeEvent">
|
||||
<xs:element name="DataTable1" msprop:Generator_TableClassName="DataTable1DataTable" msprop:Generator_TableVarName="tableDataTable1" msprop:Generator_TablePropName="DataTable1" msprop:Generator_RowDeletingName="DataTable1RowDeleting" msprop:Generator_RowChangingName="DataTable1RowChanging" msprop:Generator_RowEvHandlerName="DataTable1RowChangeEventHandler" msprop:Generator_RowDeletedName="DataTable1RowDeleted" msprop:Generator_UserTableName="DataTable1" msprop:Generator_RowChangedName="DataTable1RowChanged" msprop:Generator_RowEvArgName="DataTable1RowChangeEvent" msprop:Generator_RowClassName="DataTable1Row">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="SerieFolio" msprop:Generator_ColumnVarNameInTable="columnSerieFolio" msprop:Generator_ColumnPropNameInRow="SerieFolio" msprop:Generator_ColumnPropNameInTable="SerieFolioColumn" msprop:Generator_UserColumnName="SerieFolio" type="xs:string" minOccurs="0" />
|
||||
@@ -28,7 +28,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="VentaUtilidadDetalle" msprop:Generator_TableClassName="VentaUtilidadDetalleDataTable" msprop:Generator_TableVarName="tableVentaUtilidadDetalle" msprop:Generator_TablePropName="VentaUtilidadDetalle" msprop:Generator_RowDeletingName="VentaUtilidadDetalleRowDeleting" msprop:Generator_RowChangingName="VentaUtilidadDetalleRowChanging" msprop:Generator_RowEvHandlerName="VentaUtilidadDetalleRowChangeEventHandler" msprop:Generator_RowDeletedName="VentaUtilidadDetalleRowDeleted" msprop:Generator_UserTableName="VentaUtilidadDetalle" msprop:Generator_RowChangedName="VentaUtilidadDetalleRowChanged" msprop:Generator_RowEvArgName="VentaUtilidadDetalleRowChangeEvent" msprop:Generator_RowClassName="VentaUtilidadDetalleRow">
|
||||
<xs:element name="VentaUtilidadDetalle" msprop:Generator_TableClassName="VentaUtilidadDetalleDataTable" msprop:Generator_TableVarName="tableVentaUtilidadDetalle" msprop:Generator_RowChangedName="VentaUtilidadDetalleRowChanged" msprop:Generator_TablePropName="VentaUtilidadDetalle" msprop:Generator_RowDeletingName="VentaUtilidadDetalleRowDeleting" msprop:Generator_RowChangingName="VentaUtilidadDetalleRowChanging" msprop:Generator_RowEvHandlerName="VentaUtilidadDetalleRowChangeEventHandler" msprop:Generator_RowDeletedName="VentaUtilidadDetalleRowDeleted" msprop:Generator_RowClassName="VentaUtilidadDetalleRow" msprop:Generator_UserTableName="VentaUtilidadDetalle" msprop:Generator_RowEvArgName="VentaUtilidadDetalleRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="CantVta" msprop:Generator_ColumnVarNameInTable="columnCantVta" msprop:Generator_ColumnPropNameInRow="CantVta" msprop:Generator_ColumnPropNameInTable="CantVtaColumn" msprop:Generator_UserColumnName="CantVta" type="xs:decimal" minOccurs="0" />
|
||||
@@ -46,7 +46,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="RepClientesCxC" msprop:Generator_TableClassName="RepClientesCxCDataTable" msprop:Generator_TableVarName="tableRepClientesCxC" msprop:Generator_TablePropName="RepClientesCxC" msprop:Generator_RowDeletingName="RepClientesCxCRowDeleting" msprop:Generator_RowChangingName="RepClientesCxCRowChanging" msprop:Generator_RowEvHandlerName="RepClientesCxCRowChangeEventHandler" msprop:Generator_RowDeletedName="RepClientesCxCRowDeleted" msprop:Generator_UserTableName="RepClientesCxC" msprop:Generator_RowChangedName="RepClientesCxCRowChanged" msprop:Generator_RowEvArgName="RepClientesCxCRowChangeEvent" msprop:Generator_RowClassName="RepClientesCxCRow">
|
||||
<xs:element name="RepClientesCxC" msprop:Generator_TableClassName="RepClientesCxCDataTable" msprop:Generator_TableVarName="tableRepClientesCxC" msprop:Generator_RowChangedName="RepClientesCxCRowChanged" msprop:Generator_TablePropName="RepClientesCxC" msprop:Generator_RowDeletingName="RepClientesCxCRowDeleting" msprop:Generator_RowChangingName="RepClientesCxCRowChanging" msprop:Generator_RowEvHandlerName="RepClientesCxCRowChangeEventHandler" msprop:Generator_RowDeletedName="RepClientesCxCRowDeleted" msprop:Generator_RowClassName="RepClientesCxCRow" msprop:Generator_UserTableName="RepClientesCxC" msprop:Generator_RowEvArgName="RepClientesCxCRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="SerieFolio" msprop:Generator_ColumnVarNameInTable="columnSerieFolio" msprop:Generator_ColumnPropNameInRow="SerieFolio" msprop:Generator_ColumnPropNameInTable="SerieFolioColumn" msprop:Generator_UserColumnName="SerieFolio" type="xs:string" minOccurs="0" />
|
||||
@@ -64,7 +64,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="LibroMayor" msprop:Generator_TableClassName="LibroMayorDataTable" msprop:Generator_TableVarName="tableLibroMayor" msprop:Generator_RowChangedName="LibroMayorRowChanged" msprop:Generator_TablePropName="LibroMayor" msprop:Generator_RowDeletingName="LibroMayorRowDeleting" msprop:Generator_RowChangingName="LibroMayorRowChanging" msprop:Generator_RowEvHandlerName="LibroMayorRowChangeEventHandler" msprop:Generator_RowDeletedName="LibroMayorRowDeleted" msprop:Generator_RowClassName="LibroMayorRow" msprop:Generator_UserTableName="LibroMayor" msprop:Generator_RowEvArgName="LibroMayorRowChangeEvent">
|
||||
<xs:element name="LibroMayor" msprop:Generator_TableClassName="LibroMayorDataTable" msprop:Generator_TableVarName="tableLibroMayor" msprop:Generator_TablePropName="LibroMayor" msprop:Generator_RowDeletingName="LibroMayorRowDeleting" msprop:Generator_RowChangingName="LibroMayorRowChanging" msprop:Generator_RowEvHandlerName="LibroMayorRowChangeEventHandler" msprop:Generator_RowDeletedName="LibroMayorRowDeleted" msprop:Generator_UserTableName="LibroMayor" msprop:Generator_RowChangedName="LibroMayorRowChanged" msprop:Generator_RowEvArgName="LibroMayorRowChangeEvent" msprop:Generator_RowClassName="LibroMayorRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Fecha" msprop:Generator_ColumnVarNameInTable="columnFecha" msprop:Generator_ColumnPropNameInRow="Fecha" msprop:Generator_ColumnPropNameInTable="FechaColumn" msprop:Generator_UserColumnName="Fecha" type="xs:dateTime" minOccurs="0" />
|
||||
@@ -87,7 +87,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="LibroDiario" msprop:Generator_TableClassName="LibroDiarioDataTable" msprop:Generator_TableVarName="tableLibroDiario" msprop:Generator_RowChangedName="LibroDiarioRowChanged" msprop:Generator_TablePropName="LibroDiario" msprop:Generator_RowDeletingName="LibroDiarioRowDeleting" msprop:Generator_RowChangingName="LibroDiarioRowChanging" msprop:Generator_RowEvHandlerName="LibroDiarioRowChangeEventHandler" msprop:Generator_RowDeletedName="LibroDiarioRowDeleted" msprop:Generator_RowClassName="LibroDiarioRow" msprop:Generator_UserTableName="LibroDiario" msprop:Generator_RowEvArgName="LibroDiarioRowChangeEvent">
|
||||
<xs:element name="LibroDiario" msprop:Generator_TableClassName="LibroDiarioDataTable" msprop:Generator_TableVarName="tableLibroDiario" msprop:Generator_TablePropName="LibroDiario" msprop:Generator_RowDeletingName="LibroDiarioRowDeleting" msprop:Generator_RowChangingName="LibroDiarioRowChanging" msprop:Generator_RowEvHandlerName="LibroDiarioRowChangeEventHandler" msprop:Generator_RowDeletedName="LibroDiarioRowDeleted" msprop:Generator_UserTableName="LibroDiario" msprop:Generator_RowChangedName="LibroDiarioRowChanged" msprop:Generator_RowEvArgName="LibroDiarioRowChangeEvent" msprop:Generator_RowClassName="LibroDiarioRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Fecha" msprop:Generator_ColumnVarNameInTable="columnFecha" msprop:Generator_ColumnPropNameInRow="Fecha" msprop:Generator_ColumnPropNameInTable="FechaColumn" msprop:Generator_UserColumnName="Fecha" type="xs:dateTime" minOccurs="0" />
|
||||
@@ -111,7 +111,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="RepBalanzaComprobacion" msprop:Generator_TableClassName="RepBalanzaComprobacionDataTable" msprop:Generator_TableVarName="tableRepBalanzaComprobacion" msprop:Generator_TablePropName="RepBalanzaComprobacion" msprop:Generator_RowDeletingName="RepBalanzaComprobacionRowDeleting" msprop:Generator_RowChangingName="RepBalanzaComprobacionRowChanging" msprop:Generator_RowEvHandlerName="RepBalanzaComprobacionRowChangeEventHandler" msprop:Generator_RowDeletedName="RepBalanzaComprobacionRowDeleted" msprop:Generator_UserTableName="RepBalanzaComprobacion" msprop:Generator_RowChangedName="RepBalanzaComprobacionRowChanged" msprop:Generator_RowEvArgName="RepBalanzaComprobacionRowChangeEvent" msprop:Generator_RowClassName="RepBalanzaComprobacionRow">
|
||||
<xs:element name="RepBalanzaComprobacion" msprop:Generator_TableClassName="RepBalanzaComprobacionDataTable" msprop:Generator_TableVarName="tableRepBalanzaComprobacion" msprop:Generator_RowChangedName="RepBalanzaComprobacionRowChanged" msprop:Generator_TablePropName="RepBalanzaComprobacion" msprop:Generator_RowDeletingName="RepBalanzaComprobacionRowDeleting" msprop:Generator_RowChangingName="RepBalanzaComprobacionRowChanging" msprop:Generator_RowEvHandlerName="RepBalanzaComprobacionRowChangeEventHandler" msprop:Generator_RowDeletedName="RepBalanzaComprobacionRowDeleted" msprop:Generator_RowClassName="RepBalanzaComprobacionRow" msprop:Generator_UserTableName="RepBalanzaComprobacion" msprop:Generator_RowEvArgName="RepBalanzaComprobacionRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" msprop:Generator_UserColumnName="Id" type="xs:string" minOccurs="0" />
|
||||
@@ -137,7 +137,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="CatPS" msprop:Generator_TableClassName="CatPSDataTable" msprop:Generator_TableVarName="tableCatPS" msprop:Generator_RowChangedName="CatPSRowChanged" msprop:Generator_TablePropName="CatPS" msprop:Generator_RowDeletingName="CatPSRowDeleting" msprop:Generator_RowChangingName="CatPSRowChanging" msprop:Generator_RowEvHandlerName="CatPSRowChangeEventHandler" msprop:Generator_RowDeletedName="CatPSRowDeleted" msprop:Generator_RowClassName="CatPSRow" msprop:Generator_UserTableName="CatPS" msprop:Generator_RowEvArgName="CatPSRowChangeEvent">
|
||||
<xs:element name="CatPS" msprop:Generator_TableClassName="CatPSDataTable" msprop:Generator_TableVarName="tableCatPS" msprop:Generator_TablePropName="CatPS" msprop:Generator_RowDeletingName="CatPSRowDeleting" msprop:Generator_RowChangingName="CatPSRowChanging" msprop:Generator_RowEvHandlerName="CatPSRowChangeEventHandler" msprop:Generator_RowDeletedName="CatPSRowDeleted" msprop:Generator_UserTableName="CatPS" msprop:Generator_RowChangedName="CatPSRowChanged" msprop:Generator_RowEvArgName="CatPSRowChangeEvent" msprop:Generator_RowClassName="CatPSRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Clasificacion" msprop:Generator_ColumnVarNameInTable="columnClasificacion" msprop:Generator_ColumnPropNameInRow="Clasificacion" msprop:Generator_ColumnPropNameInTable="ClasificacionColumn" msprop:Generator_UserColumnName="Clasificacion" type="xs:string" minOccurs="0" />
|
||||
@@ -153,7 +153,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="RepProveedorCxP" msprop:Generator_TableClassName="RepProveedorCxPDataTable" msprop:Generator_TableVarName="tableRepProveedorCxP" msprop:Generator_TablePropName="RepProveedorCxP" msprop:Generator_RowDeletingName="RepProveedorCxPRowDeleting" msprop:Generator_RowChangingName="RepProveedorCxPRowChanging" msprop:Generator_RowEvHandlerName="RepProveedorCxPRowChangeEventHandler" msprop:Generator_RowDeletedName="RepProveedorCxPRowDeleted" msprop:Generator_UserTableName="RepProveedorCxP" msprop:Generator_RowChangedName="RepProveedorCxPRowChanged" msprop:Generator_RowEvArgName="RepProveedorCxPRowChangeEvent" msprop:Generator_RowClassName="RepProveedorCxPRow">
|
||||
<xs:element name="RepProveedorCxP" msprop:Generator_TableClassName="RepProveedorCxPDataTable" msprop:Generator_TableVarName="tableRepProveedorCxP" msprop:Generator_RowChangedName="RepProveedorCxPRowChanged" msprop:Generator_TablePropName="RepProveedorCxP" msprop:Generator_RowDeletingName="RepProveedorCxPRowDeleting" msprop:Generator_RowChangingName="RepProveedorCxPRowChanging" msprop:Generator_RowEvHandlerName="RepProveedorCxPRowChangeEventHandler" msprop:Generator_RowDeletedName="RepProveedorCxPRowDeleted" msprop:Generator_RowClassName="RepProveedorCxPRow" msprop:Generator_UserTableName="RepProveedorCxP" msprop:Generator_RowEvArgName="RepProveedorCxPRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="SerieFolio" msprop:Generator_ColumnVarNameInTable="columnSerieFolio" msprop:Generator_ColumnPropNameInRow="SerieFolio" msprop:Generator_ColumnPropNameInTable="SerieFolioColumn" msprop:Generator_UserColumnName="SerieFolio" type="xs:string" minOccurs="0" />
|
||||
@@ -170,7 +170,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ResumenNC" msprop:Generator_TableClassName="ResumenNCDataTable" msprop:Generator_TableVarName="tableResumenNC" msprop:Generator_TablePropName="ResumenNC" msprop:Generator_RowDeletingName="ResumenNCRowDeleting" msprop:Generator_RowChangingName="ResumenNCRowChanging" msprop:Generator_RowEvHandlerName="ResumenNCRowChangeEventHandler" msprop:Generator_RowDeletedName="ResumenNCRowDeleted" msprop:Generator_UserTableName="ResumenNC" msprop:Generator_RowChangedName="ResumenNCRowChanged" msprop:Generator_RowEvArgName="ResumenNCRowChangeEvent" msprop:Generator_RowClassName="ResumenNCRow">
|
||||
<xs:element name="ResumenNC" msprop:Generator_TableClassName="ResumenNCDataTable" msprop:Generator_TableVarName="tableResumenNC" msprop:Generator_RowChangedName="ResumenNCRowChanged" msprop:Generator_TablePropName="ResumenNC" msprop:Generator_RowDeletingName="ResumenNCRowDeleting" msprop:Generator_RowChangingName="ResumenNCRowChanging" msprop:Generator_RowEvHandlerName="ResumenNCRowChangeEventHandler" msprop:Generator_RowDeletedName="ResumenNCRowDeleted" msprop:Generator_RowClassName="ResumenNCRow" msprop:Generator_UserTableName="ResumenNC" msprop:Generator_RowEvArgName="ResumenNCRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="SerieFolio" msprop:Generator_ColumnVarNameInTable="columnSerieFolio" msprop:Generator_ColumnPropNameInRow="SerieFolio" msprop:Generator_ColumnPropNameInTable="SerieFolioColumn" msprop:Generator_UserColumnName="SerieFolio" type="xs:string" minOccurs="0" />
|
||||
@@ -179,7 +179,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ProgramarRecursos" msprop:Generator_TableClassName="ProgramarRecursosDataTable" msprop:Generator_TableVarName="tableProgramarRecursos" msprop:Generator_TablePropName="ProgramarRecursos" msprop:Generator_RowDeletingName="ProgramarRecursosRowDeleting" msprop:Generator_RowChangingName="ProgramarRecursosRowChanging" msprop:Generator_RowEvHandlerName="ProgramarRecursosRowChangeEventHandler" msprop:Generator_RowDeletedName="ProgramarRecursosRowDeleted" msprop:Generator_UserTableName="ProgramarRecursos" msprop:Generator_RowChangedName="ProgramarRecursosRowChanged" msprop:Generator_RowEvArgName="ProgramarRecursosRowChangeEvent" msprop:Generator_RowClassName="ProgramarRecursosRow">
|
||||
<xs:element name="ProgramarRecursos" msprop:Generator_TableClassName="ProgramarRecursosDataTable" msprop:Generator_TableVarName="tableProgramarRecursos" msprop:Generator_RowChangedName="ProgramarRecursosRowChanged" msprop:Generator_TablePropName="ProgramarRecursos" msprop:Generator_RowDeletingName="ProgramarRecursosRowDeleting" msprop:Generator_RowChangingName="ProgramarRecursosRowChanging" msprop:Generator_RowEvHandlerName="ProgramarRecursosRowChangeEventHandler" msprop:Generator_RowDeletedName="ProgramarRecursosRowDeleted" msprop:Generator_RowClassName="ProgramarRecursosRow" msprop:Generator_UserTableName="ProgramarRecursos" msprop:Generator_RowEvArgName="ProgramarRecursosRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="CveCompra" msprop:Generator_ColumnVarNameInTable="columnCveCompra" msprop:Generator_ColumnPropNameInRow="CveCompra" msprop:Generator_ColumnPropNameInTable="CveCompraColumn" msprop:Generator_UserColumnName="CveCompra" type="xs:short" minOccurs="0" />
|
||||
@@ -215,7 +215,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="RepIVA" msprop:Generator_TableClassName="RepIVADataTable" msprop:Generator_TableVarName="tableRepIVA" msprop:Generator_TablePropName="RepIVA" msprop:Generator_RowDeletingName="RepIVARowDeleting" msprop:Generator_RowChangingName="RepIVARowChanging" msprop:Generator_RowEvHandlerName="RepIVARowChangeEventHandler" msprop:Generator_RowDeletedName="RepIVARowDeleted" msprop:Generator_UserTableName="RepIVA" msprop:Generator_RowChangedName="RepIVARowChanged" msprop:Generator_RowEvArgName="RepIVARowChangeEvent" msprop:Generator_RowClassName="RepIVARow">
|
||||
<xs:element name="RepIVA" msprop:Generator_TableClassName="RepIVADataTable" msprop:Generator_TableVarName="tableRepIVA" msprop:Generator_RowChangedName="RepIVARowChanged" msprop:Generator_TablePropName="RepIVA" msprop:Generator_RowDeletingName="RepIVARowDeleting" msprop:Generator_RowChangingName="RepIVARowChanging" msprop:Generator_RowEvHandlerName="RepIVARowChangeEventHandler" msprop:Generator_RowDeletedName="RepIVARowDeleted" msprop:Generator_RowClassName="RepIVARow" msprop:Generator_UserTableName="RepIVA" msprop:Generator_RowEvArgName="RepIVARowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="TipoDocto" msprop:Generator_ColumnVarNameInTable="columnTipoDocto" msprop:Generator_ColumnPropNameInRow="TipoDocto" msprop:Generator_ColumnPropNameInTable="TipoDoctoColumn" msprop:Generator_UserColumnName="TipoDocto" type="xs:string" minOccurs="0" />
|
||||
@@ -235,10 +235,28 @@
|
||||
<xs:element name="CveVenta" msprop:Generator_ColumnVarNameInTable="columnCveVenta" msprop:Generator_ColumnPropNameInRow="CveVenta" msprop:Generator_ColumnPropNameInTable="CveVentaColumn" msprop:Generator_UserColumnName="CveVenta" type="xs:short" minOccurs="0" />
|
||||
<xs:element name="PorcentajeIVA" msprop:Generator_ColumnVarNameInTable="columnPorcentajeIVA" msprop:Generator_ColumnPropNameInRow="PorcentajeIVA" msprop:Generator_ColumnPropNameInTable="PorcentajeIVAColumn" msprop:Generator_UserColumnName="PorcentajeIVA" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="RetIVAServicios" msprop:Generator_ColumnVarNameInTable="columnRetIVAServicios" msprop:Generator_ColumnPropNameInRow="RetIVAServicios" msprop:Generator_ColumnPropNameInTable="RetIVAServiciosColumn" msprop:Generator_UserColumnName="RetIVAServicios" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="FolioFiscal" msprop:Generator_ColumnVarNameInTable="columnFolioFiscal" msprop:Generator_ColumnPropNameInRow="FolioFiscal" msprop:Generator_ColumnPropNameInTable="FolioFiscalColumn" msprop:Generator_UserColumnName="FolioFiscal" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Fecha" msprop:Generator_ColumnVarNameInTable="columnFecha" msprop:Generator_ColumnPropNameInRow="Fecha" msprop:Generator_ColumnPropNameInTable="FechaColumn" msprop:Generator_UserColumnName="Fecha" type="xs:dateTime" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="RepIVAAcreditable" msprop:Generator_TableClassName="RepIVAAcreditableDataTable" msprop:Generator_TableVarName="tableRepIVAAcreditable" msprop:Generator_TablePropName="RepIVAAcreditable" msprop:Generator_RowDeletingName="RepIVAAcreditableRowDeleting" msprop:Generator_RowChangingName="RepIVAAcreditableRowChanging" msprop:Generator_RowEvHandlerName="RepIVAAcreditableRowChangeEventHandler" msprop:Generator_RowDeletedName="RepIVAAcreditableRowDeleted" msprop:Generator_UserTableName="RepIVAAcreditable" msprop:Generator_RowChangedName="RepIVAAcreditableRowChanged" msprop:Generator_RowEvArgName="RepIVAAcreditableRowChangeEvent" msprop:Generator_RowClassName="RepIVAAcreditableRow">
|
||||
<xs:element name="DtVentaDetalle" msprop:Generator_TableClassName="DtVentaDetalleDataTable" msprop:Generator_TableVarName="tableDtVentaDetalle" msprop:Generator_TablePropName="DtVentaDetalle" msprop:Generator_RowDeletingName="DtVentaDetalleRowDeleting" msprop:Generator_RowChangingName="DtVentaDetalleRowChanging" msprop:Generator_RowEvHandlerName="DtVentaDetalleRowChangeEventHandler" msprop:Generator_RowDeletedName="DtVentaDetalleRowDeleted" msprop:Generator_UserTableName="DtVentaDetalle" msprop:Generator_RowChangedName="DtVentaDetalleRowChanged" msprop:Generator_RowEvArgName="DtVentaDetalleRowChangeEvent" msprop:Generator_RowClassName="DtVentaDetalleRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Cantidad" msprop:Generator_ColumnVarNameInTable="columnCantidad" msprop:Generator_ColumnPropNameInRow="Cantidad" msprop:Generator_ColumnPropNameInTable="CantidadColumn" msprop:Generator_UserColumnName="Cantidad" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="UM" msprop:Generator_ColumnVarNameInTable="columnUM" msprop:Generator_ColumnPropNameInRow="UM" msprop:Generator_ColumnPropNameInTable="UMColumn" msprop:Generator_UserColumnName="UM" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="SATClaveProdServ" msprop:Generator_ColumnVarNameInTable="columnSATClaveProdServ" msprop:Generator_ColumnPropNameInRow="SATClaveProdServ" msprop:Generator_ColumnPropNameInTable="SATClaveProdServColumn" msprop:Generator_UserColumnName="SATClaveProdServ" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="SATClaveUM" msprop:Generator_ColumnVarNameInTable="columnSATClaveUM" msprop:Generator_ColumnPropNameInRow="SATClaveUM" msprop:Generator_ColumnPropNameInTable="SATClaveUMColumn" msprop:Generator_UserColumnName="SATClaveUM" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="PS" msprop:Generator_ColumnVarNameInTable="columnPS" msprop:Generator_ColumnPropNameInRow="PS" msprop:Generator_ColumnPropNameInTable="PSColumn" msprop:Generator_UserColumnName="PS" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Obs" msprop:Generator_ColumnVarNameInTable="columnObs" msprop:Generator_ColumnPropNameInRow="Obs" msprop:Generator_ColumnPropNameInTable="ObsColumn" msprop:Generator_UserColumnName="Obs" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="PU" msprop:Generator_ColumnVarNameInTable="columnPU" msprop:Generator_ColumnPropNameInRow="PU" msprop:Generator_ColumnPropNameInTable="PUColumn" msprop:Generator_UserColumnName="PU" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="PorcentajeIVA" msprop:Generator_ColumnVarNameInTable="columnPorcentajeIVA" msprop:Generator_ColumnPropNameInRow="PorcentajeIVA" msprop:Generator_ColumnPropNameInTable="PorcentajeIVAColumn" msprop:Generator_UserColumnName="PorcentajeIVA" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Descuento" msprop:Generator_ColumnVarNameInTable="columnDescuento" msprop:Generator_ColumnPropNameInRow="Descuento" msprop:Generator_ColumnPropNameInTable="DescuentoColumn" msprop:Generator_UserColumnName="Descuento" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="CveClasificacion" msprop:Generator_ColumnVarNameInTable="columnCveClasificacion" msprop:Generator_ColumnPropNameInRow="CveClasificacion" msprop:Generator_ColumnPropNameInTable="CveClasificacionColumn" msprop:Generator_UserColumnName="CveClasificacion" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="RepIVAAcreditable" msprop:Generator_TableClassName="RepIVAAcreditableDataTable" msprop:Generator_TableVarName="tableRepIVAAcreditable" msprop:Generator_RowChangedName="RepIVAAcreditableRowChanged" msprop:Generator_TablePropName="RepIVAAcreditable" msprop:Generator_RowDeletingName="RepIVAAcreditableRowDeleting" msprop:Generator_RowChangingName="RepIVAAcreditableRowChanging" msprop:Generator_RowEvHandlerName="RepIVAAcreditableRowChangeEventHandler" msprop:Generator_RowDeletedName="RepIVAAcreditableRowDeleted" msprop:Generator_RowClassName="RepIVAAcreditableRow" msprop:Generator_UserTableName="RepIVAAcreditable" msprop:Generator_RowEvArgName="RepIVAAcreditableRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="TipoDocto" msprop:Generator_ColumnVarNameInTable="columnTipoDocto" msprop:Generator_ColumnPropNameInRow="TipoDocto" msprop:Generator_ColumnPropNameInTable="TipoDoctoColumn" msprop:Generator_UserColumnName="TipoDocto" type="xs:string" minOccurs="0" />
|
||||
@@ -271,22 +289,8 @@
|
||||
<xs:element name="valorActosImp8" msprop:Generator_ColumnVarNameInTable="columnvalorActosImp8" msprop:Generator_ColumnPropNameInRow="valorActosImp8" msprop:Generator_ColumnPropNameInTable="valorActosImp8Column" msprop:Generator_UserColumnName="valorActosImp8" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="valorActosImp0" msprop:Generator_ColumnVarNameInTable="columnvalorActosImp0" msprop:Generator_ColumnPropNameInRow="valorActosImp0" msprop:Generator_ColumnPropNameInTable="valorActosImp0Column" msprop:Generator_UserColumnName="valorActosImp0" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="PorcentajeIVA" msprop:Generator_ColumnVarNameInTable="columnPorcentajeIVA" msprop:Generator_ColumnPropNameInRow="PorcentajeIVA" msprop:Generator_ColumnPropNameInTable="PorcentajeIVAColumn" msprop:Generator_UserColumnName="PorcentajeIVA" type="xs:double" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="DtVentaDetalle" msprop:Generator_TableClassName="DtVentaDetalleDataTable" msprop:Generator_TableVarName="tableDtVentaDetalle" msprop:Generator_RowChangedName="DtVentaDetalleRowChanged" msprop:Generator_TablePropName="DtVentaDetalle" msprop:Generator_RowDeletingName="DtVentaDetalleRowDeleting" msprop:Generator_RowChangingName="DtVentaDetalleRowChanging" msprop:Generator_RowEvHandlerName="DtVentaDetalleRowChangeEventHandler" msprop:Generator_RowDeletedName="DtVentaDetalleRowDeleted" msprop:Generator_RowClassName="DtVentaDetalleRow" msprop:Generator_UserTableName="DtVentaDetalle" msprop:Generator_RowEvArgName="DtVentaDetalleRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Cantidad" msprop:Generator_ColumnVarNameInTable="columnCantidad" msprop:Generator_ColumnPropNameInRow="Cantidad" msprop:Generator_ColumnPropNameInTable="CantidadColumn" msprop:Generator_UserColumnName="Cantidad" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="UM" msprop:Generator_ColumnVarNameInTable="columnUM" msprop:Generator_ColumnPropNameInRow="UM" msprop:Generator_ColumnPropNameInTable="UMColumn" msprop:Generator_UserColumnName="UM" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="SATClaveProdServ" msprop:Generator_ColumnVarNameInTable="columnSATClaveProdServ" msprop:Generator_ColumnPropNameInRow="SATClaveProdServ" msprop:Generator_ColumnPropNameInTable="SATClaveProdServColumn" msprop:Generator_UserColumnName="SATClaveProdServ" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="SATClaveUM" msprop:Generator_ColumnVarNameInTable="columnSATClaveUM" msprop:Generator_ColumnPropNameInRow="SATClaveUM" msprop:Generator_ColumnPropNameInTable="SATClaveUMColumn" msprop:Generator_UserColumnName="SATClaveUM" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="PS" msprop:Generator_ColumnVarNameInTable="columnPS" msprop:Generator_ColumnPropNameInRow="PS" msprop:Generator_ColumnPropNameInTable="PSColumn" msprop:Generator_UserColumnName="PS" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Obs" msprop:Generator_ColumnVarNameInTable="columnObs" msprop:Generator_ColumnPropNameInRow="Obs" msprop:Generator_ColumnPropNameInTable="ObsColumn" msprop:Generator_UserColumnName="Obs" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="PU" msprop:Generator_ColumnVarNameInTable="columnPU" msprop:Generator_ColumnPropNameInRow="PU" msprop:Generator_ColumnPropNameInTable="PUColumn" msprop:Generator_UserColumnName="PU" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="PorcentajeIVA" msprop:Generator_ColumnVarNameInTable="columnPorcentajeIVA" msprop:Generator_ColumnPropNameInRow="PorcentajeIVA" msprop:Generator_ColumnPropNameInTable="PorcentajeIVAColumn" msprop:Generator_UserColumnName="PorcentajeIVA" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Descuento" msprop:Generator_ColumnVarNameInTable="columnDescuento" msprop:Generator_ColumnPropNameInRow="Descuento" msprop:Generator_ColumnPropNameInTable="DescuentoColumn" msprop:Generator_UserColumnName="Descuento" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="CveClasificacion" msprop:Generator_ColumnVarNameInTable="columnCveClasificacion" msprop:Generator_ColumnPropNameInRow="CveClasificacion" msprop:Generator_ColumnPropNameInTable="CveClasificacionColumn" msprop:Generator_UserColumnName="CveClasificacion" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Fecha" msprop:Generator_ColumnVarNameInTable="columnFecha" msprop:Generator_ColumnPropNameInRow="Fecha" msprop:Generator_ColumnPropNameInTable="FechaColumn" msprop:Generator_UserColumnName="Fecha" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="FolioFiscal" msprop:Generator_ColumnVarNameInTable="columnFolioFiscal" msprop:Generator_ColumnPropNameInRow="FolioFiscal" msprop:Generator_ColumnPropNameInTable="FolioFiscalColumn" msprop:Generator_UserColumnName="FolioFiscal" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<Shape ID="DesignTable:RepProveedorCxP" ZOrder="6" X="63" Y="251" Height="238" Width="170" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="234" />
|
||||
<Shape ID="DesignTable:ResumenNC" ZOrder="5" X="697" Y="496" Height="86" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="82" />
|
||||
<Shape ID="DesignTable:ProgramarRecursos" ZOrder="4" X="484" Y="563" Height="257" Width="206" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="253" />
|
||||
<Shape ID="DesignTable:RepIVA" ZOrder="3" X="315" Y="564" Height="257" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="253" />
|
||||
<Shape ID="DesignTable:RepIVAAcreditable" ZOrder="2" X="91" Y="567" Height="257" Width="175" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="253" />
|
||||
<Shape ID="DesignTable:DtVentaDetalle" ZOrder="1" X="280" Y="34" Height="219" Width="154" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="215" />
|
||||
<Shape ID="DesignTable:RepIVA" ZOrder="3" X="315" Y="564" Height="295" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="291" />
|
||||
<Shape ID="DesignTable:DtVentaDetalle" ZOrder="2" X="280" Y="34" Height="219" Width="154" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="215" />
|
||||
<Shape ID="DesignTable:RepIVAAcreditable" ZOrder="1" X="94" Y="508" Height="256" Width="175" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="252" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
</DiagramLayout>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="lQzXnMYzJj9Lq03SQ9fuwegTyb4=">
|
||||
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="0qns/0838cJFb5yp+oM76mm6SuzgFbT1201XTY4DyBY=">
|
||||
<bindingConfigurations>
|
||||
<bindingConfiguration bindingType="basicHttpBinding" name="BasicHttpBinding_IRCService">
|
||||
<properties>
|
||||
|
||||
@@ -83,6 +83,32 @@
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="ReceiveGPSInformationMassiveXML">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="xmlGPSInfo">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:any processContents="lax" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="ReceiveGPSInformationMassiveXMLResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="ReceiveGPSInformationMassiveXMLResult">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:any processContents="lax" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
</s:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="ReceiveGPSInformationSoapIn">
|
||||
@@ -103,6 +129,12 @@
|
||||
<wsdl:message name="ReceiveGPSInformation_ObjetoSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:ReceiveGPSInformation_ObjetoResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="ReceiveGPSInformationMassiveXMLSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:ReceiveGPSInformationMassiveXML" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="ReceiveGPSInformationMassiveXMLSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:ReceiveGPSInformationMassiveXMLResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="ReceiveGPSInfoSoap">
|
||||
<wsdl:operation name="ReceiveGPSInformation">
|
||||
<wsdl:input message="tns:ReceiveGPSInformationSoapIn" />
|
||||
@@ -116,6 +148,10 @@
|
||||
<wsdl:input message="tns:ReceiveGPSInformation_ObjetoSoapIn" />
|
||||
<wsdl:output message="tns:ReceiveGPSInformation_ObjetoSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ReceiveGPSInformationMassiveXML">
|
||||
<wsdl:input message="tns:ReceiveGPSInformationMassiveXMLSoapIn" />
|
||||
<wsdl:output message="tns:ReceiveGPSInformationMassiveXMLSoapOut" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="ReceiveGPSInfoSoap" type="tns:ReceiveGPSInfoSoap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
@@ -146,6 +182,15 @@
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ReceiveGPSInformationMassiveXML">
|
||||
<soap:operation soapAction="http://tempuri.org/ReceiveGPSInformationMassiveXML" style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="ReceiveGPSInfoSoap12" type="tns:ReceiveGPSInfoSoap">
|
||||
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
@@ -176,6 +221,15 @@
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ReceiveGPSInformationMassiveXML">
|
||||
<soap12:operation soapAction="http://tempuri.org/ReceiveGPSInformationMassiveXML" style="document" />
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="ReceiveGPSInfo">
|
||||
<wsdl:port name="ReceiveGPSInfoSoap" binding="tns:ReceiveGPSInfoSoap">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="NuY352soI+OoFqhd5YCpuMvYvGc=">
|
||||
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="ABzLtw767ZQUU0k4nCQPs//zQy+J7OBv8lt+paGCsS4=">
|
||||
<bindingConfigurations>
|
||||
<bindingConfiguration bindingType="basicHttpBinding" name="Service1Soap">
|
||||
<properties>
|
||||
|
||||
@@ -153,6 +153,43 @@
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="ConsultarPresunto">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="RFCEmisor" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="CuentaUsuario" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="ClaveUsuario" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="RfcPresunto" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="ConsultarPresuntoResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="ConsultarPresuntoResult" type="tns:StructPresunto" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:complexType name="StructPresunto">
|
||||
<s:sequence>
|
||||
<s:element minOccurs="1" maxOccurs="1" name="Estado" type="s:int" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="Mensaje" type="s:string" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="Numero" type="s:int" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="Rfc" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="Nombre" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="Situacion" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="NumeroOficioSATPresuncion" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="PublicacionSATPresuncion" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="NumeroFechaOficioDOF" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="PublicacionDOFPresuncion" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="PubicacionSATDesvirtuado" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="NumeroOficioDesvirtuado" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="PublicacionDOFDesvirtuado" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="NumeroOficioDefinitivo" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="PublicacionSATDefinitivo" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="PublicacionDOFDefinitivo" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
<s:element name="ConsultarCfdisEmitidos">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
@@ -242,6 +279,12 @@
|
||||
<wsdl:message name="ConsultarCancelacionSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:ConsultarCancelacionResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="ConsultarPresuntoSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:ConsultarPresunto" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="ConsultarPresuntoSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:ConsultarPresuntoResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="ConsultarCfdisEmitidosSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:ConsultarCfdisEmitidos" />
|
||||
</wsdl:message>
|
||||
@@ -290,6 +333,11 @@
|
||||
<wsdl:input message="tns:ConsultarCancelacionSoapIn" />
|
||||
<wsdl:output message="tns:ConsultarCancelacionSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ConsultarPresunto">
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Consultar un CFDI directamente por UUID y Fecha</wsdl:documentation>
|
||||
<wsdl:input message="tns:ConsultarPresuntoSoapIn" />
|
||||
<wsdl:output message="tns:ConsultarPresuntoSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ConsultarCfdisEmitidos">
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Consultar los CFDIs emitidos por rango de fecha</wsdl:documentation>
|
||||
<wsdl:input message="tns:ConsultarCfdisEmitidosSoapIn" />
|
||||
@@ -366,6 +414,15 @@
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ConsultarPresunto">
|
||||
<soap:operation soapAction="http://tempuri.org/ConsultarPresunto" style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ConsultarCfdisEmitidos">
|
||||
<soap:operation soapAction="http://tempuri.org/ConsultarCfdisEmitidos" style="document" />
|
||||
<wsdl:input>
|
||||
@@ -450,6 +507,15 @@
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ConsultarPresunto">
|
||||
<soap12:operation soapAction="http://tempuri.org/ConsultarPresunto" style="document" />
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ConsultarCfdisEmitidos">
|
||||
<soap12:operation soapAction="http://tempuri.org/ConsultarCfdisEmitidos" style="document" />
|
||||
<wsdl:input>
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<xs:complexType name="Acuse">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="CodigoEstatus" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="EsCancelable" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="Estado" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="EstatusCancelacion" nillable="true" type="xs:string" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="Acuse" nillable="true" type="tns:Acuse" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="pOmVJStm5hxCRlvTFTVnICnM8aQ=">
|
||||
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="WiujLa2Wexk6dRbNVWygD/ahBFk/T12zxoYVy0Rah2Y=">
|
||||
<bindingConfigurations>
|
||||
<bindingConfiguration bindingType="basicHttpBinding" name="BasicHttpBinding_IConsultaCFDIService">
|
||||
<properties>
|
||||
|
||||
@@ -9,22 +9,26 @@ Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Imports ADSistemaLibrary.SatXml
|
||||
Imports ADSistemaLibrary.SatXml.XmlSatCFDI
|
||||
|
||||
Public Class GenerarPDFFactura : Implements IHttpHandler
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property EsProduccion As Boolean
|
||||
Get
|
||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||
Return False
|
||||
Else
|
||||
Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1")
|
||||
End If
|
||||
End Get
|
||||
Public ReadOnly Property EsProduccion As Boolean
|
||||
Get
|
||||
Return False
|
||||
'If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||
' Return False
|
||||
'Else
|
||||
' Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1")
|
||||
'End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
@@ -46,96 +50,211 @@ Public Class GenerarPDFFactura : Implements IHttpHandler
|
||||
|
||||
Dim Formato As String = ""
|
||||
|
||||
If datos.API_SALI Then
|
||||
Formato = ModExtensiones.DirectorioBaseEmpresas + "Empresas/Grales/ReporteAPISali.rdlc"
|
||||
Else
|
||||
Formato = ModExtensiones.DirectorioBaseEmpresas + "Empresas/Grales/ReporteAPI.rdlc"
|
||||
End If
|
||||
Dim Xml = New System.Xml.XmlDocument()
|
||||
Xml.LoadXml(datos.XML)
|
||||
Dim ArchivoXML = $"{context.Server.MapPath("/")}/Temp/{DateTime.UtcNow.Ticks}_{datos.Factura.Serie}-{datos.Factura.Folio}.xml"
|
||||
Xml.Save(ArchivoXML)
|
||||
|
||||
Parametros.Add(New ReportParameter("Empresa", datos.Empresa.Empresa))
|
||||
Parametros.Add(New ReportParameter("RFC", datos.Empresa.RFC))
|
||||
Parametros.Add(New ReportParameter("DomicilioExpedicion", datos.Empresa.DomicilioFiscal))
|
||||
Parametros.Add(New ReportParameter("Serie", datos.Factura.Serie))
|
||||
Parametros.Add(New ReportParameter("Folio", datos.Factura.Folio))
|
||||
Parametros.Add(New ReportParameter("Fecha", datos.Factura.Fecha))
|
||||
Parametros.Add(New ReportParameter("ClienteNombre", datos.Cliente.NombreComercial))
|
||||
Parametros.Add(New ReportParameter("ClienteDireccion", datos.Cliente.Calle + " Colonia " + datos.Cliente.Colonia + " " + datos.Cliente.Ciudad + ", " + datos.Cliente.Estado))
|
||||
Parametros.Add(New ReportParameter("ClienteLugar", datos.Cliente.Ciudad))
|
||||
Parametros.Add(New ReportParameter("ClienteRFC", datos.Cliente.RFC))
|
||||
Parametros.Add(New ReportParameter("ImporteLetra", datos.Factura.Total.Texto2Letras()))
|
||||
Parametros.Add(New ReportParameter("FormaPago", datos.Factura.FormaPago))
|
||||
Parametros.Add(New ReportParameter("MetodoPago", datos.Factura.MetodoPago))
|
||||
Parametros.Add(New ReportParameter("SelloCFDI", datos.Timbrado.SelloCFDI))
|
||||
Parametros.Add(New ReportParameter("SelloSAT", datos.Timbrado.SelloSAT))
|
||||
Parametros.Add(New ReportParameter("CadenaOriginal", datos.Timbrado.CadenaOriginal))
|
||||
Parametros.Add(New ReportParameter("FolioFiscal", datos.Factura.UUID))
|
||||
Parametros.Add(New ReportParameter("SerieCertificadoSAT", datos.Timbrado.SerieCertificadoSAT))
|
||||
Parametros.Add(New ReportParameter("FechaCertificado", datos.Timbrado.FechaCertificado))
|
||||
Parametros.Add(New ReportParameter("CertificadoContribuyente", datos.Timbrado.CertificadoContribuyente))
|
||||
Parametros.Add(New ReportParameter("UsoCFDI", datos.Factura.UsoCFDI))
|
||||
Parametros.Add(New ReportParameter("Vencimiento", datos.Factura.FechaVencimiento))
|
||||
Parametros.Add(New ReportParameter("SubTotal", datos.Factura.SubTotal))
|
||||
Parametros.Add(New ReportParameter("Descuentos", datos.Factura.Descuentos))
|
||||
Parametros.Add(New ReportParameter("IVA", datos.Factura.IVA))
|
||||
Parametros.Add(New ReportParameter("IEPS", datos.Factura.IEPS))
|
||||
Parametros.Add(New ReportParameter("Total", datos.Factura.Total))
|
||||
Parametros.Add(New ReportParameter("QR", datos.Timbrado.QR))
|
||||
ImprimirbytesPDF(context, GenerarCFDi(context, ArchivoXML, datos), "Factura")
|
||||
|
||||
Dim DtDatos As New DataTable
|
||||
DtDatos.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||
DtDatos.Columns.Add(New DataColumn("UnidadMedida", GetType(String)))
|
||||
DtDatos.Columns.Add(New DataColumn("PS", GetType(String)))
|
||||
DtDatos.Columns.Add(New DataColumn("PU", GetType(Decimal)))
|
||||
DtDatos.Columns.Add(New DataColumn("IVA", GetType(Decimal)))
|
||||
DtDatos.Columns.Add(New DataColumn("IEPS", GetType(Decimal)))
|
||||
DtDatos.Columns.Add(New DataColumn("Descuento", GetType(Decimal)))
|
||||
DtDatos.Columns.Add(New DataColumn("Total", GetType(Decimal)))
|
||||
'If datos.API_SALI Then
|
||||
' Dim Xml = New System.Xml.XmlDocument()
|
||||
' Xml.LoadXml(datos.XML)
|
||||
' Dim ArchivoXML = $"{context.Server.MapPath("/")}/Temp/{DateTime.UtcNow.Ticks}_{datos.Factura.Serie}-{datos.Factura.Folio}.xml"
|
||||
' Xml.Save(ArchivoXML)
|
||||
|
||||
Dim DtImpuestos As New DataTable
|
||||
DtImpuestos.Columns.Add(New DataColumn("Impuesto", GetType(String)))
|
||||
DtImpuestos.Columns.Add(New DataColumn("Tipo", GetType(String)))
|
||||
DtImpuestos.Columns.Add(New DataColumn("Base", GetType(Decimal)))
|
||||
DtImpuestos.Columns.Add(New DataColumn("TipoFactor", GetType(String)))
|
||||
DtImpuestos.Columns.Add(New DataColumn("TasaOCuota", GetType(String)))
|
||||
DtImpuestos.Columns.Add(New DataColumn("Importe", GetType(Decimal)))
|
||||
' ImprimirbytesPDF(context, GenerarCFDi(context, ArchivoXML, datos), "Factura")
|
||||
'Else
|
||||
' Formato = ModExtensiones.DirectorioBaseEmpresas + "Empresas/Grales/ReporteAPI.rdlc"
|
||||
|
||||
For Each PS In datos.Factura.ListaProductos
|
||||
Dim Row = DtDatos.NewRow()
|
||||
Row("Cantidad") = PS.Cantidad
|
||||
Row("UnidadMedida") = PS.UnidadMedida
|
||||
Row("PS") = PS.CodigoPS
|
||||
Row("PU") = PS.PU
|
||||
Row("IVA") = PS.IVA
|
||||
Row("IEPS") = PS.IEPS
|
||||
Row("Descuento") = PS.Descuento
|
||||
Row("Total") = (PS.Cantidad * PS.PU) + PS.IVA + PS.IEPS
|
||||
' Parametros.Add(New ReportParameter("Empresa", datos.Empresa.Empresa))
|
||||
' Parametros.Add(New ReportParameter("RFC", datos.Empresa.RFC))
|
||||
' Parametros.Add(New ReportParameter("DomicilioExpedicion", datos.Empresa.DomicilioFiscal))
|
||||
' Parametros.Add(New ReportParameter("Serie", datos.Factura.Serie))
|
||||
' Parametros.Add(New ReportParameter("Folio", datos.Factura.Folio))
|
||||
' Parametros.Add(New ReportParameter("Fecha", datos.Factura.Fecha))
|
||||
' Parametros.Add(New ReportParameter("ClienteNombre", datos.Cliente.NombreComercial))
|
||||
' Parametros.Add(New ReportParameter("ClienteDireccion", datos.Cliente.Calle + " Colonia " + datos.Cliente.Colonia + " " + datos.Cliente.Ciudad + ", " + datos.Cliente.Estado))
|
||||
' Parametros.Add(New ReportParameter("ClienteLugar", datos.Cliente.Ciudad))
|
||||
' Parametros.Add(New ReportParameter("ClienteRFC", datos.Cliente.RFC))
|
||||
' Parametros.Add(New ReportParameter("ImporteLetra", datos.Factura.Total.Texto2Letras()))
|
||||
' Parametros.Add(New ReportParameter("FormaPago", datos.Factura.FormaPago))
|
||||
' Parametros.Add(New ReportParameter("MetodoPago", datos.Factura.MetodoPago))
|
||||
' Parametros.Add(New ReportParameter("SelloCFDI", datos.Timbrado.SelloCFDI))
|
||||
' Parametros.Add(New ReportParameter("SelloSAT", datos.Timbrado.SelloSAT))
|
||||
' Parametros.Add(New ReportParameter("CadenaOriginal", datos.Timbrado.CadenaOriginal))
|
||||
' Parametros.Add(New ReportParameter("FolioFiscal", datos.Factura.UUID))
|
||||
' Parametros.Add(New ReportParameter("SerieCertificadoSAT", datos.Timbrado.SerieCertificadoSAT))
|
||||
' Parametros.Add(New ReportParameter("FechaCertificado", datos.Timbrado.FechaCertificado))
|
||||
' Parametros.Add(New ReportParameter("CertificadoContribuyente", datos.Timbrado.CertificadoContribuyente))
|
||||
' Parametros.Add(New ReportParameter("UsoCFDI", datos.Factura.UsoCFDI))
|
||||
' Parametros.Add(New ReportParameter("Vencimiento", datos.Factura.FechaVencimiento))
|
||||
' Parametros.Add(New ReportParameter("SubTotal", datos.Factura.SubTotal))
|
||||
' Parametros.Add(New ReportParameter("Descuentos", datos.Factura.Descuentos))
|
||||
' Parametros.Add(New ReportParameter("IVA", datos.Factura.IVA))
|
||||
' Parametros.Add(New ReportParameter("IEPS", datos.Factura.IEPS))
|
||||
' Parametros.Add(New ReportParameter("Total", datos.Factura.Total))
|
||||
' Parametros.Add(New ReportParameter("QR", datos.Timbrado.QR))
|
||||
|
||||
DtDatos.Rows.Add(Row)
|
||||
Next
|
||||
' Dim DtDatos As New DataTable
|
||||
' DtDatos.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||
' DtDatos.Columns.Add(New DataColumn("UnidadMedida", GetType(String)))
|
||||
' DtDatos.Columns.Add(New DataColumn("PS", GetType(String)))
|
||||
' DtDatos.Columns.Add(New DataColumn("PU", GetType(Decimal)))
|
||||
' DtDatos.Columns.Add(New DataColumn("IVA", GetType(Decimal)))
|
||||
' DtDatos.Columns.Add(New DataColumn("IEPS", GetType(Decimal)))
|
||||
' DtDatos.Columns.Add(New DataColumn("Descuento", GetType(Decimal)))
|
||||
' DtDatos.Columns.Add(New DataColumn("Total", GetType(Decimal)))
|
||||
|
||||
Dim RowImpuesto = DtImpuestos.NewRow()
|
||||
RowImpuesto("Impuesto") = "IVA"
|
||||
RowImpuesto("Tipo") = "Traslado"
|
||||
RowImpuesto("Base") = datos.Factura.SubTotal
|
||||
RowImpuesto("TipoFactor") = "Tasa"
|
||||
RowImpuesto("TasaOCuota") = "16%"
|
||||
RowImpuesto("Importe") = datos.Factura.IVA
|
||||
' Dim DtImpuestos As New DataTable
|
||||
' DtImpuestos.Columns.Add(New DataColumn("Impuesto", GetType(String)))
|
||||
' DtImpuestos.Columns.Add(New DataColumn("Tipo", GetType(String)))
|
||||
' DtImpuestos.Columns.Add(New DataColumn("Base", GetType(Decimal)))
|
||||
' DtImpuestos.Columns.Add(New DataColumn("TipoFactor", GetType(String)))
|
||||
' DtImpuestos.Columns.Add(New DataColumn("TasaOCuota", GetType(String)))
|
||||
' DtImpuestos.Columns.Add(New DataColumn("Importe", GetType(Decimal)))
|
||||
|
||||
DtImpuestos.Rows.Add(RowImpuesto)
|
||||
' For Each PS In datos.Factura.ListaProductos
|
||||
' Dim Row = DtDatos.NewRow()
|
||||
' Row("Cantidad") = PS.Cantidad
|
||||
' Row("UnidadMedida") = PS.UnidadMedida
|
||||
' Row("PS") = PS.CodigoPS
|
||||
' Row("PU") = PS.PU
|
||||
' Row("IVA") = PS.IVA
|
||||
' Row("IEPS") = PS.IEPS
|
||||
' Row("Descuento") = PS.Descuento
|
||||
' Row("Total") = (PS.Cantidad * PS.PU) + PS.IVA + PS.IEPS
|
||||
|
||||
ListaDS.Add(New ReportDataSource("DsProductos", DtDatos))
|
||||
ListaDS.Add(New ReportDataSource("DsImpuestos", DtImpuestos))
|
||||
' DtDatos.Rows.Add(Row)
|
||||
' Next
|
||||
|
||||
ImprimirbytesPDF(context, StreamPDF(context, Formato, ListaDS, Parametros), "Factura")
|
||||
' Dim RowImpuesto = DtImpuestos.NewRow()
|
||||
' RowImpuesto("Impuesto") = "IVA"
|
||||
' RowImpuesto("Tipo") = "Traslado"
|
||||
' RowImpuesto("Base") = datos.Factura.SubTotal
|
||||
' RowImpuesto("TipoFactor") = "Tasa"
|
||||
' RowImpuesto("TasaOCuota") = "16%"
|
||||
' RowImpuesto("Importe") = datos.Factura.IVA
|
||||
|
||||
' DtImpuestos.Rows.Add(RowImpuesto)
|
||||
|
||||
' ListaDS.Add(New ReportDataSource("DsProductos", DtDatos))
|
||||
' ListaDS.Add(New ReportDataSource("DsImpuestos", DtImpuestos))
|
||||
|
||||
' ImprimirbytesPDF(context, StreamPDF(context, Formato, ListaDS, Parametros), "Factura")
|
||||
'End If
|
||||
Else
|
||||
retorno = "no hay datossss"
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
retorno = ex.ToString()
|
||||
ex.GuardaLog(ex.ToString())
|
||||
context.Response.Write(retorno)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GenerarCFDi(ByVal context As HttpContext, RutaXml As String, datos As ParametroWS) As Byte()
|
||||
Dim bytes As Byte() = Nothing
|
||||
|
||||
Dim objxml As XmlSatCFDI = XmlSatCFDI.readXML(RutaXml)
|
||||
|
||||
Dim rutaReporte As String = "\Empresas\Grales\Formatos\FacturaSALI.rdlc"
|
||||
|
||||
Dim QR As ClbNegBICFDv3_2.ClsNegCBBGenerar = New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
Dim cQr As Byte() = QR.GenerarCBBBytes(objxml.emisor.Rfc, objxml.receptor.Rfc, objxml.comprobante.Total, objxml.complemento.UUID)
|
||||
Dim parametros As List(Of ReportParameter) = New List(Of ReportParameter)()
|
||||
parametros.Add(New ReportParameter("comprobante_Certificado", objxml.comprobante.Certificado))
|
||||
parametros.Add(New ReportParameter("comprobante_CondicionesDePago", objxml.comprobante.CondicionesDePago))
|
||||
parametros.Add(New ReportParameter("comprobante_Confirmacion", objxml.comprobante.Confirmacion))
|
||||
parametros.Add(New ReportParameter("comprobante_Fecha", objxml.comprobante.Fecha))
|
||||
parametros.Add(New ReportParameter("comprobante_Serie", objxml.comprobante.Serie))
|
||||
parametros.Add(New ReportParameter("comprobante_Folio", objxml.comprobante.Folio))
|
||||
parametros.Add(New ReportParameter("comprobante_Descuento", objxml.comprobante.Descuento.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_SubTotal", objxml.comprobante.SubTotal.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_Total", objxml.comprobante.Total.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_Version", objxml.comprobante.Version))
|
||||
parametros.Add(New ReportParameter("comprobante_TipoDeComprobante", objxml.comprobante.TipoDeComprobanteTexto))
|
||||
parametros.Add(New ReportParameter("comprobante_FormaPago", objxml.comprobante.FormaPagoTexto))
|
||||
parametros.Add(New ReportParameter("comprobante_LugarExpedicion", objxml.comprobante.LugarExpedicion))
|
||||
parametros.Add(New ReportParameter("comprobante_NoCertificado", objxml.comprobante.NoCertificado))
|
||||
parametros.Add(New ReportParameter("comprobante_Sello", objxml.comprobante.Sello))
|
||||
parametros.Add(New ReportParameter("comprobante_Moneda", objxml.comprobante.Moneda))
|
||||
parametros.Add(New ReportParameter("comprobante_TipoCambio", objxml.comprobante.TipoCambio.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_MetodoPago", objxml.comprobante.MetodoPagoTexto))
|
||||
parametros.Add(New ReportParameter("emisor_Rfc", objxml.emisor.Rfc))
|
||||
parametros.Add(New ReportParameter("emisor_Nombre", objxml.emisor.Nombre))
|
||||
parametros.Add(New ReportParameter("emisor_RegimenFiscal", objxml.emisor.RegimenFiscalTexto))
|
||||
parametros.Add(New ReportParameter("emisor_Direccion", datos.Empresa.DomicilioFiscal))
|
||||
parametros.Add(New ReportParameter("receptor_Rfc", objxml.receptor.Rfc))
|
||||
parametros.Add(New ReportParameter("receptor_Nombre", objxml.receptor.Nombre))
|
||||
parametros.Add(New ReportParameter("receptor_NumRegIdTrib", objxml.receptor.NumRegIdTrib))
|
||||
parametros.Add(New ReportParameter("receptor_ResidenciaFiscal", objxml.receptor.ResidenciaFiscal))
|
||||
parametros.Add(New ReportParameter("receptor_UsoCFDI", objxml.receptor.UsoCFDITexto))
|
||||
parametros.Add(New ReportParameter("complemento_FechaTimbrado", objxml.complemento.FechaTimbrado))
|
||||
parametros.Add(New ReportParameter("complemento_NoCertificadoSAT", objxml.complemento.NoCertificadoSAT))
|
||||
parametros.Add(New ReportParameter("complemento_RfcProvCertif", objxml.complemento.RfcProvCertif))
|
||||
parametros.Add(New ReportParameter("complemento_SelloCFD", objxml.complemento.SelloCFD))
|
||||
parametros.Add(New ReportParameter("complemento_SelloSAT", objxml.complemento.SelloSAT))
|
||||
parametros.Add(New ReportParameter("complemento_UUID", objxml.complemento.UUID))
|
||||
parametros.Add(New ReportParameter("complemento_CadenaOriginal", objxml.complemento.CadenaOriginal))
|
||||
|
||||
|
||||
Dim ds As New List(Of ReportDataSource)
|
||||
|
||||
Dim rdsTotales As ReportDataSource = New ReportDataSource()
|
||||
Dim ltotales As List(Of utilValores) = New List(Of utilValores)()
|
||||
ltotales.Add(New utilValores("Subtotal", objxml.comprobante.SubTotal.ToString("N2")))
|
||||
|
||||
If objxml.comprobante.Descuento > 0 Then
|
||||
ltotales.Add(New utilValores("Descuento", objxml.comprobante.Descuento.ToString("N2")))
|
||||
End If
|
||||
|
||||
For Each item As CFDIImpuesto In objxml.Impuestos
|
||||
|
||||
If item.Importe > 0 Then
|
||||
Dim TasaOCuota As Decimal = 0
|
||||
Decimal.TryParse(item.TasaOCuota, TasaOCuota)
|
||||
ltotales.Add(New utilValores($"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}", item.Importe.ToString("N2")))
|
||||
End If
|
||||
Next
|
||||
|
||||
ltotales.Add(New utilValores("Total", objxml.comprobante.Total.ToString("N2")))
|
||||
rdsTotales.Name = "dsTotales"
|
||||
rdsTotales.Value = ltotales
|
||||
ds.Add(rdsTotales)
|
||||
|
||||
Dim rds2 As ReportDataSource = New ReportDataSource()
|
||||
Dim limagenes As List(Of utilImage) = New List(Of utilImage)()
|
||||
limagenes.Add(New utilImage(cQr))
|
||||
rds2.Name = "dsImagenes"
|
||||
rds2.Value = limagenes
|
||||
ds.Add(rds2)
|
||||
|
||||
Dim rdsrelacionados As ReportDataSource = New ReportDataSource()
|
||||
rdsrelacionados.Name = "dsRelacionados"
|
||||
rdsrelacionados.Value = objxml.cFDIRelacionados
|
||||
ds.Add(rdsrelacionados)
|
||||
|
||||
Dim rds1 As ReportDataSource = New ReportDataSource()
|
||||
rds1.Name = "dsConceptos"
|
||||
rds1.Value = objxml.GetConceptosforpdf()
|
||||
|
||||
ds.Add(rds1)
|
||||
|
||||
Try
|
||||
bytes = StreamPDF(context, rutaReporte, ds, parametros)
|
||||
|
||||
System.IO.File.Delete(RutaXml)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Return bytes
|
||||
|
||||
End Function
|
||||
|
||||
Public Function StreamPDF(ByVal context As HttpContext, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing) As Byte()
|
||||
'limpio ReportViwer
|
||||
Dim sw As New System.Diagnostics.Stopwatch()
|
||||
@@ -150,8 +269,8 @@ Public Class GenerarPDFFactura : Implements IHttpHandler
|
||||
|
||||
If EsProduccion Then
|
||||
|
||||
Dim CveUsuario As Integer = 0
|
||||
Dim CveEmpresa As Integer = 0
|
||||
Dim CveUsuario As Integer = -1
|
||||
Dim CveEmpresa As Integer = -1
|
||||
|
||||
Dim wsreport As New WSRDLC.WebServiceSoapClient
|
||||
Dim params As New List(Of WSRDLC.ReportParameter)
|
||||
@@ -175,6 +294,7 @@ Public Class GenerarPDFFactura : Implements IHttpHandler
|
||||
Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
|
||||
wsreport = Nothing
|
||||
params = Nothing
|
||||
|
||||
Else
|
||||
If IsNothing(MR) Then MR = New ReportViewer
|
||||
Try
|
||||
@@ -364,8 +484,10 @@ Public Class GenerarPDFFactura : Implements IHttpHandler
|
||||
Public Property Factura As FacturaWS
|
||||
Public Property Cliente As ClienteWS
|
||||
Public Property Empresa As EmpresaWS
|
||||
Public Property Timbrado As DatosSATWS
|
||||
Public Property API_SALI As Boolean
|
||||
Public Property Timbrado As DatosSATWS
|
||||
|
||||
Public Property XML As String
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -467,11 +467,12 @@
|
||||
<asp:DropDownList ID="DdlTipoCompra" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoCompra_SelectedIndexChanged" CssClass="form-control input-sm input-small">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Gasto" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Gasto con almacen" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Fijo" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Costo Indirecto" Value="2" Enabled="false"></asp:ListItem>
|
||||
<asp:ListItem Text="Almacen" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Almacen con costo indirecto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Flete" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Costo Indirecto" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Importación" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="NC Con Productos" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Apoyo Logístico" Value="9"></asp:ListItem>
|
||||
@@ -650,7 +651,7 @@
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpReclasificarSubProyecto">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width:100%">
|
||||
<div class="col-md-1" style="width: 100%">
|
||||
<asp:DropDownList ID="DdlAsignarProyecto" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -658,7 +659,7 @@
|
||||
<%--<br runat="server" id="brProyectoSubProyecto" style="display:none"/>--%>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width:100%">
|
||||
<div class="col-md-1" style="width: 100%">
|
||||
<asp:DropDownList ID="DdlAsignaSubProyecto" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlAsignaSubProyecto_SelectedIndexChanged" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -1232,7 +1233,7 @@
|
||||
<asp:Literal ID="LtlPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Serie" Visible="false" >
|
||||
<asp:TemplateField HeaderText="Serie" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSerie" Text='<%# Eval("Serie") %>' runat="server" />
|
||||
<asp:TextBox ID="TxtSerie" AutoPostBack="false" Text='<%# Eval("Serie") %>' Visible="false" runat="server" />
|
||||
@@ -2559,11 +2560,11 @@
|
||||
<asp:UpdatePanel ID="UpFacturar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary " runat="server" ValidationGroup="GrpGuardar" data-toggle="confirmation" data-popout="true" data-original-title="<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar el documento con la información actual?</center>" data-btn-ok-label="si" Text="Registrar Compra" />
|
||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary " runat="server" ValidationGroup="GrpGuardar" data-toggle="confirmation" data-popout="true" data-original-title="<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar el documento con la información actual?</center>" data-btn-ok-label="si" Text="Registrar Compra" />
|
||||
<asp:Button ID="BtnActualizar" CssClass="btn btn-success" runat="server" Text="Actualizar Compra" ValidationGroup="GrpGuardar" Visible="False" />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<asp:Button ID="BtnEliminarCompra" CssClass="btn btn-danger" Visible="False" runat="server" Text="Eliminar Compra" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar la compra?" data-btn-ok-label="si" />
|
||||
<br />
|
||||
<br />
|
||||
@@ -3303,7 +3304,7 @@
|
||||
<div class="modal-content" style="width: 600px;">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
|
||||
<h3 class="modal-title" runat="server" id="headeralias">Vincular Fletes y Servicios </h3>
|
||||
<h3 class="modal-title" runat="server" id="headeralias">Vincular Costo indirectos </h3>
|
||||
|
||||
|
||||
|
||||
@@ -3895,9 +3896,9 @@
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div style="border: 1px solid black; width: 85%;">
|
||||
<div style="border: 1px solid black; width: 85%;margin-left: 7.5%;display:block">
|
||||
<asp:Panel ID="PnlContado" runat="server" Visible="False">
|
||||
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" RepeatColumns="3">
|
||||
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" Style="margin:auto" AutoPostBack="True" RepeatColumns="3">
|
||||
<asp:ListItem Value="1" Selected="True">Bancos</asp:ListItem>
|
||||
<asp:ListItem Value="3">Créditos</asp:ListItem>
|
||||
<asp:ListItem Value="5">Acreedores</asp:ListItem>
|
||||
@@ -3909,14 +3910,14 @@
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div style="text-align:center">
|
||||
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text="Multiple Crédito" />
|
||||
</div>
|
||||
|
||||
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text="Multiple Crédito" />
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div runat="server" id="DivReembolso">
|
||||
<asp:Panel ID="Panel1" CssClass="chequesie text-small" runat="server" Width="470px" Visible="true">
|
||||
<asp:Panel ID="Panel1" CssClass="text-small" runat="server" Width="100%" Visible="true" BorderStyle="Solid" BorderColor="#6A92AD" BorderWidth="2px">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="width: 90%; margin-left: 5%; margin-right: 5%; text-align: left">
|
||||
@@ -3926,15 +3927,16 @@
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="width: 90%; margin-left: 5%; margin-right: 5%; text-align: left">
|
||||
<asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100%" />
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero de Reembolsoxx''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero de Reembolsoxx''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="chequesie2">
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="width: 90%; margin-left: 4%; margin-right: 5%; text-align: left">
|
||||
<label>Caja Chica:</label>
|
||||
<asp:Label runat="server" ID="LblCheq">Caja Chica:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivPersonalReembolso" runat="server" visible="false" class="row">
|
||||
@@ -3952,6 +3954,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<table>
|
||||
@@ -4204,8 +4207,8 @@
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<RowStyle CssClass="TextoAlterno" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />--%>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />--%>
|
||||
</asp:GridView>
|
||||
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="0" />
|
||||
</ContentTemplate>
|
||||
@@ -4260,7 +4263,7 @@
|
||||
|
||||
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVCreditoDetalle" runat="server" ControlToValidate="DdlCreditoDetalle" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Crédito''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="RFVCreditoDetalle" runat="server" ControlToValidate="DdlCreditoDetalle" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Crédito''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECreditoDetalle" runat="server" HighlightCssClass="vco" TargetControlID="RFVCreditoDetalle" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2986,10 +2986,17 @@ Partial Class Compras_Compras
|
||||
'ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2)") 'solo muestra tipo material y herramientas
|
||||
'ddlAlmacen.DataBind()
|
||||
|
||||
ddlAlmacenAdd.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2,7,14,19)") 'solo muestra tipo material y herramientas
|
||||
ddlAlmacenAdd.DataBind()
|
||||
Dim DtAlmacenes = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2,7,14,19)")
|
||||
|
||||
DdlAlmacenDevolucion.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2,7,14,19)") 'solo muestra tipo material y herramientas
|
||||
If DdlTipoCompra.SelectedValue = "10" Then
|
||||
ddlAlmacenAdd.DataSource = DtAlmacenes.FiltraParametros("Modalidad = 0")
|
||||
DdlAlmacenDevolucion.DataSource = DtAlmacenes.FiltraParametros("Modalidad = 0")
|
||||
Else
|
||||
ddlAlmacenAdd.DataSource = DtAlmacenes
|
||||
DdlAlmacenDevolucion.DataSource = DtAlmacenes
|
||||
End If
|
||||
|
||||
ddlAlmacenAdd.DataBind()
|
||||
DdlAlmacenDevolucion.DataBind()
|
||||
|
||||
DdlAlmacenDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -4452,11 +4459,11 @@ Partial Class Compras_Compras
|
||||
If OCVinculada And Not (CveImportacion > 0 Or CveFlete > 0) Then
|
||||
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 140, 141) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 140, 141) And Not (CveImportacion > 0 Or CveFlete > 0) Then 'se comento, RMF. 2020.08.19, no le hallo sentido
|
||||
CveConceptoContableAlmacen = 205
|
||||
End If
|
||||
Else
|
||||
CveConceptoContableAlmacen = 225
|
||||
CveConceptoContableAlmacen = 225
|
||||
End If
|
||||
|
||||
'Condiciones para los casos de facturas que son en 0 pero que se utiliza el almacen
|
||||
@@ -6340,7 +6347,6 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
|
||||
|
||||
Dim Insertado205 As Boolean = False
|
||||
|
||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||
@@ -6385,15 +6391,42 @@ Partial Class Compras_Compras
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
|
||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
'SI LA COMPRA ES DE TIPO GASTO CON ALMACEN DEBE REGISTRAR MOVIMIENTO
|
||||
If DdlTipoCompra.SelectedValue <> "10" Then
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
End If
|
||||
DT.AcceptChanges()
|
||||
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
|
||||
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
|
||||
'SI ES GASTO CON ALMACEN
|
||||
If DdlTipoCompra.SelectedValue = "10" Then
|
||||
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen", "CveClasificacion", "CveSubProyecto"}).Rows
|
||||
|
||||
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"CveAlmacen = {RowDetalle("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {RowDetalle("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If importeMN <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual,
|
||||
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
|
||||
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal
|
||||
@@ -6411,9 +6444,17 @@ Partial Class Compras_Compras
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95
|
||||
If DdlTipoCompra.SelectedValue = "10" Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=False) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
' si agrego en almacen, ya no se ocupa algun concepto puente
|
||||
AgregaMercanciaInventario = False
|
||||
End If
|
||||
@@ -6448,7 +6489,15 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Dim UsaComplementariaFleteImportaciones As Boolean = False
|
||||
|
||||
'DEBE METER EL CONCEPTO DE COMPRAS SI EL TIPO ES GASTO CON ALMACEN
|
||||
If DdlTipoCompra.SelectedValue = "10" Then
|
||||
ConceptoContabilizacion = 6
|
||||
End If
|
||||
|
||||
Select Case ConceptoContabilizacion
|
||||
Case 6
|
||||
importeMovimiento = TmpDT.SUMD(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"))
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'TIENE QUE TENER EL IMPORTEMN IGUAL AL IMPORTEMOVIMIENTO PORQUE NO TOMA EN CUENTA SI UN PRODUCTO ES TIPO SERVICIO
|
||||
Case 176
|
||||
ConceptoContabilizacionME = 228
|
||||
ConceptoContabilizacionMEComp = 229
|
||||
@@ -6469,8 +6518,14 @@ Partial Class Compras_Compras
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'TIENE QUE TENER EL IMPORTEMN IGUAL AL IMPORTEMOVIMIENTO PORQUE NO TOMA EN CUENTA SI UN PRODUCTO ES TIPO SERVICIO
|
||||
End Select
|
||||
|
||||
If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
If ConceptoContabilizacion = 6 Then
|
||||
If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
||||
End If
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.GetRetCuenta(ConceptoContabilizacionME, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
@@ -6564,6 +6619,26 @@ Partial Class Compras_Compras
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
Case 6
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
|
||||
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto"}).Rows
|
||||
|
||||
If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If importeMN <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual,
|
||||
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
End Select
|
||||
'End If
|
||||
|
||||
@@ -6581,8 +6656,6 @@ Partial Class Compras_Compras
|
||||
|
||||
If RegistraConcepto225 Then
|
||||
|
||||
|
||||
|
||||
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 And ISNULL(CveTipoPS,0) = 2").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
@@ -6611,6 +6684,13 @@ Partial Class Compras_Compras
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||
If DdlTipoCompra.SelectedValue = "10" AndAlso ConceptoContabilizacionNC = 68 Then
|
||||
SeContabiliza = False
|
||||
IdCtaContable = 0
|
||||
CveCuenta = 0
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
@@ -6661,12 +6741,15 @@ Partial Class Compras_Compras
|
||||
DT = TmpDT.FiltraParametros("ISNULL(AplicaCostoIndirecto,0) <> 1")
|
||||
End If
|
||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
If DdlTipoCompra.SelectedValue <> "10" Then
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
End If
|
||||
|
||||
DT.AcceptChanges()
|
||||
DtAlmacenes.Dispose()
|
||||
|
||||
@@ -10097,12 +10180,14 @@ Partial Class Compras_Compras
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Then
|
||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
|
||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
If DdlTipoCompra.SelectedValue <> "10" Then
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
End If
|
||||
DT.AcceptChanges()
|
||||
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
|
||||
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
@@ -10117,9 +10202,18 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then
|
||||
Dim SeContabiliza As Boolean = True
|
||||
'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||
If DdlTipoCompra.SelectedValue = "10" Then
|
||||
SeContabiliza = False
|
||||
IdCtaContable = 0
|
||||
CveCuenta = 0
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -10174,12 +10268,15 @@ Partial Class Compras_Compras
|
||||
'GASTO
|
||||
DT = TmpDT.Copy
|
||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
If DdlTipoCompra.SelectedValue <> "10" Then
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
End If
|
||||
|
||||
DT.AcceptChanges()
|
||||
DtAlmacenes.Dispose()
|
||||
|
||||
@@ -11589,6 +11686,10 @@ Partial Class Compras_Compras
|
||||
StrAlmacenes = "CveTipoAlmacen IN (21)"
|
||||
End If
|
||||
|
||||
If DdlTipoCompra.SelectedValue.ToEntero = 10 Then
|
||||
StrAlmacenes = $"Modalidad = 0"
|
||||
End If
|
||||
|
||||
e.Row.FCDropDownList("ddlAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("ddlAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
e.Row.FCDropDownList("ddlAlmacen").DataBind()
|
||||
@@ -18715,7 +18816,12 @@ Partial Class Compras_Compras
|
||||
If CveCuenta = 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 68, Concepto, FechaMovimiento, Row("IdCtaContable").ToString.ToEntero, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveMovimientoAlmacen:=Row("CveMovimiento").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(TipoCambioActual = 1, 0, ImporteMovimiento), CveCuenta:=Row("CveCuenta").ToString.ToEntero) Then
|
||||
Dim SeContabiliza As Boolean = True
|
||||
'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||
If DdlTipoCompra.SelectedValue = "10" Then
|
||||
SeContabiliza = False
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 68, Concepto, FechaMovimiento, Row("IdCtaContable").ToString.ToEntero, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveMovimientoAlmacen:=Row("CveMovimiento").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(TipoCambioActual = 1, 0, ImporteMovimiento), CveCuenta:=Row("CveCuenta").ToString.ToEntero, Contabilizable:=SeContabiliza) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -19625,7 +19731,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub DdlTipoCompra_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlTipoCompra.SelectedValue.ToEntero = 9 Then 'Al seleccionar apoyo logístico se cargan los amancenes de devoculcion proveedor para dar entrada
|
||||
If DdlTipoCompra.SelectedValue.ToEntero.Contiene(9, 10) Then 'Al seleccionar apoyo logístico se cargan los amancenes de devoculcion proveedor para dar entrada
|
||||
CargaGvInv()
|
||||
End If
|
||||
|
||||
|
||||
@@ -140,16 +140,16 @@ Partial Class PopUpVerFactura
|
||||
'HttpContext.Current.Response.Flush()
|
||||
HttpContext.Current.Response.End()
|
||||
End If
|
||||
Archivo = Nothing
|
||||
|
||||
Archivo = Nothing
|
||||
|
||||
ElseIf Request("File") IsNot Nothing AndAlso Request("TipoDocto") IsNot Nothing AndAlso Request("TipoArchivo") IsNot Nothing Then
|
||||
Dim Path As String = "" ' String.Format("{0}Ventas\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("RFC"), Request("FileV"))
|
||||
|
||||
Select Case Request("TipoArchivo")
|
||||
Case "PDF"
|
||||
Path = String.Format("{0}PDF\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("TipoDocto"), Request("File"))
|
||||
Case "XML"
|
||||
Path = String.Format("{0}XML\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("TipoDocto"), Request("File"))
|
||||
Dim Path As String = "" ' String.Format("{0}Ventas\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("RFC"), Request("FileV"))
|
||||
|
||||
Select Case Request("TipoArchivo")
|
||||
Case "PDF"
|
||||
Path = String.Format("{0}PDF\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("TipoDocto"), Request("File"))
|
||||
Case "XML"
|
||||
Path = String.Format("{0}XML\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("TipoDocto"), Request("File"))
|
||||
End Select
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(Path)
|
||||
@@ -186,10 +186,10 @@ Partial Class PopUpVerFactura
|
||||
|
||||
If Request("REPORTE") IsNot Nothing Then
|
||||
CType(Session("DTPDF"), HtmlTable).ExportToPDF("Reporte")
|
||||
End If
|
||||
|
||||
'OPCIONES
|
||||
|
||||
End If
|
||||
|
||||
'OPCIONES
|
||||
|
||||
If Request("P") IsNot Nothing AndAlso Decripta((Request("P").ToString)) <> "" Then
|
||||
Dim UrlParametros As Hashtable = Parametros(Decripta((Request("P").ToString)))
|
||||
If UrlParametros("OP") IsNot Nothing AndAlso UrlParametros("OP").ToString <> "" Then
|
||||
@@ -199,10 +199,10 @@ Partial Class PopUpVerFactura
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "U S U A R I O - T O K E N"
|
||||
|
||||
|
||||
Private Function ValidaUsuarioSistema(CveEmpresa As Integer, Optional CveUsuario As Integer = 100) As Usuario
|
||||
|
||||
Dim UsuarioToken As Usuario = Nothing
|
||||
@@ -239,9 +239,9 @@ Partial Class PopUpVerFactura
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub SeleccionaReporte(UrlParametros As Hashtable)
|
||||
|
||||
'DESCARGA COMPROBANTE
|
||||
Private Sub SeleccionaReporte(UrlParametros As Hashtable)
|
||||
|
||||
'DESCARGA COMPROBANTE
|
||||
If UrlParametros("OP").ToString = "IEComprobante" Then
|
||||
DescargaComprobante(UrlParametros)
|
||||
End If
|
||||
@@ -473,10 +473,10 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
'IMPRIME ENTREGAS POR REALIZAR
|
||||
If UrlParametros("OP").ToString = "ENTREGAS" Then
|
||||
If UrlParametros("CVEASIGNACIONENTREGA") IsNot Nothing And UrlParametros("USUARIOENTREGA") IsNot Nothing Then
|
||||
ImprimeEntregasPorRealizar(UrlParametros("CVEASIGNACIONENTREGA").ToString.ToLong, UrlParametros("USUARIOENTREGA").ToString)
|
||||
End If
|
||||
If UrlParametros("OP").ToString = "ENTREGAS" Then
|
||||
If UrlParametros("CVEASIGNACIONENTREGA") IsNot Nothing And UrlParametros("USUARIOENTREGA") IsNot Nothing Then
|
||||
ImprimeEntregasPorRealizar(UrlParametros("CVEASIGNACIONENTREGA").ToString.ToLong, UrlParametros("USUARIOENTREGA").ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -493,10 +493,10 @@ Partial Class PopUpVerFactura
|
||||
URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
|
||||
Next
|
||||
Return URLParametros
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#Region "OP = CORT - IMPRIMIR CORTE"
|
||||
|
||||
|
||||
Private Sub ImprimeCorte(CveCorte As Integer, Formato As String)
|
||||
Dim ObjVenta As New ClsVentas
|
||||
Dim ObjPuntoVenta As New ClsPuntoVenta
|
||||
@@ -547,8 +547,8 @@ Partial Class PopUpVerFactura
|
||||
|
||||
#Region " OP = FACTURA - IMPRIME COMPRA"
|
||||
Private Sub DescargaComprobante(Parametros As Hashtable)
|
||||
If Parametros("COMPROBANTE") IsNot Nothing Then
|
||||
|
||||
If Parametros("COMPROBANTE") IsNot Nothing Then
|
||||
|
||||
Dim Path As String = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, Parametros("COMPROBANTE"))
|
||||
Dim Archivo As New System.IO.FileInfo(Path)
|
||||
|
||||
@@ -583,9 +583,9 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP DesXmlVIA- DESCARGAR XML DE VIATICOS"
|
||||
Private Sub DescargaXMLViaticos(Parametros As Hashtable)
|
||||
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
|
||||
@@ -605,10 +605,10 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP DesXmlNom- DESCARGAR XML DE UTILIDADES"
|
||||
Private Sub DescargaXMLUtilidades(Parametros As Hashtable)
|
||||
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
|
||||
@@ -628,9 +628,9 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'CONG' - IMPRIME GASTO DE CONTRATO"
|
||||
Private Sub ImprimeGastoContrato(CveContrato As Integer, CveContratoGasto As Integer)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -672,10 +672,10 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/ContratoGasto.rdlc", dt, params, $"{Nombre}-Gastos", Formato:="PDF")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "OP = 'CIC' - IMPRIME FORMATO CICOVISA"
|
||||
Private Sub ImprimeFormatoCICOVISA(CveVenta As Integer)
|
||||
If CveVenta > 0 Then
|
||||
@@ -712,10 +712,10 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'CARPO' - IMPRIME FORMATO CARTA PORTE"
|
||||
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
||||
If CveMovimiento > 0 Then
|
||||
@@ -840,12 +840,12 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'DesXmlTra' - IMPRIME XML TRASLADO"
|
||||
|
||||
|
||||
Private Sub DescargaXMLTraslado(Parametros As Hashtable)
|
||||
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
||||
@@ -864,12 +864,12 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'DesPdfTra' - IMPRIME PDF TRASLADO"
|
||||
|
||||
|
||||
Private Sub DescargaPDFTraslado(Parametros As Hashtable)
|
||||
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
||||
@@ -888,10 +888,10 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " OP = 'Vta,Fact' - IMPRIME PDF VENTAS"
|
||||
Private Sub DescargaFacturaVenta(Parametros As Hashtable)
|
||||
If Parametros("CVEVENTA") IsNot Nothing AndAlso Parametros("CVEVENTA").ToString.ToEntero > 0 Then
|
||||
@@ -1198,11 +1198,11 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
||||
|
||||
|
||||
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer)
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
@@ -1444,9 +1444,9 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Concepto", ConceptoFormato))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0, dr("SerieFolio").ToString, "")))
|
||||
|
||||
@@ -1456,8 +1456,8 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 72 Then
|
||||
params.Add(New ReportParameter("CveTipoAlmacen", CveTipoAlmacen.ToString()))
|
||||
If UsuarioActual.CveEmpresa = 72 Then
|
||||
params.Add(New ReportParameter("CveTipoAlmacen", CveTipoAlmacen.ToString()))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
@@ -3198,10 +3198,10 @@ Partial Class PopUpVerFactura
|
||||
ImprimirbytesPDF(reporte, $"OrdenCompra-{Folio.ToString}")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'VAL' - IMPRIME PDF VAL"
|
||||
Private Sub GenerarPDFVale(CveVale As Integer)
|
||||
|
||||
@@ -3231,9 +3231,9 @@ Partial Class PopUpVerFactura
|
||||
'End If
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'OS' - IMPRIMIR PDF OS"
|
||||
Private Sub GenerarPDFOS(CveOS As Integer)
|
||||
Dim ObjOS As New ClsOS()
|
||||
@@ -3352,9 +3352,9 @@ Partial Class PopUpVerFactura
|
||||
TmpDTMaterialesOS.Columns.Add("Clasificacion", GetType(String))
|
||||
TmpDTMaterialesOS.Columns.Add("PS", GetType(String))
|
||||
TmpDTMaterialesOS.Columns.Add("UM", GetType(String))
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'OI' - Crear Archivo "
|
||||
Private Sub CrearArchivo(Archivo As String)
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
@@ -3363,11 +3363,11 @@ Partial Class PopUpVerFactura
|
||||
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path) '-- if the file exists on the server
|
||||
|
||||
DescargarArchivo(file)
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'Contratos' - Crear Archivo "
|
||||
Private Sub CrearArchivoContratos(Archivo As String)
|
||||
|
||||
@@ -3375,11 +3375,11 @@ Partial Class PopUpVerFactura
|
||||
Dim file As System.IO.FileInfo = New System.IO.FileInfo(Archivo) '-- if the file exists on the server
|
||||
|
||||
DescargarArchivo(file)
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'OI' - Descargar Archivo "
|
||||
Private Sub DescargarArchivo(File As System.IO.FileInfo)
|
||||
If File.Exists Then 'set appropriate headers
|
||||
@@ -3409,11 +3409,11 @@ Partial Class PopUpVerFactura
|
||||
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
||||
|
||||
End If 'nothing in the URL as HTTP GET
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'AFR' - AF"
|
||||
|
||||
|
||||
Private Sub ImprimirPDFAFR(CveAFR As Integer, Tipo As Integer)
|
||||
Dim ObjAF As New ClsAF
|
||||
'Dim ObjSubProyecto As New ClsSubProyectos
|
||||
@@ -3600,9 +3600,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/ResguardoAF.rdlc", dtVC, params, NomArchivo)
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'POL' "
|
||||
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
|
||||
'Dim ObjConta As New ClsContabilidad
|
||||
@@ -3641,9 +3641,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
ObjPoliza.Dispose()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'CAN' - CANCELACION"
|
||||
Public Sub ImprimeCancelacion(CveVenta As Integer)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
@@ -3668,9 +3668,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'DC' - DEPOSITOS CAJA"
|
||||
Private Sub CargaDepositosCaja(CveIE As Integer, CuentaCaja As String, CuentaDeposito As String)
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DepositoCaja.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
@@ -3697,11 +3697,11 @@ Partial Class PopUpVerFactura
|
||||
|
||||
ObjIE.Dispose()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "I E C H E Q U E S"
|
||||
|
||||
|
||||
Private Sub ImprimirIE(CveIE As Integer, CveEmpresa As Integer)
|
||||
Dim CveTipoTransaccion = -1
|
||||
Dim ObjIE As New ClsBancos()
|
||||
@@ -3947,167 +3947,167 @@ Partial Class PopUpVerFactura
|
||||
|
||||
ObjIE.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimeMov(CveIE As Integer)
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim DtGvRH As New DataTable
|
||||
Dim DtComprobacion As New DataTable
|
||||
Dim ParamComprobacion As New DataTable
|
||||
|
||||
'Movimientos Relacionados de Comprobacion - Hijo
|
||||
If ObjIE.GetBancosIEMovimientosHijo(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
DtGvRH = ObjIE.DtResultados
|
||||
End If
|
||||
|
||||
If DtGvRH IsNot Nothing AndAlso DtGvRH.Rows.Count > 0 Then
|
||||
|
||||
If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
ParamComprobacion = ObjIE.DtResultados
|
||||
End If
|
||||
|
||||
Dim ObjMov As New ClsMovimientos
|
||||
For Each dr As DataRow In DtGvRH.Rows
|
||||
If ObjMov.GetPersonalCajaChica(UsuarioActual.CveEmpresa, dr("CveCompra").ToString.ToEntero) Then
|
||||
DtComprobacion.Merge(ObjMov.DtResultados.FiltraParametros("CveCompra =" + dr("CveCompra").ToString))
|
||||
End If
|
||||
Next
|
||||
ObjMov.Dispose()
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
If Archivo.Exists Then
|
||||
|
||||
If UsuarioActual.CveEmpresa = 72 Then
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||
params.Add(New ReportParameter("CveCajaChica", DtComprobacion.Rows(0)("CveCajaChica").ToString))
|
||||
params.Add(New ReportParameter("CveFyE", "0")) '
|
||||
|
||||
params.Add(New ReportParameter("cuentaRetiro", "Cuenta retiro: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
|
||||
params.Add(New ReportParameter("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
|
||||
params.Add(New ReportParameter("observaciones", "Observaciones: " & ParamComprobacion.Rows(0)("Observaciones").ToString))
|
||||
params.Add(New ReportParameter("folio", ParamComprobacion.Rows(0)("Folio").ToString))
|
||||
params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("importe", ParamComprobacion.Rows(0)("Importe").ToString))
|
||||
params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").ToString))
|
||||
|
||||
ImprimirPDF(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta), DtComprobacion, params, String.Format("IE{0}", CveIE), Formato:="PDF")
|
||||
Else
|
||||
params.Add(New ReportParameter("Numero", "")) '
|
||||
params.Add(New ReportParameter("Anio", DtComprobacion.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString))
|
||||
params.Add(New ReportParameter("Nombre", DtComprobacion.MAX("SubProyecto")))
|
||||
params.Add(New ReportParameter("Fecha", Now.Date.ToString))
|
||||
params.Add(New ReportParameter("Elaboro", ""))
|
||||
params.Add(New ReportParameter("Autorizo", ""))
|
||||
params.Add(New ReportParameter("ElaboroPuesto", ""))
|
||||
params.Add(New ReportParameter("AutorizoPuesto", ""))
|
||||
ImprimirPDF(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta), DtComprobacion.FiltraParametros("CveCompra > 0"), params, String.Format("IE{0}", CveIE), RDSName:="DsCompras")
|
||||
End If
|
||||
Else
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||
|
||||
params.Add(New ReportParameter("cuentaRetiro", "Cuenta retiro: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
|
||||
params.Add(New ReportParameter("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
|
||||
params.Add(New ReportParameter("observaciones", "Observaciones: " & ParamComprobacion.Rows(0)("Observaciones").ToString))
|
||||
params.Add(New ReportParameter("folio", ParamComprobacion.Rows(0)("Folio").ToString))
|
||||
params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString))
|
||||
params.Add(New ReportParameter("importe", ParamComprobacion.Rows(0)("Importe").ToString))
|
||||
params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").ToString))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRembolsosComprobaciones.rdlc", DtComprobacion, params, String.Format("IE{0}", CveIE), Formato:="PDF")
|
||||
End If
|
||||
Else
|
||||
If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Dim reportDataSetsList As New List(Of ReportDataSource)
|
||||
|
||||
Dim dtMovs As New DataTable
|
||||
Dim Mov As New ClsContabilidad
|
||||
If Mov.GetPrePolizasDetalle(-1, CveIE) Then
|
||||
|
||||
dtMovs = Mov.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,312)")
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
'CONVIERTO A PESOS CUANDO SE PAGA CON PESOS FACTURAS DE DOLARES
|
||||
For Each Dr As DataRow In dtMovs.Rows
|
||||
Dr("Importe") = Dr("ImporteMN").ToString.ToDecimal
|
||||
Dr("ImporteNC") = Dr("ImporteNC").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Total") = Dr("Total").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Saldo") = Dr("Saldo").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
Mov.Dispose()
|
||||
Dim rds = New ReportDataSource("DataSet1", dtMovs)
|
||||
reportDataSetsList.Add(rds)
|
||||
|
||||
Dim dtnc As New DataTable
|
||||
Dim ObjCompra As New ClsCompras()
|
||||
If ObjCompra.GetComprasNotasCredito(-1, -1, CveIE) Then
|
||||
dtnc = ObjCompra.DtResultados
|
||||
End If
|
||||
ObjCompra.Dispose()
|
||||
Dim rds2 = New ReportDataSource("DataSet2", dtnc)
|
||||
reportDataSetsList.Add(rds2)
|
||||
dtnc.Dispose()
|
||||
|
||||
Dim paramList As New List(Of ReportParameter)
|
||||
With paramList
|
||||
'Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
.Add(New ReportParameter("Cuenta", ObjIE.NumCuenta, True))
|
||||
.Add(New ReportParameter("Fecha", ObjIE.FechaDocumento.ToString("dd/MM/yyyy"), True))
|
||||
.Add(New ReportParameter("Paguese", ObjIE.PagueseA.Trim, True))
|
||||
.Add(New ReportParameter("Importe", ObjIE.Importe.ToString, True))
|
||||
.Add(New ReportParameter("Observaciones", ObjIE.Observaciones, True))
|
||||
.Add(New ReportParameter("Folio", ObjIE.Folio, True))
|
||||
.Add(New ReportParameter("MonedaAbreviatura", ObjIE.MonedaAbreviatura, True))
|
||||
|
||||
|
||||
If Imagen.Exists Then
|
||||
.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
End With
|
||||
dtMovs.Dispose()
|
||||
|
||||
ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, ObjIE.Folio, "PDF")
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
DtGvRH.Dispose()
|
||||
DtComprobacion.Dispose()
|
||||
ParamComprobacion.Dispose()
|
||||
|
||||
ObjIE.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimeMov(CveIE As Integer)
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim DtGvRH As New DataTable
|
||||
Dim DtComprobacion As New DataTable
|
||||
Dim ParamComprobacion As New DataTable
|
||||
|
||||
'Movimientos Relacionados de Comprobacion - Hijo
|
||||
If ObjIE.GetBancosIEMovimientosHijo(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
DtGvRH = ObjIE.DtResultados
|
||||
End If
|
||||
|
||||
If DtGvRH IsNot Nothing AndAlso DtGvRH.Rows.Count > 0 Then
|
||||
|
||||
If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
ParamComprobacion = ObjIE.DtResultados
|
||||
End If
|
||||
|
||||
Dim ObjMov As New ClsMovimientos
|
||||
For Each dr As DataRow In DtGvRH.Rows
|
||||
If ObjMov.GetPersonalCajaChica(UsuarioActual.CveEmpresa, dr("CveCompra").ToString.ToEntero) Then
|
||||
DtComprobacion.Merge(ObjMov.DtResultados.FiltraParametros("CveCompra =" + dr("CveCompra").ToString))
|
||||
End If
|
||||
Next
|
||||
ObjMov.Dispose()
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
If Archivo.Exists Then
|
||||
|
||||
If UsuarioActual.CveEmpresa = 72 Then
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||
params.Add(New ReportParameter("CveCajaChica", DtComprobacion.Rows(0)("CveCajaChica").ToString))
|
||||
params.Add(New ReportParameter("CveFyE", "0")) '
|
||||
|
||||
params.Add(New ReportParameter("cuentaRetiro", "Cuenta retiro: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
|
||||
params.Add(New ReportParameter("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
|
||||
params.Add(New ReportParameter("observaciones", "Observaciones: " & ParamComprobacion.Rows(0)("Observaciones").ToString))
|
||||
params.Add(New ReportParameter("folio", ParamComprobacion.Rows(0)("Folio").ToString))
|
||||
params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("importe", ParamComprobacion.Rows(0)("Importe").ToString))
|
||||
params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").ToString))
|
||||
|
||||
ImprimirPDF(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta), DtComprobacion, params, String.Format("IE{0}", CveIE), Formato:="PDF")
|
||||
Else
|
||||
params.Add(New ReportParameter("Numero", "")) '
|
||||
params.Add(New ReportParameter("Anio", DtComprobacion.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString))
|
||||
params.Add(New ReportParameter("Nombre", DtComprobacion.MAX("SubProyecto")))
|
||||
params.Add(New ReportParameter("Fecha", Now.Date.ToString))
|
||||
params.Add(New ReportParameter("Elaboro", ""))
|
||||
params.Add(New ReportParameter("Autorizo", ""))
|
||||
params.Add(New ReportParameter("ElaboroPuesto", ""))
|
||||
params.Add(New ReportParameter("AutorizoPuesto", ""))
|
||||
ImprimirPDF(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta), DtComprobacion.FiltraParametros("CveCompra > 0"), params, String.Format("IE{0}", CveIE), RDSName:="DsCompras")
|
||||
End If
|
||||
Else
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||
|
||||
params.Add(New ReportParameter("cuentaRetiro", "Cuenta retiro: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
|
||||
params.Add(New ReportParameter("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
|
||||
params.Add(New ReportParameter("observaciones", "Observaciones: " & ParamComprobacion.Rows(0)("Observaciones").ToString))
|
||||
params.Add(New ReportParameter("folio", ParamComprobacion.Rows(0)("Folio").ToString))
|
||||
params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString))
|
||||
params.Add(New ReportParameter("importe", ParamComprobacion.Rows(0)("Importe").ToString))
|
||||
params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").ToString))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRembolsosComprobaciones.rdlc", DtComprobacion, params, String.Format("IE{0}", CveIE), Formato:="PDF")
|
||||
End If
|
||||
Else
|
||||
If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Dim reportDataSetsList As New List(Of ReportDataSource)
|
||||
|
||||
Dim dtMovs As New DataTable
|
||||
Dim Mov As New ClsContabilidad
|
||||
If Mov.GetPrePolizasDetalle(-1, CveIE) Then
|
||||
|
||||
dtMovs = Mov.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,312)")
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
'CONVIERTO A PESOS CUANDO SE PAGA CON PESOS FACTURAS DE DOLARES
|
||||
For Each Dr As DataRow In dtMovs.Rows
|
||||
Dr("Importe") = Dr("ImporteMN").ToString.ToDecimal
|
||||
Dr("ImporteNC") = Dr("ImporteNC").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Total") = Dr("Total").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Dr("Saldo") = Dr("Saldo").ToString.ToDecimal * Dr("TC").ToString.ToDecimal
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
Mov.Dispose()
|
||||
Dim rds = New ReportDataSource("DataSet1", dtMovs)
|
||||
reportDataSetsList.Add(rds)
|
||||
|
||||
Dim dtnc As New DataTable
|
||||
Dim ObjCompra As New ClsCompras()
|
||||
If ObjCompra.GetComprasNotasCredito(-1, -1, CveIE) Then
|
||||
dtnc = ObjCompra.DtResultados
|
||||
End If
|
||||
ObjCompra.Dispose()
|
||||
Dim rds2 = New ReportDataSource("DataSet2", dtnc)
|
||||
reportDataSetsList.Add(rds2)
|
||||
dtnc.Dispose()
|
||||
|
||||
Dim paramList As New List(Of ReportParameter)
|
||||
With paramList
|
||||
'Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
.Add(New ReportParameter("Cuenta", ObjIE.NumCuenta, True))
|
||||
.Add(New ReportParameter("Fecha", ObjIE.FechaDocumento.ToString("dd/MM/yyyy"), True))
|
||||
.Add(New ReportParameter("Paguese", ObjIE.PagueseA.Trim, True))
|
||||
.Add(New ReportParameter("Importe", ObjIE.Importe.ToString, True))
|
||||
.Add(New ReportParameter("Observaciones", ObjIE.Observaciones, True))
|
||||
.Add(New ReportParameter("Folio", ObjIE.Folio, True))
|
||||
.Add(New ReportParameter("MonedaAbreviatura", ObjIE.MonedaAbreviatura, True))
|
||||
|
||||
|
||||
If Imagen.Exists Then
|
||||
.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
End With
|
||||
dtMovs.Dispose()
|
||||
|
||||
ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, ObjIE.Folio, "PDF")
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
DtGvRH.Dispose()
|
||||
DtComprobacion.Dispose()
|
||||
ParamComprobacion.Dispose()
|
||||
|
||||
ObjIE.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -4117,12 +4117,12 @@ Partial Class PopUpVerFactura
|
||||
|
||||
PDFReciboDePagos(CveVenta, CveIE, -1)
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = VTA - PyME"
|
||||
|
||||
' 04/05/2018 - Pruebas de impresion de factura PyME
|
||||
|
||||
' 04/05/2018 - Pruebas de impresion de factura PyME
|
||||
Private Sub GeneraPDFVtaPyMe(Venta As Modelos.Factura, Optional Formato As String = "PDF")
|
||||
Dim Directorio1 As String = String.Format("{0}Empresas\{1}\Formatos\Factura.mrt", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
|
||||
Dim File As FileInfo = New FileInfo(Directorio1)
|
||||
@@ -4180,26 +4180,26 @@ Partial Class PopUpVerFactura
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "OP = ENTREGAS - Entregas por realizar"
|
||||
Public Sub ImprimeEntregasPorRealizar(CveAsignacionEntrega As Long, pUsuarioEntregar As String)
|
||||
Dim Correcto As Boolean = False
|
||||
Dim DtPaqueteriasGuias As DataTable = Nothing
|
||||
Dim ObjGeneral As New ClsGenerales
|
||||
If ObjGeneral.GetEntregasPorRealizar(UsuarioActual.CveEmpresa, CveAsignacionEntrega) Then
|
||||
DtPaqueteriasGuias = ObjGeneral.DtResultados
|
||||
Correcto = True
|
||||
End If
|
||||
ObjGeneral.Dispose()
|
||||
If Correcto Then
|
||||
Dim RepParams As New List(Of ReportParameter)
|
||||
RepParams.Add(New ReportParameter("Fecha", DateTime.Today.ToString()))
|
||||
RepParams.Add(New ReportParameter("AsignadoA", pUsuarioEntregar))
|
||||
RepParams.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF", RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
#Region "OP = ENTREGAS - Entregas por realizar"
|
||||
Public Sub ImprimeEntregasPorRealizar(CveAsignacionEntrega As Long, pUsuarioEntregar As String)
|
||||
Dim Correcto As Boolean = False
|
||||
Dim DtPaqueteriasGuias As DataTable = Nothing
|
||||
Dim ObjGeneral As New ClsGenerales
|
||||
If ObjGeneral.GetEntregasPorRealizar(UsuarioActual.CveEmpresa, CveAsignacionEntrega) Then
|
||||
DtPaqueteriasGuias = ObjGeneral.DtResultados
|
||||
Correcto = True
|
||||
End If
|
||||
ObjGeneral.Dispose()
|
||||
If Correcto Then
|
||||
Dim RepParams As New List(Of ReportParameter)
|
||||
RepParams.Add(New ReportParameter("Fecha", DateTime.Today.ToString()))
|
||||
RepParams.Add(New ReportParameter("AsignadoA", pUsuarioEntregar))
|
||||
RepParams.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF", RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -604,11 +604,11 @@
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="portlet light smmallpadding bordered ">
|
||||
<div class="portlet light smmallpadding bordered " style="display:none!important">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Representastes Legales</span>
|
||||
<span class="caption-subject bold uppercase">Representantes Legales</span>
|
||||
|
||||
</div>
|
||||
<div class="actions">
|
||||
|
||||
@@ -6112,7 +6112,7 @@ Partial Class Compras_Proveedores
|
||||
Dim ObjFolios As New ClsGralFolios()
|
||||
Dim CveSubProyectoMatriz As Integer
|
||||
|
||||
If ObjSub.GetSubProyectos() Then
|
||||
If ObjSub.GetSubProyectos(UsuarioActual.CveEmpresa) Then
|
||||
CveSubProyectoMatriz = ObjSub.DtResultados.FiltroPrimeroValor("CveSubProyecto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND TipoSucursal = 1").ToEntero
|
||||
End If
|
||||
|
||||
|
||||
@@ -94,7 +94,32 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 "><asp:Label runat="server" id="LblSubProyectoFiltro" ></asp:Label></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Perfil:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlTipoContratoFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="TipoContrato" DataValueField="CveTipoContrato">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -125,7 +150,10 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="SubProyecto">
|
||||
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275">
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -212,8 +212,20 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Todos"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiltro, Nothing, LblSubProyectoFiltro)
|
||||
|
||||
Dim ObjProveedor As New ClsCompProveedores
|
||||
|
||||
If ObjProveedor.GetTiposContratos(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlTipoContratoFiltro.DataSource = ObjProveedor.DtResultados
|
||||
End If
|
||||
ObjProveedor.Dispose()
|
||||
|
||||
DdlTipoContratoFiltro.DataBind()
|
||||
DdlTipoContratoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -247,7 +259,7 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
|
||||
Dim obEDoc As New ClsEdocumentacion
|
||||
|
||||
If obEDoc.DocumentacionElectronicaAuditoriaGet(CveProveedor, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, 3, DdlEstatus.SelectedValue.ToEntero) Then
|
||||
If obEDoc.DocumentacionElectronicaAuditoriaGet(CveProveedor, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, 3, DdlEstatus.SelectedValue.ToEntero, DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero) Then
|
||||
GvDocumentos.DataSource = obEDoc.DtResultados
|
||||
Else
|
||||
GvDocumentos.DataSource = Nothing
|
||||
@@ -269,6 +281,10 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Protected Sub GvDocumentos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentos.RowDataBound
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.FCLabel("LblSubProyecto").Text = LblSubProyectoFiltro.Text
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString
|
||||
|
||||
@@ -27,34 +27,36 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoContrato,CveDocumentacion" EmptyDataText="No se encontraron datos" Width="100%"
|
||||
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Tipo Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LrlTipoContrato" runat="server" Text='<%# Eval("TipoContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Documento" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDocumento" runat="server" Text='<%# Eval("Documentacion") %>' ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Requerido" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="ChkRequerido" Checked= '<%# Eval("Requerido") %>' AutoPostBack="true" OnCheckedChanged="ChkRequerido_CheckedChanged" CssClass="md-checksd" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoContrato,CveDocumentacion" EmptyDataText="No se encontraron datos" Width="100%"
|
||||
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
</div>
|
||||
<asp:TemplateField HeaderText="Tipo Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LrlTipoContrato" runat="server" Text='<%# Eval("TipoContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Documento" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDocumento" runat="server" Text='<%# Eval("Documentacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Requerido" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="ChkRequerido" Checked='<%# Eval("Requerido") %>' AutoPostBack="true" OnCheckedChanged="ChkRequerido_CheckedChanged" CssClass="md-checksd" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoContrato,TipoContrato,Estatus" EmptyDataText="No se encontraron Tipos de contrato" Width="100%"
|
||||
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Tipo Contrato">
|
||||
|
||||
@@ -16,22 +16,92 @@
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarContratoModal" data-toggle="tooltip" data-placement="left" title="Agregar Contrato " Text="<i class='fa fa-plus'></i> Agregar Contrato"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPDF" />
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" OnClick="btConsultar_Click" /></td>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-1 "><asp:Label runat="server" id="LblSubProyectoFiltro" ></asp:Label></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Proveedor:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlProveedorFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" >
|
||||
</asp:DropDownList >
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Tipo Contrato:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlTipoContratoFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="TipoContrato" DataValueField="CveTipoContrato">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 ">Estatus:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100%" >
|
||||
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1" >Vigente</asp:ListItem>
|
||||
<asp:ListItem Value="2" >Rescindido</asp:ListItem>
|
||||
<asp:ListItem Value="3" >Suspendido</asp:ListItem>
|
||||
<asp:ListItem Value="4" >Terminado</asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveContrato,Contrato,CveProveedor,NombreComercial,CveSubProyecto,CveTipoContrato,CveRepresentanteLegal,FechaInicio, FechaFin,Estatus" EmptyDataText="No se encontraron contratos" Width="100%"
|
||||
ToolTip="Listado Contratos" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveContrato,Contrato,CveProveedor,NombreComercial,CveSubProyecto,CveTipoContrato,CveRepresentanteLegal,FechaInicio, FechaFin,Estatus"
|
||||
EmptyDataText="No se encontraron contratos" Width="100%" OnRowDataBound="GvDatos_RowDataBound"
|
||||
ToolTip="Listado Contratos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left">
|
||||
@@ -40,7 +110,10 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Sub Proyecto">
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -121,7 +194,7 @@
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width:500px!important">
|
||||
<label for="DdlProveedores" >Proveedor:</label>
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" Onselectedindexchange="DdlProveedores_selectedindexchange" ></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" Onselectedindexchange="DdlProveedores_selectedindexchange" ></ADS:Dropdownlost>
|
||||
|
||||
<i></i>
|
||||
|
||||
@@ -137,7 +210,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlSubProyecto">Sub Proyecto:</label><br />
|
||||
<asp:Label runat="server" ID="LblSubProyecto" for="DdlSubProyecto">Sub Proyecto:</asp:Label><br />
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="500px" AutoPostBack="True">
|
||||
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -147,7 +220,7 @@
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlSubProyecto">Representante Legal:</label><br />
|
||||
<label for="DDlRePresentanteLegal">Representante Legal:</label><br />
|
||||
<asp:DropDownList ID="DDlRePresentanteLegal" CssClass="form-control input-sm select2me" runat="server" DataTextField="RepresentanteLegal" DataValueField="CveRepresentanteLegal" Width="500px" >
|
||||
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -157,11 +230,17 @@
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2" for="<%= TxtFechaInicio.ClientID.ToString()%>">Fecha Inicio:</label>
|
||||
<div class=" input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="margin-right: 10px!important">
|
||||
<div class="row" style="vertical-align:bottom!important">
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td style="vertical-align:bottom!important;text-align:center!important">
|
||||
<label style="width:100px!important">Fecha Inicio:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class=" input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="margin-right: 10px!important">
|
||||
<asp:TextBox ID="TxtFechaInicio" Style="margin-top: 10px" Width="100" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 0px;">
|
||||
@@ -172,14 +251,16 @@
|
||||
<asp:RequiredFieldValidator ID="RfvtxtFechaInicio" runat="server" ControlToValidate="txtFechaInicio" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardaContrato" ></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="RfvctxtFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RfvtxtFechaInicio" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2" for="<%= TxtFechaFin.ClientID.ToString()%>">Fecha Fin:</label>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
|
||||
|
||||
|
||||
|
||||
<td style="vertical-align:bottom!important;text-align:center!important" > <label style="width:100px!important">Fecha Fin:</label></td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaFin" Width="100" Style="margin-top: 10px" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 0px;">
|
||||
@@ -191,9 +272,27 @@
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardaContrato" ></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CXRfvTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaFin" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<%-- <div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -202,7 +301,7 @@
|
||||
|
||||
|
||||
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
|
||||
@@ -243,7 +342,7 @@
|
||||
|
||||
<br />
|
||||
|
||||
<asp:GridView ID="GvRepresentante" runat="server" AutoGenerateColumns="False" DataKeyNames="CveRepresentanteLegal" EmptyDataText="No se encontraron Representantes" Width="100%"
|
||||
<asp:GridView ID="GvRepresentante" runat="server" AutoGenerateColumns="False" DataKeyNames="CveRepresentanteLegal,CveProveedor" EmptyDataText="No se encontraron Representantes" Width="100%"
|
||||
ToolTip="Listado de representantes" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Proveedores_Contratos
|
||||
Inherits ClsPaginas
|
||||
@@ -20,11 +21,22 @@ Partial Class Proveedores_Contratos
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Property DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -35,8 +47,9 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.GetContrato(-1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.GetContrato(-1, DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlProveedorFiltro.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjProv.DtResultados
|
||||
DtDatos = ObjProv.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
@@ -50,18 +63,24 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
Private Sub CargaCombos()
|
||||
'CargaProveedores
|
||||
|
||||
|
||||
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Todos"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'DdlSubProyecto.Items.Clear()
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
'DdlSubProyecto.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiltro, Nothing, LblSubProyectoFiltro)
|
||||
|
||||
DdlTipoContrato.Items.Clear()
|
||||
|
||||
Dim ObjProveedor As New ClsCompProveedores
|
||||
@@ -69,15 +88,26 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
If ObjProveedor.GetTiposContratos(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlTipoContrato.DataSource = ObjProveedor.DtResultados
|
||||
DdlTipoContratoFiltro.DataSource = ObjProveedor.DtResultados
|
||||
End If
|
||||
|
||||
If ObjProveedor.GetContratoProvedores(UsuarioActual.CveEmpresa) Then
|
||||
DdlProveedorFiltro.DataSource = ObjProveedor.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
ObjProveedor.Dispose()
|
||||
|
||||
DdlTipoContrato.DataBind()
|
||||
DdlTipoContratoFiltro.DataBind()
|
||||
DdlProveedorFiltro.DataBind()
|
||||
|
||||
DdlTipoContrato.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
CargaRepresentantes()
|
||||
DdlTipoContratoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlProveedorFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -96,6 +126,10 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
DdlTipoContrato.SelectedValueExist("-1")
|
||||
DdlSubProyecto.SelectedValueExist("-1")
|
||||
|
||||
|
||||
DDlRePresentanteLegal.Items.Clear()
|
||||
DDlRePresentanteLegal.Items.Add(New ListItem("Seleccione uno", "-1"))
|
||||
DDlRePresentanteLegal.SelectedValueExist("-1")
|
||||
|
||||
TxtFechaInicio.Text = ""
|
||||
@@ -104,6 +138,11 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
BtnAgregarModalContrato.Text = "Agregar"
|
||||
|
||||
CheckActiveSection.Visible = False
|
||||
ChkEstatus.Enabled = True
|
||||
|
||||
|
||||
|
||||
UpModalContrato.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarContrato"))
|
||||
|
||||
@@ -119,8 +158,13 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
DdlProveedores.txtValue.Value = GvRow.DataKey("CveProveedor")
|
||||
DdlProveedores.txtText.Value = GvRow.DataKey("NombreComercial")
|
||||
|
||||
DdlTipoContrato.SelectedValueExist(GvRow.DataKey("CveTipoContrato"))
|
||||
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
|
||||
|
||||
CargaRepresentantes(GvRow.DataKey("CveProveedor").ToEntero)
|
||||
|
||||
DDlRePresentanteLegal.SelectedValueExist(GvRow.DataKey("CveRepresentanteLegal"))
|
||||
|
||||
TxtFechaInicio.Text = GvRow.DataKey("FechaInicio").ToString.ToDate().ToString("dd/MM/yyyy")
|
||||
@@ -128,9 +172,12 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
|
||||
|
||||
|
||||
BtnAgregarModalContrato.Text = "Actualizar"
|
||||
|
||||
CheckActiveSection.Visible = True
|
||||
|
||||
|
||||
|
||||
UpModalContrato.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarContrato"))
|
||||
@@ -183,10 +230,6 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
|
||||
@@ -221,25 +264,32 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
Protected Sub BtnAgregarRepresentante_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim CveProveedor As Integer = DdlProveedores.txtValue.Value.ToEntero
|
||||
|
||||
If CveProveedor <= 0 Then
|
||||
Alert("Debe de seleccionar un proveedor", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.AddRePresentanteLegal(TxtRepresentanteLegal.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.AddRePresentanteLegal(TxtRepresentanteLegal.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedor) Then
|
||||
Alert("Se agrego representante correctamente.")
|
||||
TxtRepresentanteLegal.Text = ""
|
||||
End If
|
||||
|
||||
ObjProv.Dispose()
|
||||
|
||||
CargaRepresentantes()
|
||||
CargaRepresentantes(CveProveedor)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaRepresentantes()
|
||||
Private Sub CargaRepresentantes(CveProveedor As Integer)
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
|
||||
If ObjProv.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa, CveProveedor) Then
|
||||
GvRepresentante.DataSource = ObjProv.DtResultados
|
||||
DDlRePresentanteLegal.DataSource = ObjProv.DtResultados
|
||||
Else
|
||||
@@ -263,6 +313,7 @@ Partial Class Proveedores_Contratos
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveRepresentanteLegal As Integer = GvRow.DataKey("CveRepresentanteLegal").ToEntero
|
||||
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.RemoveRePresentanteLegal(CveRepresentanteLegal, UsuarioActual.CveEmpresa) Then
|
||||
@@ -271,7 +322,49 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
ObjProv.Dispose()
|
||||
|
||||
CargaRepresentantes()
|
||||
CargaRepresentantes(CveProveedor)
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlProveedores_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
Dim CveProveedor As Integer = DdlProveedores.txtValue.Value.ToEntero
|
||||
CargaRepresentantes(CveProveedor)
|
||||
End Sub
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.FCLabel("LblSubProyecto").Text = LblSubProyectoFiltro.Text
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click
|
||||
Imprimir("PDF")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
Imprimir("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub Imprimir(Formato As String)
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
Dim Filtro As String = String.Format("<b>{0}: </b>{1}   <b>Proveedor: </b>{2}   <b>Tipo Contrato: </b>{3}", LblSubProyectoFiltro.Text, DdlSubProyectoFiltro.SelectedItem.Text, DdlProveedorFiltro.SelectedItem.Text, DdlTipoContratoFiltro.SelectedItem.Text)
|
||||
params.Add(New ReportParameter("Filtro", Filtro))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepContratosGen.rdlc", DtDatos, params, "Reporte de Contratos", Formato)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -2289,7 +2289,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Comprador: </Value>
|
||||
<Value>Asignado a: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro Light</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
|
||||
@@ -52,10 +52,10 @@
|
||||
<Width>4.42895cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.2021cm</Width>
|
||||
<Width>3.06732cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.36938cm</Width>
|
||||
<Width>3.6031cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.89562cm</Width>
|
||||
@@ -156,7 +156,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha Ven.</Value>
|
||||
<Value>Fecha Vencimiento.</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
@@ -191,7 +191,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Movto.</Value>
|
||||
<Value>Cheque.</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
@@ -226,14 +226,14 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Abono</Value>
|
||||
<Value>Abonado</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
@@ -250,47 +250,14 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<ColSpan>2</ColSpan>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox21">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox21</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>Silver</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>Silver</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell />
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<Height>0.46771cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -303,7 +270,8 @@
|
||||
<TextRun>
|
||||
<Value>= IIF( IsNothing(Fields!CveVenta.Value) , (Fields!Banco.Value & " - " & Fields!NumCuenta.Value),Fields!SerieFolio.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -336,7 +304,8 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Fecha.Value</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -372,7 +341,8 @@
|
||||
<TextRun>
|
||||
<Value>= IIF( IsNothing(Fields!CveVenta.Value), Fields!FechaDocumento.Value,Fields!FechaVencimiento.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -408,7 +378,8 @@
|
||||
<TextRun>
|
||||
<Value>= IIF( IsNothing(Fields!CveVenta.Value) , Fields!FolioCobro.Value,"")</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -441,7 +412,8 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!ImporteAbonado.Value</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
<Format>'$'#,0.00;('$'#,0.00)</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -478,7 +450,8 @@
|
||||
<TextRun>
|
||||
<Value>=IIF(Fields!CveVenta.Value > 0,Fields!MonedaVenta.Value, Fields!MonedaIE.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -527,8 +500,8 @@
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>1.00112cm</Top>
|
||||
<Left>0.12912cm</Left>
|
||||
<Height>1.2cm</Height>
|
||||
<Width>19.74272cm</Width>
|
||||
<Height>1.06771cm</Height>
|
||||
<Width>19.84166cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -209,7 +209,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>SubProyecto</Value>
|
||||
<Value>=Parameters!SubProyectoHeader.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -1485,6 +1485,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="SubProyectoHeader">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<Language>es-MX</Language>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
|
||||
@@ -208,6 +208,10 @@
|
||||
<asp:RequiredFieldValidator ID="RfvPaqueteriaGuiaTipo" runat="server" ControlToValidate="DdlPaqueteriaGuiaTipo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Documento''</b> es necesario." ValidationGroup="GrpCrearGuia"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcePaqueteriaGuiaTipo" runat="server" HighlightCssClass="vco" TargetControlID="RfvPaqueteriaGuiaTipo" Width="220px" PopupPosition="Left"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td runat="server" id="tdLblPolizaSeguro" class="text-right" align="left" valign="top" style="width: 140px; padding-top: 4px;"><b>Poliza de Seguro:</b></td>
|
||||
<td runat="server" id="tdTxtPolizaSeguro" align="left" valign="top" style="width: 200px;">
|
||||
<asp:TextBox runat="server" ID="TxtPolizaSeguro" CssClass="form-control" Width="200px" Height="30px" Style="padding: 0px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr></tr>
|
||||
|
||||
@@ -181,6 +181,10 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
if (CveVenta > 0 || CveOC > 0 || CveMovimiento > 0 || CveCompra > 0)
|
||||
{
|
||||
CargaGuiasVinculadas();
|
||||
if(CveVenta > 0)
|
||||
{
|
||||
CondicionesVenta();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -381,7 +385,10 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
String Observaciones = TxtObservaciones.Text;
|
||||
Boolean ImplicaCosto = ChkImplicaCosto.Checked;
|
||||
|
||||
int CvePaqueteriaGuia = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, CvePaqueteriaGuiaTipo,CveEstatus, CveSucursal, Fecha, Rastreo, Guia, NoCajas, Peso, Dimensiones, FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ImplicaCosto);
|
||||
string PolizaSeguro = (tdLblPolizaSeguro.Visible) ? TxtPolizaSeguro.Text : "-1";
|
||||
|
||||
int CvePaqueteriaGuia = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, CvePaqueteriaGuiaTipo,CveEstatus, CveSucursal, Fecha, Rastreo, Guia, NoCajas, Peso, Dimensiones,
|
||||
FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ImplicaCosto,PolizaSeguro: PolizaSeguro);
|
||||
|
||||
if (CvePaqueteriaGuia > 0)
|
||||
{
|
||||
@@ -853,4 +860,21 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void CondicionesVenta()
|
||||
{
|
||||
|
||||
ClsVentas ObjVenta = new ClsVentas();
|
||||
if (ObjVenta.GetVentaDetalle(CveVenta))
|
||||
{
|
||||
DataTable VentasDetalle = ObjVenta.DtResultados;
|
||||
if (VentasDetalle.Rows.Count > 0)
|
||||
{
|
||||
double Total = VentasDetalle.SUM("Total");
|
||||
bool Mostrar = (Total >= 100000.00);
|
||||
tdLblPolizaSeguro.Visible = Mostrar;
|
||||
tdTxtPolizaSeguro.Visible = Mostrar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -190,7 +190,7 @@
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CvePaqueteriaGuia, CveSubProyecto, SubProyecto, CveAgrupador, TipoAgrupador, Folio, CvePaqueteria, Paqueteria, Liga, CveEstatus, Estatus, Rastreo, Guia, NumCajas, Peso, Dimensiones, Fecha, FechaEstimada, CveUsuario, CveEmpresa, FechaIng, Observaciones, ImplicaCosto, CvePaqueteriaGuiaTipo,EsEntregaInterna"
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CvePaqueteriaGuia, CveSubProyecto, SubProyecto, CveAgrupador, TipoAgrupador, Folio, CvePaqueteria, Paqueteria, Liga, CveEstatus, Estatus, Rastreo, Guia, NumCajas, Peso, Dimensiones, Fecha, FechaEstimada, CveUsuario, CveEmpresa, FechaIng, Observaciones, ImplicaCosto, CvePaqueteriaGuiaTipo,EsEntregaInterna,PolizaSeguro"
|
||||
AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros con los filtros especificados" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" GridLines="None"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
@@ -208,6 +208,7 @@
|
||||
<asp:BoundField DataField="Guia" HeaderText="Guía" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField DataField="Rastreo" HeaderText="Rastreo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PolizaSeguro" HeaderText="Póliza de seguro" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" ItemStyle-Width="4%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="FechaEstimada" HeaderText="Fecha Est." ItemStyle-Width="4%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha Ing" ItemStyle-Width="4%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
@@ -2025,7 +2025,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlConcepto.Items.Insert(0, New ListItem("Entrada Almacen ", "2"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 72 AndAlso CveTipoAlmacen.Contiene(14, 19) AndAlso UsuarioActual.CveUsuario = 2185 Then
|
||||
If UsuarioActual.CveEmpresa = 72 AndAlso CveTipoAlmacen.Contiene(12, 14, 19) 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"))
|
||||
|
||||
@@ -2444,7 +2444,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Else
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, EsInterno:=EsInterno, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero()) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=-3, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, EsInterno:=EsInterno, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero()) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de entrada")
|
||||
Exit For
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
Costo Indirecto
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -3,6 +3,8 @@ Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Compras_Fletes
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -402,6 +404,30 @@ Partial Class Compras_Fletes
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Fletes.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
If Archivo.Exists Then
|
||||
Dim ImporteGrid As Double = DtCompras.SUM("SubTotal")
|
||||
Dim ImporteStr As String = LbOCImporte.Text.Split(" "c)(0)
|
||||
Dim ImporteData As Double = ImporteStr.ToDouble()
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Folio", LblFolio.Text))
|
||||
params.Add(New ReportParameter("Descripcion", TxtDescripcion.Text))
|
||||
params.Add(New ReportParameter("Fecha", TxtFecha.Text))
|
||||
params.Add(New ReportParameter("Modalidad", If(DdlModalidad.SelectedValue = "-1", "Por Orden de Compra", "Factura de Compra")))
|
||||
params.Add(New ReportParameter("Proveedor", LbOCProveedor.Text))
|
||||
params.Add(New ReportParameter("FolioModalidad", HLOCFolio.Text))
|
||||
params.Add(New ReportParameter("Importe", (ImporteGrid + ImporteData).ToString()))
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Fletes.rdlc", DtCompras, params, String.Format("Costo Indirecto - {0}", LblFolio.Text), RDSName:="DataSet1")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -458,13 +458,17 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
''' </summary>
|
||||
''' <param name="CveSubProyecto"></param>
|
||||
''' <param name="CveTiposAlmacen">Parametro sin espacios y separado por comas ["1,2,3,21"]</param>
|
||||
Private Sub CargaAlmacenes(CveSubProyecto As Integer, Optional CveTiposAlmacen As String = "")
|
||||
Private Sub CargaAlmacenes(CveSubProyecto As Integer, Optional CveTiposAlmacen As String = "", Optional CveTipoCompra As Integer = -1)
|
||||
Dim StrAlmacenes As String = ""
|
||||
|
||||
If UsuarioActual.CveSubProyecto = 8804 Then 'AGS
|
||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,12,15")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
||||
Else
|
||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15,6")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15,6,14")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
||||
End If
|
||||
|
||||
If CveTipoCompra = 10 Then
|
||||
StrAlmacenes = $"Modalidad = 0"
|
||||
End If
|
||||
|
||||
DdlAlmacen.Items.Clear()
|
||||
@@ -854,13 +858,18 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero
|
||||
|
||||
If TipoMovimiento = 3 Then
|
||||
CargaAlmacenes(-1, "21,2")
|
||||
CargaAlmacenes(-1, "21,2", CveTipoCompra)
|
||||
End If
|
||||
|
||||
If CveTipoCompra = 9 Then
|
||||
CargaAlmacenes(-1, "21")
|
||||
CargaAlmacenes(-1, "21", CveTipoCompra)
|
||||
End If
|
||||
|
||||
If CveTipoCompra = 10 Then
|
||||
CargaAlmacenes(-1, CveTipoCompra:=CveTipoCompra)
|
||||
End If
|
||||
|
||||
|
||||
RecibidaCompleta = False
|
||||
|
||||
|
||||
@@ -879,9 +888,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CargaSoloUsados = True
|
||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
CargaAlmacenes(-1, "22,24")
|
||||
CargaAlmacenes(-1, "22,24", CveTipoCompra)
|
||||
Else
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22")
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||
End If
|
||||
Else
|
||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||
@@ -952,9 +961,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Else
|
||||
LtAdvertencia.Text = "La mercancía sera traspasada ha apartados"
|
||||
If CargaSoloUsados Then
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22")
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||
Else
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero)
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, CveTipoCompra:=CveTipoCompra)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -2113,7 +2122,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Next
|
||||
|
||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=EsContabilizable) Then
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
|
||||
Retorno = False
|
||||
End If
|
||||
|
||||
@@ -2734,7 +2744,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen", 74, TotalCosto, TotalCosto, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CvePrePoliza > 0 Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveSubProyecto:=CveSubProyecto, CveOC:=CveOCSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto, CveCuenta:=CveCuentaAlmacen, Contabilizable:=EsContabilizable) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveSubProyecto:=CveSubProyecto, CveOC:=CveOCSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto, CveCuenta:=CveCuentaAlmacen, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
|
||||
|
||||
'AGREGA POR CONCEPTO POR CVEOCDETALLE
|
||||
If CveOCSurtir > 0 Then
|
||||
@@ -2906,7 +2916,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen-NC", 74, TotalCosto, TotalCosto, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CvePrePoliza > 0 Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalNC, SerieFolio, CveConceptoContableNC, SerieFolio, Fecha, IdCtaContableNC, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalNC, Contabilizable:=EsContabilizable) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto * -1, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto * -1, CveCuenta:=CveCuentaAlmacen, Contabilizable:=EsContabilizable) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto * -1, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto * -1, CveCuenta:=CveCuentaAlmacen, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
|
||||
If DifCostoNC <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DifCostoNC * -1, SerieFolio, 69, SerieFolio, Fecha, IdCtaContableClasificacion, -1, CveClasificacion:=CveClasificacionDifCostoNC, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DifCostoNC * -1, CveCuenta:=CveCuentaClasificacion, Contabilizable:=EsContabilizable, CveSubProyecto:=CveSubProyecto) Then
|
||||
ErrorMovInv = True
|
||||
@@ -3198,7 +3208,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim PorcentajeRecepcionCompras As Decimal = TotalCosto / DtTempCompras.SUMD("SubTotalTC")
|
||||
Dim ConceptoPartida As String = String.Format("{0}- Inv#{1}", HLFolio.Text, InvFolio)
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto, InvFolio, 68, InvFolio, FechaMovto, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto, CveCuenta:=CveCuentaAlmacen) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto, InvFolio, 68, InvFolio, FechaMovto, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto, CveCuenta:=CveCuentaAlmacen, Contabilizable:=If(CveTipoCompra = 10, False, True)) Then
|
||||
'se recorren las facturas a descontar el recepción
|
||||
If DtTempCompras IsNot Nothing AndAlso DtTempCompras.Rows.Count > 0 Then
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<table class="table Widthall ">
|
||||
<tr>
|
||||
<td style="font-size: 14px; width: 20%; border-right: 3px solid white;"></td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 35%; border-right: 3px solid white;">Flete</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 35%; border-right: 3px solid white;">Facturas de Costo Indirecto</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 45%; border-right: 3px solid white;">Documento (OC/Compra)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -816,7 +816,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Case 23 ' Resguardo
|
||||
|
||||
'SALIDA ORIGEN
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 24, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservaciones.Text, CvePersonal:=CvePersonal, CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, CveCliente:=CveCliente, CveProveedor:=CveProveedor)
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 24, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservaciones.Text, CvePersonal:=CvePersonal, CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, CveCliente:=CveCliente, CveProveedor:=CveProveedor, Modulo:="ResgMat1")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoSalida <= 0 Then
|
||||
@@ -839,7 +839,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
Cont = 0
|
||||
If Not TieneError Then
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 2, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservaciones.Text, CvePersonal:=CvePersonal, CveMovimientoRelacionado:=CveMovimientoSalida, CveCliente:=CveCliente, CveProveedor:=CveProveedor)
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 2, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservaciones.Text, CvePersonal:=CvePersonal, CveMovimientoRelacionado:=CveMovimientoSalida, CveCliente:=CveCliente, CveProveedor:=CveProveedor, Modulo:="ResgMat2")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoEntrada <= 0 Then
|
||||
@@ -873,7 +873,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
|
||||
'SALIDA ORIGEN - RESGUARDO
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenLiberación, 3, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservacionesLiberacion.Text, CvePersonal:=CvePersonalLiberacion, CveAlmacenDestino:=DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, CveProveedor:=CveProveedorLiberacion, CveCliente:=CveClienteLiberacion, MovimientoFijo:=True)
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenLiberación, 3, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservacionesLiberacion.Text, CvePersonal:=CvePersonalLiberacion, CveAlmacenDestino:=DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, CveProveedor:=CveProveedorLiberacion, CveCliente:=CveClienteLiberacion, MovimientoFijo:=True, Modulo:="ResgMat3")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
Dim DiccionarioSecciones As New HybridDictionary
|
||||
|
||||
@@ -899,7 +899,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, 23, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservacionesLiberacion.Text, CvePersonal:=CvePersonalLiberacion, CveMovimientoRelacionado:=CveMovimientoSalida, CveProveedor:=CveProveedorLiberacion, CveCliente:=CveClienteLiberacion, MovimientoFijo:=True)
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, 23, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservacionesLiberacion.Text, CvePersonal:=CvePersonalLiberacion, CveMovimientoRelacionado:=CveMovimientoSalida, CveProveedor:=CveProveedorLiberacion, CveCliente:=CveClienteLiberacion, MovimientoFijo:=True, Modulo:="ResgMat4")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoEntrada <= 0 Then
|
||||
|
||||
@@ -1663,7 +1663,10 @@ Partial Class OC
|
||||
InicializaMovtosAlmacen()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And pCveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
|
||||
RowCotizaciones.Visible = True
|
||||
'LAS COTIZACIONES RAPIDAS SOLO DEBE APARECER SI EL PROVEEDOR ES DEDICADO
|
||||
If CveConfianzaProveedor = 1 Then
|
||||
RowCotizaciones.Visible = True
|
||||
End If
|
||||
UpIvas.Update()
|
||||
End If
|
||||
|
||||
@@ -1823,6 +1826,8 @@ Partial Class OC
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Seleccione"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
DdlProveedores.ddl.AutoPostBack = True
|
||||
|
||||
DdlProveedorCot.setEsWebService(True)
|
||||
DdlProveedorCot.Attributes.Add("data-metodo", "getproveedores")
|
||||
Else
|
||||
@@ -1830,6 +1835,7 @@ Partial Class OC
|
||||
DdlProveedores.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
|
||||
DdlProveedores.DataBind()
|
||||
DdlProveedores.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlProveedores.ddl.AutoPostBack = True
|
||||
|
||||
DdlProveedorCot.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
|
||||
DdlProveedorCot.DataBind()
|
||||
@@ -5352,6 +5358,14 @@ Partial Class OC
|
||||
|
||||
VerificaSiRequiereCotizacion()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And CveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
|
||||
'LAS COTIZACIONES RAPIDAS SOLO DEBE APARECER SI EL PROVEEDOR ES DEDICADO
|
||||
If CveConfianzaProveedor = 1 Then
|
||||
RowCotizaciones.Visible = True
|
||||
End If
|
||||
UpIvas.Update()
|
||||
End If
|
||||
|
||||
DdlProveedorSucursal.DataBind()
|
||||
UPProv.Update() : UPPEmp.Update()
|
||||
UPPDetalle.Update()
|
||||
@@ -5381,7 +5395,7 @@ Partial Class OC
|
||||
BtnGuardar.Text = "Guardar y Generar OC" : uppOpciones.Update()
|
||||
'RVProveedores.Enabled = True
|
||||
|
||||
If CveEmpresaActual.Contiene(13, 83, 72) Then
|
||||
If CveEmpresaActual.Contiene(13, 83, 72, 80) Then
|
||||
PnlUsuarioAsignado.Visible = True
|
||||
DdlUsuariosAsignado.DataSource = GlobalDTUsuarios(CveEmpresa:=CveEmpresaActual)
|
||||
DdlUsuariosAsignado.DataBind()
|
||||
|
||||
@@ -149,12 +149,12 @@
|
||||
<asp:ListItem Value="OC" Text="Ordenes Compra"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="colf-1 truncate">Proyecto:</label>
|
||||
<div class="colf-2">
|
||||
<asp:Label runat="server" ID="LblProyecto" class="colf-1 truncate">Proyecto:</asp:Label>
|
||||
<div runat="server" id="DivProyectos" class="colf-2">
|
||||
<asp:DropDownList ID="DdlProyectos" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="colf-1 truncate">SubProyecto:</label>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" class="colf-1 truncate">SubProyecto:</asp:Label>
|
||||
<div class="colf-2">
|
||||
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
</asp:DropDownList>
|
||||
@@ -181,11 +181,16 @@
|
||||
<asp:DropDownList ID="ddlUsuario" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="Nombre" DataValueField="CveUsuario">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="colf-1">Usuario Autorizó</label>
|
||||
<div class="colf-2">
|
||||
<asp:Label runat="server" ID="LblUsuarioAutorizo" Visible="false" class="colf-1">Usuario Autorizó</asp:Label>
|
||||
<div runat="server" id="DivUsuarioAutorizo" visible="false" class="colf-2">
|
||||
<asp:DropDownList ID="DdlUsuarioAutorizo" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="Nombre" DataValueField="CveUsuario">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="colf-1">Asignado a</label>
|
||||
<div class="colf-2">
|
||||
<asp:DropDownList ID="DdlUsuarioAsignado" runat="server" CssClass="form-control input-sm select2me" DataTextField="Nombre" DataValueField="CveUsuario" Style="width: 95px; height: 30px; display: inline-block;">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row rownomargin">
|
||||
@@ -241,6 +246,14 @@
|
||||
<div class="colf-3">
|
||||
<asp:CheckBox Text="No Completa" TextAlign="Left" CssClass="md-checksd2" ID="CheckNoCompleta" Visible="true" runat="server" />
|
||||
</div>
|
||||
<label class="colf-1">Entrega Directa</label>
|
||||
<div class="colf-2">
|
||||
<asp:DropDownList ID="DdlEntregaDirecta" runat="server" CssClass="form-control input-sm select2me" Style="width: 95px; height: 30px; display: inline-block;">
|
||||
<asp:ListItem selected="True" Text="Todos" Value="-1"/>
|
||||
<asp:ListItem Text="No" Value="0"/>
|
||||
<asp:ListItem Text="Si" Value="1"/>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -326,6 +339,8 @@
|
||||
<asp:BoundField DataField="NombreComercial" HeaderText="Proveedor" />
|
||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" />
|
||||
<asp:BoundField DataField="CodigoAF" HeaderText="AF" />
|
||||
<asp:BoundField DataField="FechaEstimadaEntrega" HeaderText="Fecha Entrega" DataFormatString = "{0:dd/MM/yyyy}"/>
|
||||
<asp:BoundField DataField="EntregaDirectaFormat" HeaderText="Entrega Directa" />
|
||||
<asp:BoundField DataField="Total" DataFormatString="{0:N2}" HeaderText="Total" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="MonAbreviatura" HeaderText="Mon" />
|
||||
</Columns>
|
||||
@@ -361,6 +376,8 @@
|
||||
<asp:BoundField DataField="NombreComercial" HeaderText="Proveedor" />
|
||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" />
|
||||
<asp:BoundField DataField="CodigoAF" HeaderText="AF" />
|
||||
<asp:BoundField DataField="FechaEstimadaEntrega" HeaderText="Fecha Entrega" DataFormatString = "{0:dd/MM/yyyy}"/>
|
||||
<asp:BoundField DataField="EntregaDirectaFormat" HeaderText="Entrega Directa" />
|
||||
<asp:BoundField DataField="Total" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px" />
|
||||
<asp:BoundField DataField="MonAbreviatura" HeaderText="Mon" />
|
||||
</Columns>
|
||||
@@ -398,6 +415,8 @@
|
||||
<asp:BoundField DataField="NombreComercial" HeaderText="Proveedor" />
|
||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" />
|
||||
<asp:BoundField DataField="CodigoAF" HeaderText="AF" />
|
||||
<asp:BoundField DataField="FechaEstimadaEntrega" HeaderText="Fecha Entrega" DataFormatString = "{0:dd/MM/yyyy}"/>
|
||||
<asp:BoundField DataField="EntregaDirectaFormat" HeaderText="Entrega Directa" />
|
||||
<asp:BoundField DataField="Total" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px" />
|
||||
<asp:BoundField DataField="MonAbreviatura" HeaderText="Mon" />
|
||||
</Columns>
|
||||
|
||||
@@ -53,7 +53,7 @@ Partial Class RepOC
|
||||
'End If
|
||||
|
||||
CargaProyectos()
|
||||
CargaSubProyectos()
|
||||
'CargaSubProyectos()
|
||||
CargaUsuarios()
|
||||
CargaProveedores()
|
||||
CargaEstatus()
|
||||
@@ -81,9 +81,13 @@ Partial Class RepOC
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaProyectos()
|
||||
DdlProyectos.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1))
|
||||
DdlProyectos.DataBind()
|
||||
DdlProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'DdlProyectos.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1))
|
||||
'DdlProyectos.DataBind()
|
||||
'DdlProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
CargarCentrosDeCosto(DdlProyectos, DdlSubProyectos, LblProyecto, LblSubProyecto)
|
||||
GvPorAtender.Columns(5).HeaderText = LblSubProyecto.Text
|
||||
GvPendientes.Columns(5).HeaderText = LblSubProyecto.Text
|
||||
DivProyectos.Visible = DdlProyectos.Visible
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaSubProyectos()
|
||||
@@ -97,6 +101,10 @@ Partial Class RepOC
|
||||
ddlUsuario.DataBind()
|
||||
ddlUsuario.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlUsuarioAsignado.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
DdlUsuarioAsignado.DataBind()
|
||||
DdlUsuarioAsignado.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlUsuarioAutorizo.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
DdlUsuarioAutorizo.DataBind()
|
||||
DdlUsuarioAutorizo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
@@ -187,8 +195,8 @@ Partial Class RepOC
|
||||
|
||||
Dim OC As New ClsOC
|
||||
If OC.GetOrdenesPendientes(DdlTipo.SelectedValue.ToString, 0, UsuarioActual.CveEmpresa, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero,
|
||||
DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero,
|
||||
SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False)) Then
|
||||
DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||
CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then
|
||||
|
||||
DtPorAtender = OC.DtResultados
|
||||
GvPorAtender.DataSource = DtPorAtender 'OC.DtResultados
|
||||
@@ -203,8 +211,8 @@ Partial Class RepOC
|
||||
End If
|
||||
|
||||
If OC.GetOrdenesPendientes(DdlTipo.SelectedValue.ToString, 1, UsuarioActual.CveEmpresa, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero,
|
||||
DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero,
|
||||
SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False)) Then
|
||||
DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||
CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then
|
||||
GvPendientes.DataSource = OC.DtResultados
|
||||
GvPendientes.DataBind()
|
||||
'If (GvPendientes.Rows.Count > 0) Then
|
||||
@@ -317,8 +325,9 @@ Partial Class RepOC
|
||||
Dim OC As New ClsOC
|
||||
If OC.GetOrdenesCompraRep(DdlTipo.SelectedValue.ToString, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, DDlClasificacion.SelectedValue.ToEntero,
|
||||
DdlEstatus.SelectedValue.ToEntero, FI, FF, -1, ddlProveedor.SelectedValue.ToEntero, If(txtFolio.Text.ToEntero = 0, -1, txtFolio.Text.ToEntero), ddlUsuario.SelectedValue.ToEntero,
|
||||
If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False), ddlcliente.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||
SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero()) Then
|
||||
If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False),
|
||||
ddlcliente.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then
|
||||
|
||||
GvConsultar.DataSource = OC.DtResultados
|
||||
DtOC = OC.DtResultados
|
||||
@@ -449,6 +458,7 @@ Partial Class RepOC
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Folio}{Tipo}{Proyecto}{SubProyecto}{Estatus}{AF}{Usuario}{FI}{FF}{Clasificacion}{Producto}{Completa}{Proveedor}{Cliente}"))
|
||||
params.Add(New ReportParameter("SubProyectoHeader", LblSubProyecto.Text))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
@@ -480,6 +490,7 @@ Partial Class RepOC
|
||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text = "", "-1", txtFechaF.Text)))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString))
|
||||
params.Add(New ReportParameter("SubProyecto", LblSubProyecto.Text))
|
||||
|
||||
ImprimirPDF(String.Format(UsuarioActual.Empresa.Ruta & "/Formatos/RepRequisicionesOC.rdlc", UsuarioActual.Empresa.Ruta), DtOC, params, Formato:="EXCEL")
|
||||
Else
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarCategoria" OnClick="BtnAgregarCategoria_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Categoría"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarCategoria" OnClick="BtnAgregarCategoria_Click" data-toggle="tooltip" data-placement="left" title="Agregar Categoría" Text="<i class='fa fa-plus'></i>Agregar"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -25,8 +25,8 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCategoria,Estado,Estatus,Categoria" EmptyDataText="No se encontraron Categorías de Documentos Registrados" ToolTip="Listado de Categorías de Documentos" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Categoría" DataField="Categoria" />
|
||||
<asp:BoundField HeaderText="Estado" DataField="Estatus" />
|
||||
<asp:BoundField HeaderText="Categoría" DataField="Categoria" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estado" DataField="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Agregar Categoría de Documentos</asp:Literal></h4>
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Categoría de Documentos</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarSubCategoria" OnClick="BtnAgregarSubCategoria_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Subcategoría"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarSubCategoria" OnClick="BtnAgregarSubCategoria_Click" data-toggle="tooltip" data-placement="left" title="Agregar Subcategoría" Text="<i class='fa fa-plus'></i>Agregar"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -25,8 +25,8 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubCategoria,SubCategoria,CveCategoria,Categoria" EmptyDataText="No se encontraron Categorías de Documentos Registrados" ToolTip="Listado de Categorías de Documentos" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Subcategoría" DataField="SubCategoria" />
|
||||
<asp:BoundField HeaderText="Categoría" DataField="Categoria" />
|
||||
<asp:BoundField HeaderText="Subcategoría" DataField="SubCategoria" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Categoría" DataField="Categoria" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Agregar Categoría de Documentos</asp:Literal></h4>
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Subcategoría de Documentos</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="TxtSubCategoria">Categoria:</label>
|
||||
<asp:DropDownList ID="DdlCategorias" CssClass="form-control select2me" runat="server" DataTextField="Categoria" DataValueField="CveCategoria"></asp:DropDownList>
|
||||
<label for="TxtSubCategoria">Categoría:</label><br />
|
||||
<asp:DropDownList ID="DdlCategorias" CssClass="form-control select2me" runat="server" DataTextField="Categoria" Width="100%" DataValueField="CveCategoria"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
@@ -17,9 +17,16 @@
|
||||
<asp:LinkButton runat="server" ID="LkbNuevaVersion" OnClick="LkbNuevaVersion_Click" data-toggle="tooltip" data-placement="left" title="Agregar una nueva versión de este documento" Text="<i class='fa fa-plus'></i>Crear Nueva Versión"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LbPruebas" OnClick="LbPruebas_Click" data-toggle="tooltip" data-placement="left" title="Agregar una nueva versión de este documento" Text="<i class='fa fa-plus'></i>Pruebas"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="LkbPDF" OnClick="LkbPDF_Click" data-toggle="tooltip" data-placement="left" title="ImprimirPDF" Text="<i class='fa fa-file-pdf-o'></i> PDF"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LkbExcel" OnClick="LkbExcel_Click" data-toggle="tooltip" data-placement="left" title="ImprimirExcel" Text="<i class='fa fa-file-excel-o'></i> Excel"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LkbPDF"/>
|
||||
<asp:PostBackTrigger ControlID="LkbExcel"/>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
@@ -32,8 +39,8 @@
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblDescripción" Text="Descripción" />
|
||||
<asp:TextBox runat="server" ID="TxtDescripcion" class="form-control" />
|
||||
<asp:Label runat="server" ID="LblDescripción" Text="Descripción" /><br />
|
||||
<asp:TextBox runat="server" ID="TxtDescripcion" class="form-control" Width="100%" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtDescripcion" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpDoc"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
@@ -50,18 +57,9 @@
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px" runat="server" id="DivEstatusInicial">
|
||||
<asp:Label runat="server" ID="Label3" Text="Estatus: En Proceso" /><br />
|
||||
<asp:Label runat="server" ID="LblEstatus" Text="Estatus: En Proceso" /><br />
|
||||
</div>
|
||||
<br runat="server" id="brEstatusInicial"/>
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px" runat="server" id="DivEstatus" visible="false">
|
||||
<asp:Label runat="server" ID="LblEstatus" Text="Estatus" /><br />
|
||||
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Style="width: 30%">
|
||||
<asp:ListItem Value="1" Text="En Proceso" />
|
||||
<asp:ListItem Value="2" Text="Aprobado" />
|
||||
<asp:ListItem Value="3" Text="Rechazado" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<br runat="server" id="brEstatus" visible="false"/>
|
||||
<br runat="server"/>
|
||||
<div class="form-group form-md-line-input input-iconright" style="margin: unset; font-size: 14px">
|
||||
<asp:Label runat="server" ID="LblVersion" Text="Versión" />
|
||||
<asp:TextBox runat="server" ID="TxtVersion" class="form-control" Style="width: 30%" />
|
||||
@@ -86,7 +84,7 @@
|
||||
</div>
|
||||
<div runat="server" id="DivDescargarArchivo" visible="false">
|
||||
<asp:Label runat="server" ID="LblDocumentoCargado" Text="Documento cargado:" />
|
||||
<asp:LinkButton runat="server" ID="LkbDescargarArchivo" Text="" OnClick="LkbDescargarArchivo_Click" />
|
||||
<asp:LinkButton runat="server" ID="LkbDescargarArchivo" Style="color:#23527c" Text="" OnClick="LkbDescargarArchivo_Click" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -107,7 +105,7 @@
|
||||
<asp:UpdatePanel ID="UpDatosUsuarios" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvUsuarios" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario,Usuario,Correo" EmptyDataText="No se encontraron Categorías de Documentos Registrados"
|
||||
ToolTip="Listado de Categorías de Documentos" CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center; width: 100%; overflow-x: hidden"
|
||||
ToolTip="Listado de Usuarios" CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center; width: 100%; overflow-x: hidden"
|
||||
GridLines="None" OnRowDataBound="GvUsuarios_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -147,6 +145,7 @@
|
||||
<asp:LinkButton runat="server" ID="LkbGuardar" OnClick="LblGuardar_Click" Text="Guardar" class="btn btn-primary" ValidationGroup="GrpDoc" />
|
||||
<asp:LinkButton runat="server" ID="LkbActualizar" OnClick="LbkActualizar_Click" Text="Actualizar" class="btn btn-primary" ValidationGroup="GrpDoc" Visible="false" />
|
||||
<asp:LinkButton runat="server" ID="LkbPublicar" OnClick="LkbPublicar_Click" Text="Publicar" class="btn btn-primary" ValidationGroup="GrpDoc" visible="false"/>
|
||||
<asp:LinkButton runat="server" ID="LkbRechazar" OnClick="LkbRechazar_Click" Text="Rechazar" class="btn btn-danger" ValidationGroup="GrpDoc" visible="false"/>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,14 +8,16 @@ using Extensiones;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private int CveUsuarioResponsable
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveUsuarioResponsable"].ToString().ToEntero();
|
||||
return ViewState["CveUsuarioResponsable"] == null ? -1 : ViewState["CveUsuarioResponsable"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
@@ -89,13 +91,29 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable DtUsuariosParticipantes
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((DataTable) ViewState["DtUsuariosParticipantes"]);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DtUsuariosParticipantes"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Cargar();
|
||||
CargarMensajeNuevoEditado();
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGAS"
|
||||
private void CargarCveDocumento()
|
||||
{
|
||||
@@ -107,6 +125,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
else
|
||||
{
|
||||
this.CveDocumento = -1;
|
||||
this.CveUsuarioResponsable = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +135,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
switch (MensajeNuevoEditado)
|
||||
{
|
||||
case "Nuevo":
|
||||
Alert("El Documento ha sido creado correctamente");
|
||||
Alert("El Documento ha sido creado correctamente",JSBtnAceptar: "document.location.href=\"/OI/Documentos.aspx\";");
|
||||
break;
|
||||
case "NuevaVersion":
|
||||
Alert("Nueva versión del Documento creado correctamente");
|
||||
@@ -124,6 +143,9 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
case "Publicado":
|
||||
Alert("Documento publicado");
|
||||
break;
|
||||
case "Rechazado":
|
||||
Alert("Documento rechazado");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,6 +163,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
if (ObjOI.GetDocumentoAutorizacion(this.CveDocumento))
|
||||
{
|
||||
GvUsuarios.DataSource = ObjOI.DtResultados;
|
||||
DtUsuariosParticipantes = ObjOI.DtResultados;
|
||||
UsuariosAux = ObjOI.DtResultados;
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
@@ -157,8 +180,11 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
foreach (GridViewRow Usuario in UsuariosEnGrid)
|
||||
{
|
||||
int CveUsuario = Usuario.DataKey("CveUsuario").ToEntero();
|
||||
string FechaAprobacion = Usuarios.FiltroPrimeroValor("FechaAprobacion", string.Format("CveUsuario = {0}", CveUsuario));
|
||||
string Filtro = string.Format("CveUsuario = {0}", CveUsuario);
|
||||
string FechaAprobacion = Usuarios.FiltroPrimeroValor("FechaAprobacion", Filtro);
|
||||
Usuario.FCCheckBox("ChkAprobar").Checked = FechaAprobacion != "" || (UsuarioActual.CveUsuario == CveUsuarioResponsable && CveUsuario == UsuarioActual.CveUsuario);
|
||||
string Adjunto = Usuarios.FiltroPrimeroValor("Adjunto", Filtro);
|
||||
Usuario.FCLinkButton("LkbDescargarPropuesta").Visible = Adjunto != "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,8 +218,9 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
TxtResponsable.Text = UsuarioActual.Nombre;
|
||||
}
|
||||
|
||||
private void CargarDocumentoYaExistente()
|
||||
private bool CargarDocumentoYaExistente()
|
||||
{
|
||||
bool SeCargoInfo = false;
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
if (ObjOI.GetDocumento(this.CveDocumento, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
@@ -206,7 +233,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
DdlCategoria.SelectedValue = Documento["CveCategoria"].ToString();
|
||||
CargarSubCategoria();
|
||||
DdlSubCategoria.SelectedValue = Documento["CveSubCategoria"].ToString();
|
||||
DdlEstatus.SelectedValue = Documento["CveEstatus"].ToString();
|
||||
LblEstatus.Text =$"Estatus: {Documento["Estatus"].ToString()}";
|
||||
TxtVersion.Text = Documento["Version"].ToString();
|
||||
TxtResponsable.Text = Documento["Responsable"].ToString();
|
||||
TxtObs.InnerText = Documento["Observacion"].ToString();
|
||||
@@ -214,9 +241,16 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
ArchivoAdjuntoNombre = Documento["ArchivoFisico"].ToString();
|
||||
LkbDescargarArchivo.Text = ArchivoAdjuntoNombre;
|
||||
DivDescargarArchivo.Visible = true;
|
||||
|
||||
SeCargoInfo = true;
|
||||
}else
|
||||
{
|
||||
this.CveDocumento = -1;
|
||||
Alert("No se encontró el Documento", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
return SeCargoInfo;
|
||||
}
|
||||
|
||||
private void CargarUsuariosAutorizo()
|
||||
@@ -239,7 +273,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
LkbGuardar.Visible = false;
|
||||
LkbActualizar.Visible = true;
|
||||
LkbPublicar.Visible = true;
|
||||
LkbPublicar.Visible = VerificarAprobaciónParticipantes() && UsuarioActual.CveUsuario == CveUsuarioResponsable;
|
||||
GvUsuarios.Columns[1].Visible = false;
|
||||
GvUsuarios.Columns[2].Visible = true;
|
||||
GvUsuarios.Columns[3].Visible = true;
|
||||
@@ -266,7 +300,6 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
TxtDescripcion.Enabled = false;
|
||||
DdlSubCategoria.Enabled = false;
|
||||
DdlEstatus.Enabled = false;
|
||||
TxtVersion.Enabled = false;
|
||||
TxtResponsable.Enabled = false;
|
||||
TxtObs.Disabled = true;
|
||||
@@ -277,9 +310,12 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
|
||||
private void ConfigurarSegunEstatus()
|
||||
{
|
||||
bool MostrarSegunAprobado = (DdlEstatus.SelectedValue == "2");
|
||||
DivBotonesAcciones.Visible = !MostrarSegunAprobado;
|
||||
UpAgregar.Visible = MostrarSegunAprobado;
|
||||
bool MostrarSegunAprobado = (LblEstatus.Text == "Estatus: Aprobado");
|
||||
bool MostrarSegunRechazado = (LblEstatus.Text == "Estatus: Rechazado");
|
||||
bool MostrarSegunEnProceso = (LblEstatus.Text == "Estatus: En Proceso");
|
||||
LkbActualizar.Visible = !(MostrarSegunRechazado) && (UsuarioActual.CveUsuario == this.CveUsuarioResponsable);
|
||||
DivBotonesAcciones.Visible = !(MostrarSegunAprobado || MostrarSegunRechazado);
|
||||
LkbNuevaVersion.Visible = MostrarSegunAprobado;
|
||||
}
|
||||
|
||||
private void CargarCategorias()
|
||||
@@ -303,12 +339,9 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
private void EstatusMostrar(bool Mostrar)
|
||||
private void MostrarBotonRechazar()
|
||||
{
|
||||
DivEstatus.Visible = Mostrar;
|
||||
brEstatus.Visible = Mostrar;
|
||||
DivEstatusInicial.Visible = !Mostrar;
|
||||
brEstatusInicial.Visible = !Mostrar;
|
||||
LkbRechazar.Visible = (LblEstatus.Text == "Estatus: En Proceso" && this.CveUsuarioResponsable == UsuarioActual.CveUsuario);
|
||||
}
|
||||
|
||||
private void Cargar()
|
||||
@@ -319,14 +352,16 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
CargarUsuarios();
|
||||
if (this.CveDocumento > 0)
|
||||
{
|
||||
EstatusMostrar(true);
|
||||
CargarDocumentoYaExistente();
|
||||
CargarUsuariosParticipantes();
|
||||
CargarUsuariosAutorizo();
|
||||
ConfiguracionActualizar();
|
||||
ConfigurarGridUsuariosParticipantes();
|
||||
ConfigurarCamposDetalleSegunUsuario();
|
||||
CargarMensajeNuevoEditado();
|
||||
if (CargarDocumentoYaExistente())
|
||||
{
|
||||
CargarUsuariosParticipantes();
|
||||
CargarUsuariosAutorizo();
|
||||
ConfiguracionActualizar();
|
||||
ConfigurarGridUsuariosParticipantes();
|
||||
ConfigurarCamposDetalleSegunUsuario();
|
||||
|
||||
MostrarBotonRechazar();
|
||||
}
|
||||
}
|
||||
ConfigurarSegunEstatus();
|
||||
}
|
||||
@@ -335,39 +370,45 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
#region "GENERAR DOCUMENTO"
|
||||
protected void LblGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
ObjOI.IniciaTransacSQL();
|
||||
bool TieneError = false;
|
||||
|
||||
//Esta variable es requerida más adelante
|
||||
int CveDocumento = 0;
|
||||
string RutaArchivo = "-1";
|
||||
string CorreosNotificacion = "";
|
||||
byte[] ArchivoNotifiacion = null;
|
||||
|
||||
CveDocumento = GuardarDocumento(ref ObjOI, ref TieneError);//Se crea el Documento
|
||||
if (!TieneError) { RutaArchivo = AsignarArchivoAlDocumento(CveDocumento, ref ObjOI, ref TieneError); }//Se guarda el archivo fisico y se asigna al Documento generado
|
||||
if (!TieneError) { CorreosNotificacion = GuardarUsuariosQueAutorizan(CveDocumento, RutaArchivo, ref ObjOI, ref TieneError); }//asignamos a los usuarios que participaran en aprovar este documento
|
||||
if (!TieneError)
|
||||
if(TxtDocumentoFile.Text != "[]")
|
||||
{
|
||||
ArchivoNotifiacion = GenerarArchivoByte(CveDocumento, RutaArchivo);
|
||||
NotificarPorCorreo(CorreosNotificacion, RutaArchivo, ArchivoNotifiacion);
|
||||
}
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
ObjOI.IniciaTransacSQL();
|
||||
bool TieneError = false;
|
||||
|
||||
//Gestión de errores y resultados
|
||||
if (!TieneError)
|
||||
//Esta variable es requerida más adelante
|
||||
int CveDocumento = 0;
|
||||
string RutaArchivo = "-1";
|
||||
string CorreosNotificacion = "";
|
||||
byte[] ArchivoNotifiacion = null;
|
||||
|
||||
CveDocumento = GuardarDocumento(ref ObjOI, ref TieneError);//Se crea el Documento
|
||||
if (!TieneError) { RutaArchivo = AsignarArchivoAlDocumento(CveDocumento, ref ObjOI, ref TieneError); }//Se guarda el archivo fisico y se asigna al Documento generado
|
||||
if (!TieneError) { CorreosNotificacion = GuardarUsuariosQueAutorizan(CveDocumento, RutaArchivo, ref ObjOI, ref TieneError); }//asignamos a los usuarios que participaran en aprovar este documento
|
||||
if (!TieneError)
|
||||
{
|
||||
ArchivoNotifiacion = GenerarArchivoByte(CveDocumento, RutaArchivo);
|
||||
NotificarPorCorreo(CorreosNotificacion, RutaArchivo, ArchivoNotifiacion, CveDocumento);
|
||||
}
|
||||
|
||||
//Gestión de errores y resultados
|
||||
if (!TieneError)
|
||||
{
|
||||
ObjOI.Commit();
|
||||
string ParamMensaje = LkbGuardar.Text == "Guardar" ? "Nuevo" : "NuevaVersion";//Esto indica la acción de usuario la cual se mostrará como alert al cargar la página
|
||||
Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", CveDocumento, ParamMensaje));
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjOI.RollBack();
|
||||
Alert(this.ErrorMensaje, ModExtensiones.TipoMensaje.MsgError);
|
||||
UpCliente.Update();
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
}else
|
||||
{
|
||||
ObjOI.Commit();
|
||||
string ParamMensaje = LkbGuardar.Text == "Guardar" ? "Nuevo" : "NuevaVersion";//Esto indica la acción de usuario la cual se mostrará como alert al cargar la página
|
||||
Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", CveDocumento, ParamMensaje));
|
||||
Alert("Es necesario cargar un Documento",ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjOI.RollBack();
|
||||
Alert(this.ErrorMensaje, ModExtensiones.TipoMensaje.MsgError);
|
||||
UpCliente.Update();
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
}
|
||||
|
||||
private int GuardarDocumento(ref ClsOIEventos ObjOI, ref bool TieneError)
|
||||
@@ -435,6 +476,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
string Archivo = ActualizarArchivoEnDirectorio();
|
||||
ActualizarDocumentoYaExistente(Archivo);
|
||||
TxtDocumentoFile.Text = "";
|
||||
Cargar();
|
||||
UpCliente.Update();
|
||||
Alert("Documento actualizado");
|
||||
@@ -459,8 +501,8 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
private void ActualizarDocumentoYaExistente(string ArchivoFisico)
|
||||
{
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
if (!ObjOI.UpdateDocumento(this.CveDocumento, DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, DdlEstatus.SelectedValue.ToEntero(),
|
||||
ArchivoFisico, UsuarioActual.Nombre, ModExtensiones.MinFecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
if (!ObjOI.UpdateDocumento(this.CveDocumento, DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, 1, ArchivoFisico,
|
||||
UsuarioActual.Nombre, ModExtensiones.MinFecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert("Error al actualizar", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
@@ -545,9 +587,21 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
#endregion
|
||||
|
||||
#region "NOTIFICACIONES CORREO"
|
||||
private void NotificarPorCorreo(string Para, string NombreArchivo, byte[] Adjunto)
|
||||
private string GenerarCuerpoCorreo(int CveDocumento)
|
||||
{
|
||||
string Descripcion = TxtDescripcion.Text;
|
||||
string URL = string.Format("{0}/OI/DocumentoDetalle.aspx?CveDocumento={1}", HttpContext.Current.Request.Url.Host,CveDocumento);
|
||||
StringBuilder body = new StringBuilder();
|
||||
body.Append("Ha sido invitado a revisar la generación de un documento <br /> ");
|
||||
body.Append($"Documento: {TxtDescripcion.Text},<br/> ");
|
||||
body.Append($"Categoria: {DdlCategoria.SelectedItem.Text},<br/> ");
|
||||
body.Append($"Subcategoria: {DdlSubCategoria.SelectedItem.Text},<br/> ");
|
||||
body.Append($"<a href={URL}>Detalles del Documento</a>");
|
||||
return body.ToString();
|
||||
}
|
||||
|
||||
private void NotificarPorCorreo(string Para, string NombreArchivo, byte[] Adjunto, int CveDocumento)
|
||||
{
|
||||
string Descripcion = GenerarCuerpoCorreo(CveDocumento);
|
||||
string Asunto = "Se le ha agregado como participante en el desarrollo de un Documento";
|
||||
string a = string.Format("{0} -- {1} --- {2}", Descripcion, Para, "");
|
||||
a.GuardaLog();
|
||||
@@ -649,7 +703,16 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
|
||||
string Archivo = SubirPropuestaEnDirectorio(this.CveUsuarioSeleccionado);
|
||||
ActualizarUsuario(this.CveAsignacion, Archivo);
|
||||
bool UsuarioActualizado = ActualizarUsuario(this.CveAsignacion, Archivo);
|
||||
if (UsuarioActualizado)
|
||||
{
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarPropuesta"));
|
||||
Alert("La propuesta se realizó correctamente");
|
||||
CargarUsuariosParticipantes();
|
||||
CargarUsuariosAutorizo();
|
||||
ConfigurarGridUsuariosParticipantes();
|
||||
UpDatosUsuarios.Update();
|
||||
}
|
||||
}
|
||||
|
||||
private string SubirPropuestaEnDirectorio(int CveUsuario)
|
||||
@@ -662,6 +725,12 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
try
|
||||
{
|
||||
string AdjuntoYaCargado = GetUsuarioParticipante(CveUsuario)["Adjunto"] == null ? "": GetUsuarioParticipante(CveUsuario)["Adjunto"].ToString();
|
||||
string RutaBuscar = string.Format(@"{0}DocumentosRepo\{1}\{2}", UsuarioActual.Empresa.Ruta, this.CveDocumento, AdjuntoYaCargado);
|
||||
if (File.Exists(RutaBuscar))
|
||||
{
|
||||
File.Delete(RutaBuscar);
|
||||
}
|
||||
string NombreArchivo = fileItem.filenameO;
|
||||
fileNameReturn = string.Format("{0}_{1}", CveUsuario, NombreArchivo);
|
||||
string RutaDestino = string.Format(@"{0}DocumentosRepo\{1}\{2}_{3}", UsuarioActual.Empresa.Ruta, this.CveDocumento, CveUsuario, NombreArchivo);
|
||||
@@ -676,14 +745,16 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
return fileNameReturn;
|
||||
}
|
||||
|
||||
private void ActualizarUsuario(int CveAutorizacion, string Archivo)
|
||||
private bool ActualizarUsuario(int CveAutorizacion, string Archivo)
|
||||
{
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
if (!ObjOI.UpdateDocumentoAutorizacion(CveAutorizacion, this.CveDocumento, TxtComentarios.InnerText, Archivo, ModExtensiones.MinFecha))
|
||||
{
|
||||
Alert("Error al actualizar el archivo subido propuesto por el usuario");
|
||||
return false;
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -696,6 +767,10 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
DataRow Usuario = GetUsuarioParticipante(CveUsuario);
|
||||
|
||||
AprobacionDeUsuario(Usuario, SelectedCheckBox.Checked);
|
||||
|
||||
LkbPublicar.Visible = VerificarAprobaciónParticipantes() && UsuarioActual.CveUsuario == CveUsuarioResponsable;
|
||||
UpCliente.Update();
|
||||
|
||||
}
|
||||
|
||||
private void AprobacionDeUsuario(DataRow Usuario, bool Autorizar)
|
||||
@@ -719,7 +794,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
ObjOI.Dispose();
|
||||
}
|
||||
|
||||
protected void LkbPublicar_Click(object sender, EventArgs e)
|
||||
private bool VerificarAprobaciónParticipantes()
|
||||
{
|
||||
GridViewRowCollection Usuarios = GvUsuarios.Rows;
|
||||
bool Aprobado = true;
|
||||
@@ -731,6 +806,12 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
break;
|
||||
}
|
||||
}
|
||||
return Aprobado;
|
||||
}
|
||||
|
||||
protected void LkbPublicar_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool Aprobado = VerificarAprobaciónParticipantes();
|
||||
|
||||
if (Aprobado)
|
||||
{
|
||||
@@ -762,15 +843,57 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
GvUsuarios.Columns[1].Visible = true;
|
||||
GvUsuarios.Columns[2].Visible = false;
|
||||
GvUsuarios.Columns[3].Visible = false;
|
||||
EstatusMostrar(false);
|
||||
UpCliente.Update();
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void LbPruebas_Click(object sender,EventArgs e)
|
||||
#region "RECHAZAR"
|
||||
protected void LkbRechazar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Cargar();
|
||||
UpCliente.Update();
|
||||
Alert("Documento actualizado");
|
||||
ClsOIEventos ObjOI = new ClsOIEventos();
|
||||
if (ObjOI.UpdateDocumento(this.CveDocumento, DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, 3, "-1", TxtResponsable.Text,
|
||||
DateTime.Now, -1, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert("Documento cancelado");
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", this.CveDocumento, "Rechazado"));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "IMPRIMIR"
|
||||
private void Imprimir(string Formato)
|
||||
{
|
||||
List<ReportParameter> Params = new List<ReportParameter>();
|
||||
Params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
Params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
Params.Add(new ReportParameter("LogoPath", ""));
|
||||
Params.Add(new ReportParameter("Descripcion", TxtDescripcion.Text));
|
||||
Params.Add(new ReportParameter("Categoria", DdlCategoria.SelectedItem.Text));
|
||||
Params.Add(new ReportParameter("SubCategoria", DdlSubCategoria.SelectedItem.Text));
|
||||
Params.Add(new ReportParameter("Estatus", LblEstatus.Text.Substring(9)));
|
||||
Params.Add(new ReportParameter("Version", TxtVersion.Text));
|
||||
Params.Add(new ReportParameter("Responsable", TxtResponsable.Text));
|
||||
Params.Add(new ReportParameter("Observaciones", TxtObs.InnerText));
|
||||
Params.Add(new ReportParameter("Documento", this.ArchivoAdjuntoNombre));
|
||||
|
||||
|
||||
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
string LogoRuta = (Imagen.Exists) ? logouri : "" ;
|
||||
Params.Add(new ReportParameter("LogoPath", LogoRuta));
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepDocumentos.rdlc", this.DtUsuariosParticipantes, Params, "Detalle del documento", Formato);
|
||||
}
|
||||
|
||||
protected void LkbPDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("PDF");
|
||||
}
|
||||
|
||||
protected void LkbExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("Excel");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -14,13 +14,13 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:HyperLink runat="server" ID="BtnAgregarDocumento" data-toggle="tooltip" data-placement="left" NavigateUrl="/OI/DocumentoDetalle.aspx" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Documento"></asp:HyperLink>
|
||||
<asp:HyperLink runat="server" ID="BtnAgregarDocumento" data-toggle="tooltip" data-placement="left" NavigateUrl="/OI/DocumentoDetalle.aspx" title="Agregar Documento" Text="<i class='fa fa-plus'></i>Agregar"></asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -32,13 +32,14 @@
|
||||
EmptyDataText="No se encontraron Documentos Registrados" ToolTip="Listado de Documentos" CssClass="table table-striped table-advance table-hover"
|
||||
Style="margin-top: -10px; text-align: center; width: 100%" GridLines="None" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Descripcion" DataTextField="Descripcion" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:HyperLinkField HeaderText="Descripción" DataTextField="Descripcion" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:HyperLinkField HeaderText="Observación" DataTextField="Observacion" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:HyperLinkField HeaderText="Versión" DataTextField="Version" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}"/>
|
||||
<asp:HyperLinkField HeaderText="Categoria" DataTextField="Categoria" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}"/>
|
||||
<asp:HyperLinkField HeaderText="SubCategoria" DataTextField="SubCategoria" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}"/>
|
||||
<asp:HyperLinkField HeaderText="Versión" DataTextField="Version" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:HyperLinkField HeaderText="Categoría" DataTextField="Categoria" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:HyperLinkField HeaderText="SubCategoría" DataTextField="SubCategoria" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:HyperLinkField HeaderText="Responsable" DataTextField="Responsable" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:HyperLinkField HeaderText="Fecha Inicio Vigencia" DataTextField="FechaInicioVigencia" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}"/>
|
||||
<asp:HyperLinkField HeaderText="Estatus" DataTextField="Estatus" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:HyperLinkField HeaderText="Inicio de Vigencia" DataTextField="FechaInicioVigencia" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveDocumento" DataNavigateUrlFormatString="/OI/DocumentoDetalle.aspx?CveDocumento={0}" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LkbDescargarDoc" runat="server" OnClick="LkbDescargarDoc_Click" Visible="true" ClientIDMode="AutoID" AlternateText="Descargar" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i title='Subir Documento' class='fa fa-download' title='Descargar Documento' ></i>" />
|
||||
|
||||
@@ -43,17 +43,24 @@ public partial class OI_Documentos : ClsPaginas
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
string ArchivoFisico = GvRow.DataKey("ArchivoFisico");
|
||||
string NombreArchivo = ArchivoFisico.Split('_')[1];
|
||||
string CveDocumento = GvRow.DataKey("CveDocumento");
|
||||
//string NombreArchivo = ArchivoFisico.Split('_')[1];
|
||||
|
||||
string Ruta = string.Format("{0}Empresas/{1}/DocumentosRepo/{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, ArchivoFisico);
|
||||
byte[] archivoBytes = File.ReadAllBytes(Ruta);
|
||||
string Ruta = string.Format("{0}Empresas/{1}/DocumentosRepo/{2}/{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, CveDocumento, ArchivoFisico);
|
||||
if (File.Exists(Ruta))
|
||||
{
|
||||
byte[] archivoBytes = File.ReadAllBytes(Ruta);
|
||||
|
||||
HttpContext.Current.Response.Clear();
|
||||
HttpContext.Current.Response.ClearContent();
|
||||
HttpContext.Current.Response.ContentType = "application/octet-stream";
|
||||
HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", NombreArchivo));
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", archivoBytes.Length.ToString());
|
||||
HttpContext.Current.Response.OutputStream.Write(archivoBytes, 0, archivoBytes.Length);
|
||||
HttpContext.Current.Response.End();
|
||||
HttpContext.Current.Response.Clear();
|
||||
HttpContext.Current.Response.ClearContent();
|
||||
HttpContext.Current.Response.ContentType = "application/octet-stream";
|
||||
HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", ArchivoFisico));
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", archivoBytes.Length.ToString());
|
||||
HttpContext.Current.Response.OutputStream.Write(archivoBytes, 0, archivoBytes.Length);
|
||||
HttpContext.Current.Response.End();
|
||||
}else
|
||||
{
|
||||
Alert("No se ha cargado Documento",ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,7 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
|
||||
<ajax:TabPanel ID="TabCxP" runat="server" HeaderText="<i class='fa fa-list-alt'></i> Cuentas x Cobrar" Visible="False">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -799,13 +800,13 @@
|
||||
</ajax:TabPanel>
|
||||
|
||||
<%---2020/02/06 - Auditoria--%>
|
||||
<ajax:TabPanel ID="TabAuditoria" runat="server" HeaderText="<i class='fa fa-search'></i> Auditoría">
|
||||
<ajax:TabPanel ID="TabAuditoria" runat="server" HeaderText="<i class='fa fa-search'></i> Auditoría" Visible="false" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpTabAuditoria" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<asp:UpdatePanel ID="UPGvDocumentos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
|
||||
@@ -284,8 +284,16 @@ Partial Class Portal_PortalProveedor
|
||||
' CargaUsuariosPortal()
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(305) Then
|
||||
|
||||
TabAuditoria.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
'CARGA TAB CONTRASENIA PARA TODOS LOS USUARIOS
|
||||
If UsuarioActual.CvePlataforma = 7 Then TabContraseña.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -647,289 +655,289 @@ Partial Class Portal_PortalProveedor
|
||||
GvCxPHistorial.DataBind()
|
||||
|
||||
' UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "Usuarios Portal"
|
||||
|
||||
'Private Sub CargaUsuariosPortal()
|
||||
' Dim ObjUsrs As New ClsSisUsuarios()
|
||||
' If ObjUsrs.GetUsuariosPortal(-1, -1, CveProveedor) Then
|
||||
' Dim dtUsr As DataTable = ObjUsrs.DtResultados
|
||||
' 'Dim dr As DataRow = dtUsr.FiltroPrimero(String.Format("CveUsuario = {0}", UsuarioActual.CveUsuario))
|
||||
' 'If dr IsNot Nothing Then
|
||||
|
||||
' ' If True Then TabHistorial.Visible = True 'dr("Permiso1").ToString = "True"
|
||||
' ' If True Then TabCxP.Visible = True
|
||||
' ' If True Then TabAnticipos.Visible = True
|
||||
' ' If True Then TabBancos.Visible = True
|
||||
' ' If True Then TabSistema.Visible = True
|
||||
|
||||
' 'End If
|
||||
|
||||
' 'dtUsr = dtUsr '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
|
||||
|
||||
' ViewState("OrdenUsuarios") = ""
|
||||
' GvUsuariosPortal.DataSource = dtUsr
|
||||
' ViewState("DTUsuariosProveedor") = dtUsr
|
||||
' Else
|
||||
' GvUsuariosPortal.DataSource = Nothing
|
||||
' ViewState("DTUsuariosProveedor") = Nothing
|
||||
' End If
|
||||
' ObjUsrs.Dispose()
|
||||
' GvUsuariosPortal.DataBind()
|
||||
'End Sub
|
||||
|
||||
|
||||
'Private Sub CargaGridUsuarios(Orden As String)
|
||||
' If CType(ViewState("DTUsuariosProveedor"), DataTable).Rows.Count > 0 Then
|
||||
' If Orden <> String.Empty Then
|
||||
' Dim DV As New DataView(CType(ViewState("DTUsuariosProveedor"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
' GvUsuariosPortal.DataSource = DV.ToTable() '.FiltraParametros("Nombre <> 'Administrador' AND CveUsuario <> " & UsuarioActual.CveUsuario)
|
||||
' DV.Dispose()
|
||||
' Else
|
||||
' GvUsuariosPortal.DataSource = CType(ViewState("DTUsuariosProveedor"), DataTable) '.FiltraParametros("Nombre <> 'Administrador' AND CveUsuario <> " & UsuarioActual.CveUsuario)
|
||||
' End If
|
||||
' End If
|
||||
' GvUsuariosPortal.DataBind()
|
||||
' UPPUsuarios.Update()
|
||||
'End Sub
|
||||
|
||||
''ajustar el tamaño de las celdas de la GvUsuarios Portal
|
||||
'Protected Sub GvUsuariosPortal_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuariosPortal.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
' 'El usuario Admin no se puede editar ni eliminar
|
||||
' If e.Row.DataKey("Nombre") = "Admin" Then
|
||||
' e.Row.FCLinkButton("imgE").Visible = False
|
||||
' e.Row.FCLinkButton("imgD").Visible = False
|
||||
' e.Row.FCLinkButton("imgC").Visible = False
|
||||
' End If
|
||||
|
||||
' If e.Row.RowIndex = 0 Then
|
||||
' '' e.Row.Cells(0).Width = Unit.Pixel(120)
|
||||
' 'e.Row.Cells(0).Width = Unit.Pixel(120)
|
||||
' 'e.Row.Cells(1).Width = Unit.Pixel(150)
|
||||
' 'e.Row.Cells(2).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(3).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(4).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(5).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(6).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(7).Width = Unit.Pixel(55)
|
||||
|
||||
' 'e.Row.Cells(8).Width = Unit.Pixel(75)
|
||||
' 'e.Row.Cells(9).Width = Unit.Pixel(100)
|
||||
' 'e.Row.Cells(10).Width = Unit.Pixel(150)
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
''Editar usuarios
|
||||
'Protected Sub GvUsuariosPortal_RowEditing(ByVal sender As Object, ByVal e As GridViewEditEventArgs) Handles GvUsuariosPortal.RowEditing
|
||||
' GvUsuariosPortal.EditIndex = e.NewEditIndex
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Protected Sub GvUsuariosPortal_RowUpdating(ByVal sender As Object, ByVal e As GridViewUpdateEventArgs) Handles GvUsuariosPortal.RowUpdating
|
||||
' Dim ObjUsuario As New ClsSisUsuarios
|
||||
' Dim Nombre, Correo As String
|
||||
' Dim Estatus As Boolean
|
||||
' Dim gvr As GridViewRow = GvUsuariosPortal.Rows(e.RowIndex)
|
||||
|
||||
' 'Usuario = gvr.FCLiteral("LtlUUsuario").Text.Trim
|
||||
' Nombre = gvr.FCTextBox("TxtUsuarioPortalEdit").Text.Trim
|
||||
' Correo = gvr.FCTextBox("TxtCorreoEdit").Text.Trim
|
||||
' Estatus = gvr.FCCheckBox("ChkEstatus").Checked
|
||||
|
||||
' Dim CveUsuarioPortal As Integer = gvr.DataKey("CveUsuario").ToEntero
|
||||
' Dim pCveProveedor As Integer = gvr.DataKey("CveProveedor").ToEntero
|
||||
|
||||
' If ObjUsuario.UpdateUsuarioPortal(Correo, Nombre, Correo, Estatus, "-1", -1, CveProveedor, CveUsuarioPortal, UsuarioActual.CveUsuario) Then
|
||||
' GvUsuariosPortal.EditIndex = -1
|
||||
' ObjUsuario.GetUsuariosPortal(-1, -1, CveProveedor) '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
|
||||
' ViewState("DTUsuariosProveedor") = ObjUsuario.DtResultados
|
||||
' End If
|
||||
' ObjUsuario.Dispose()
|
||||
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
''Cancelar Edición
|
||||
'Protected Sub GvUsuariosPortal_RowCancelingEdit(ByVal sender As Object, ByVal e As GridViewCancelEditEventArgs) Handles GvUsuariosPortal.RowCancelingEdit
|
||||
' GvUsuariosPortal.EditIndex = -1
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
''Restablecer contraseña
|
||||
'Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
|
||||
|
||||
' If e.CommandName = "RestablecerContraseña" Then
|
||||
' Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString.ToEntero
|
||||
' Dim Usuario As New ClsSisUsuarios
|
||||
' If Usuario.GetUsuariosPortal(cveUsuarioPortal, -1, -1) Then
|
||||
' Dim dr As DataRow = Usuario.DtResultados.FiltroPrimero("")
|
||||
|
||||
' If Usuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, CType(dr("Estatus"), Boolean), ContraseñaPredeterminadaEncriptada, -1, CveProveedor, cveUsuarioPortal, UsuarioActual.CveUsuario) Then
|
||||
' GvUsuariosPortal.EditIndex = -1
|
||||
' ViewState("DTUsuariosProveedor") = Usuario.DtResultados '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
|
||||
' Alert("Contraseña Restablecida.<br> La nueva contraseña es: """ & ContraseñaPredeterminada & "")
|
||||
' End If
|
||||
' End If
|
||||
' Usuario.Dispose()
|
||||
' End If
|
||||
|
||||
' If e.CommandName = "ReenviarCorreo" Then
|
||||
' Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString.ToEntero
|
||||
' Dim Usuario As New ClsSisUsuarios
|
||||
' Usuario.IniciaTransacSQL()
|
||||
' Dim TieneError = False
|
||||
|
||||
' If Usuario.GetUsuariosPortal(cveUsuarioPortal, -1, -1) Then
|
||||
' Dim dr As DataRow = Usuario.DtResultados.FiltroPrimero("")
|
||||
|
||||
' 'ACTUALIZA USUARIO, CONTRASEÑA Y ESTATUS
|
||||
' If Not Usuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, True, ContraseñaPredeterminadaEncriptada, -1, CveProveedor, cveUsuarioPortal, UsuarioActual.CveUsuario) Then
|
||||
' TieneError = True
|
||||
' Alert("Ocurrió un error al actualizar el usuario. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
' 'MANDA CORREO ACTIVACION
|
||||
' If Not TieneError Then
|
||||
' Dim ObjParametro As SisParametro = GlobalDTParametros(SisParametros.URL)
|
||||
' Dim Liga As String = ObjParametro.Cadena1 & "LogIn.aspx"
|
||||
' Dim LigaActivar = Liga & "?p=" & Encripta("CveU=" & cveUsuarioPortal & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks & "&CveE=" & UsuarioActual.CveEmpresa)
|
||||
|
||||
' Dim ObjMail As New ClsSisMail()
|
||||
|
||||
' If dr("Correo").ToString <> "" Then
|
||||
' Dim Correos As String() = dr("Correo").ToString.Split(New Char() {";"c})
|
||||
' Dim Texto = ""
|
||||
' For Each Correo As String In Correos
|
||||
' Texto = String.Format("Direccion de Acceso: <a href='{0}' target='_blank'>Portal del Proveedor</a><br>Usuario: {2}<br>Haga click para activar su cuenta <a href='{3}' target='_blank'>Activar</a>", Liga, CveProveedor, dr("Usuario").ToString, LigaActivar)
|
||||
' 'If Not ObjMail.MandaCorreo(EmpresaNotificaciones, Correo, "Activación de cuenta", "", "", {""}, Texto) Then
|
||||
' If Not ObjMail.SendMail(EmpresaNotificaciones, Correo, "Activación de cuenta", Texto) Then
|
||||
' Alert("Error al mandar el correo. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' Else
|
||||
' Alert("No se ha registrado ningún correo al usuario.", TipoMensaje.MsgAdvertencia)
|
||||
' TieneError = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If Not TieneError Then
|
||||
' Usuario.Commit()
|
||||
' ViewState("DTUsuariosProveedor") = Usuario.DtResultados
|
||||
' Alert(String.Format("Se envio correo al usuario y se restablecio contraseña .<br> La nueva contraseña es: ""{0}""", ContraseñaPredeterminada), TipoMensaje.MsgInformacion)
|
||||
' Else
|
||||
' Usuario.RollBack()
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' Usuario.Dispose()
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
''Eliminar Usuarios
|
||||
'Protected Sub GvUsuariosPortal_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GvUsuariosPortal.RowDeleting
|
||||
' Dim Usuario As New ClsSisUsuarios
|
||||
' If Usuario.RemoveUsuarioPortal(GvUsuariosPortal.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then
|
||||
' GvUsuariosPortal.EditIndex = -1
|
||||
' ViewState("DTUsuariosProveedor") = Usuario.DtResultados
|
||||
' End If
|
||||
' Usuario.Dispose()
|
||||
' Alert("Usuario Eliminado")
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
''Agregar Usuario
|
||||
'Protected Sub LnkAgregarUsuario_Click(sender As Object, e As EventArgs) Handles LnkAgregarUsuario.Click
|
||||
' Dim ObjUsuario As New ClsSisUsuarios
|
||||
' Dim CvePlataforma As Integer = 7
|
||||
|
||||
' ObjUsuario.IniciaTransacSQL()
|
||||
|
||||
' Dim CveUsuario As Integer = ObjUsuario.AddUsuarioPortal(TxtCorreo.Text.Trim, ContraseñaPredeterminadaEncriptada, TxtNombrePortal.Text.Trim, TxtCorreo.Text.Trim, -1, CveProveedor, CvePlataforma, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
' If CveUsuario > 0 Then
|
||||
' If ObjUsuario.UpdateUsuariosModulos(CveUsuario, 1201, True, UsuarioActual.CveUsuario) Then
|
||||
' If ObjUsuario.GetUsuariosPortal(-1, -1, CveProveedor) Then
|
||||
' ViewState("DTUsuariosProveedor") = ObjUsuario.DtResultados.FiltraParametros("Nombre <> 'Admin' AND CveUsuario <> " & UsuarioActual.CveUsuario)
|
||||
' End If
|
||||
|
||||
' TxtNombrePortal.Text = ""
|
||||
' TxtCorreo.Text = ""
|
||||
' Alert("Usuario Creado.<br>El usuario accesará con la contraseña '" & ContraseñaPredeterminada & "'")
|
||||
' ObjUsuario.Commit()
|
||||
' Else
|
||||
' ObjUsuario.RollBack()
|
||||
' End If
|
||||
' Else
|
||||
' ObjUsuario.RollBack()
|
||||
' Alert("No se ha podido registrar al nuevo Usuario, Verifique si el Usuario ya está registrado")
|
||||
' End If
|
||||
|
||||
' ObjUsuario.Dispose()
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
|
||||
'Private Sub CargaUsuariosPortal()
|
||||
' Dim ObjUsrs As New ClsSisUsuarios()
|
||||
' If ObjUsrs.GetUsuariosPortal(-1, -1, CveProveedor) Then
|
||||
' Dim dtUsr As DataTable = ObjUsrs.DtResultados
|
||||
' 'Dim dr As DataRow = dtUsr.FiltroPrimero(String.Format("CveUsuario = {0}", UsuarioActual.CveUsuario))
|
||||
' 'If dr IsNot Nothing Then
|
||||
|
||||
' ' If True Then TabHistorial.Visible = True 'dr("Permiso1").ToString = "True"
|
||||
' ' If True Then TabCxP.Visible = True
|
||||
' ' If True Then TabAnticipos.Visible = True
|
||||
' ' If True Then TabBancos.Visible = True
|
||||
' ' If True Then TabSistema.Visible = True
|
||||
|
||||
' 'End If
|
||||
|
||||
' 'dtUsr = dtUsr '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
|
||||
|
||||
' ViewState("OrdenUsuarios") = ""
|
||||
' GvUsuariosPortal.DataSource = dtUsr
|
||||
' ViewState("DTUsuariosProveedor") = dtUsr
|
||||
' Else
|
||||
' GvUsuariosPortal.DataSource = Nothing
|
||||
' ViewState("DTUsuariosProveedor") = Nothing
|
||||
' End If
|
||||
' ObjUsrs.Dispose()
|
||||
' GvUsuariosPortal.DataBind()
|
||||
'End Sub
|
||||
|
||||
|
||||
'Private Sub CargaGridUsuarios(Orden As String)
|
||||
' If CType(ViewState("DTUsuariosProveedor"), DataTable).Rows.Count > 0 Then
|
||||
' If Orden <> String.Empty Then
|
||||
' Dim DV As New DataView(CType(ViewState("DTUsuariosProveedor"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
' GvUsuariosPortal.DataSource = DV.ToTable() '.FiltraParametros("Nombre <> 'Administrador' AND CveUsuario <> " & UsuarioActual.CveUsuario)
|
||||
' DV.Dispose()
|
||||
' Else
|
||||
' GvUsuariosPortal.DataSource = CType(ViewState("DTUsuariosProveedor"), DataTable) '.FiltraParametros("Nombre <> 'Administrador' AND CveUsuario <> " & UsuarioActual.CveUsuario)
|
||||
' End If
|
||||
' End If
|
||||
' GvUsuariosPortal.DataBind()
|
||||
' UPPUsuarios.Update()
|
||||
'End Sub
|
||||
|
||||
''ajustar el tamaño de las celdas de la GvUsuarios Portal
|
||||
'Protected Sub GvUsuariosPortal_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuariosPortal.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
' 'El usuario Admin no se puede editar ni eliminar
|
||||
' If e.Row.DataKey("Nombre") = "Admin" Then
|
||||
' e.Row.FCLinkButton("imgE").Visible = False
|
||||
' e.Row.FCLinkButton("imgD").Visible = False
|
||||
' e.Row.FCLinkButton("imgC").Visible = False
|
||||
' End If
|
||||
|
||||
' If e.Row.RowIndex = 0 Then
|
||||
' '' e.Row.Cells(0).Width = Unit.Pixel(120)
|
||||
' 'e.Row.Cells(0).Width = Unit.Pixel(120)
|
||||
' 'e.Row.Cells(1).Width = Unit.Pixel(150)
|
||||
' 'e.Row.Cells(2).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(3).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(4).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(5).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(6).Width = Unit.Pixel(55)
|
||||
' 'e.Row.Cells(7).Width = Unit.Pixel(55)
|
||||
|
||||
' 'e.Row.Cells(8).Width = Unit.Pixel(75)
|
||||
' 'e.Row.Cells(9).Width = Unit.Pixel(100)
|
||||
' 'e.Row.Cells(10).Width = Unit.Pixel(150)
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
''Editar usuarios
|
||||
'Protected Sub GvUsuariosPortal_RowEditing(ByVal sender As Object, ByVal e As GridViewEditEventArgs) Handles GvUsuariosPortal.RowEditing
|
||||
' GvUsuariosPortal.EditIndex = e.NewEditIndex
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Protected Sub GvUsuariosPortal_RowUpdating(ByVal sender As Object, ByVal e As GridViewUpdateEventArgs) Handles GvUsuariosPortal.RowUpdating
|
||||
' Dim ObjUsuario As New ClsSisUsuarios
|
||||
' Dim Nombre, Correo As String
|
||||
' Dim Estatus As Boolean
|
||||
' Dim gvr As GridViewRow = GvUsuariosPortal.Rows(e.RowIndex)
|
||||
|
||||
' 'Usuario = gvr.FCLiteral("LtlUUsuario").Text.Trim
|
||||
' Nombre = gvr.FCTextBox("TxtUsuarioPortalEdit").Text.Trim
|
||||
' Correo = gvr.FCTextBox("TxtCorreoEdit").Text.Trim
|
||||
' Estatus = gvr.FCCheckBox("ChkEstatus").Checked
|
||||
|
||||
' Dim CveUsuarioPortal As Integer = gvr.DataKey("CveUsuario").ToEntero
|
||||
' Dim pCveProveedor As Integer = gvr.DataKey("CveProveedor").ToEntero
|
||||
|
||||
' If ObjUsuario.UpdateUsuarioPortal(Correo, Nombre, Correo, Estatus, "-1", -1, CveProveedor, CveUsuarioPortal, UsuarioActual.CveUsuario) Then
|
||||
' GvUsuariosPortal.EditIndex = -1
|
||||
' ObjUsuario.GetUsuariosPortal(-1, -1, CveProveedor) '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
|
||||
' ViewState("DTUsuariosProveedor") = ObjUsuario.DtResultados
|
||||
' End If
|
||||
' ObjUsuario.Dispose()
|
||||
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
''Cancelar Edición
|
||||
'Protected Sub GvUsuariosPortal_RowCancelingEdit(ByVal sender As Object, ByVal e As GridViewCancelEditEventArgs) Handles GvUsuariosPortal.RowCancelingEdit
|
||||
' GvUsuariosPortal.EditIndex = -1
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
''Restablecer contraseña
|
||||
'Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
|
||||
|
||||
' If e.CommandName = "RestablecerContraseña" Then
|
||||
' Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString.ToEntero
|
||||
' Dim Usuario As New ClsSisUsuarios
|
||||
' If Usuario.GetUsuariosPortal(cveUsuarioPortal, -1, -1) Then
|
||||
' Dim dr As DataRow = Usuario.DtResultados.FiltroPrimero("")
|
||||
|
||||
' If Usuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, CType(dr("Estatus"), Boolean), ContraseñaPredeterminadaEncriptada, -1, CveProveedor, cveUsuarioPortal, UsuarioActual.CveUsuario) Then
|
||||
' GvUsuariosPortal.EditIndex = -1
|
||||
' ViewState("DTUsuariosProveedor") = Usuario.DtResultados '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
|
||||
' Alert("Contraseña Restablecida.<br> La nueva contraseña es: """ & ContraseñaPredeterminada & "")
|
||||
' End If
|
||||
' End If
|
||||
' Usuario.Dispose()
|
||||
' End If
|
||||
|
||||
' If e.CommandName = "ReenviarCorreo" Then
|
||||
' Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString.ToEntero
|
||||
' Dim Usuario As New ClsSisUsuarios
|
||||
' Usuario.IniciaTransacSQL()
|
||||
' Dim TieneError = False
|
||||
|
||||
' If Usuario.GetUsuariosPortal(cveUsuarioPortal, -1, -1) Then
|
||||
' Dim dr As DataRow = Usuario.DtResultados.FiltroPrimero("")
|
||||
|
||||
' 'ACTUALIZA USUARIO, CONTRASEÑA Y ESTATUS
|
||||
' If Not Usuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, True, ContraseñaPredeterminadaEncriptada, -1, CveProveedor, cveUsuarioPortal, UsuarioActual.CveUsuario) Then
|
||||
' TieneError = True
|
||||
' Alert("Ocurrió un error al actualizar el usuario. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
' 'MANDA CORREO ACTIVACION
|
||||
' If Not TieneError Then
|
||||
' Dim ObjParametro As SisParametro = GlobalDTParametros(SisParametros.URL)
|
||||
' Dim Liga As String = ObjParametro.Cadena1 & "LogIn.aspx"
|
||||
' Dim LigaActivar = Liga & "?p=" & Encripta("CveU=" & cveUsuarioPortal & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks & "&CveE=" & UsuarioActual.CveEmpresa)
|
||||
|
||||
' Dim ObjMail As New ClsSisMail()
|
||||
|
||||
' If dr("Correo").ToString <> "" Then
|
||||
' Dim Correos As String() = dr("Correo").ToString.Split(New Char() {";"c})
|
||||
' Dim Texto = ""
|
||||
' For Each Correo As String In Correos
|
||||
' Texto = String.Format("Direccion de Acceso: <a href='{0}' target='_blank'>Portal del Proveedor</a><br>Usuario: {2}<br>Haga click para activar su cuenta <a href='{3}' target='_blank'>Activar</a>", Liga, CveProveedor, dr("Usuario").ToString, LigaActivar)
|
||||
' 'If Not ObjMail.MandaCorreo(EmpresaNotificaciones, Correo, "Activación de cuenta", "", "", {""}, Texto) Then
|
||||
' If Not ObjMail.SendMail(EmpresaNotificaciones, Correo, "Activación de cuenta", Texto) Then
|
||||
' Alert("Error al mandar el correo. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' Else
|
||||
' Alert("No se ha registrado ningún correo al usuario.", TipoMensaje.MsgAdvertencia)
|
||||
' TieneError = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If Not TieneError Then
|
||||
' Usuario.Commit()
|
||||
' ViewState("DTUsuariosProveedor") = Usuario.DtResultados
|
||||
' Alert(String.Format("Se envio correo al usuario y se restablecio contraseña .<br> La nueva contraseña es: ""{0}""", ContraseñaPredeterminada), TipoMensaje.MsgInformacion)
|
||||
' Else
|
||||
' Usuario.RollBack()
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' Usuario.Dispose()
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
''Eliminar Usuarios
|
||||
'Protected Sub GvUsuariosPortal_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GvUsuariosPortal.RowDeleting
|
||||
' Dim Usuario As New ClsSisUsuarios
|
||||
' If Usuario.RemoveUsuarioPortal(GvUsuariosPortal.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then
|
||||
' GvUsuariosPortal.EditIndex = -1
|
||||
' ViewState("DTUsuariosProveedor") = Usuario.DtResultados
|
||||
' End If
|
||||
' Usuario.Dispose()
|
||||
' Alert("Usuario Eliminado")
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
''Agregar Usuario
|
||||
'Protected Sub LnkAgregarUsuario_Click(sender As Object, e As EventArgs) Handles LnkAgregarUsuario.Click
|
||||
' Dim ObjUsuario As New ClsSisUsuarios
|
||||
' Dim CvePlataforma As Integer = 7
|
||||
|
||||
' ObjUsuario.IniciaTransacSQL()
|
||||
|
||||
' Dim CveUsuario As Integer = ObjUsuario.AddUsuarioPortal(TxtCorreo.Text.Trim, ContraseñaPredeterminadaEncriptada, TxtNombrePortal.Text.Trim, TxtCorreo.Text.Trim, -1, CveProveedor, CvePlataforma, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
' If CveUsuario > 0 Then
|
||||
' If ObjUsuario.UpdateUsuariosModulos(CveUsuario, 1201, True, UsuarioActual.CveUsuario) Then
|
||||
' If ObjUsuario.GetUsuariosPortal(-1, -1, CveProveedor) Then
|
||||
' ViewState("DTUsuariosProveedor") = ObjUsuario.DtResultados.FiltraParametros("Nombre <> 'Admin' AND CveUsuario <> " & UsuarioActual.CveUsuario)
|
||||
' End If
|
||||
|
||||
' TxtNombrePortal.Text = ""
|
||||
' TxtCorreo.Text = ""
|
||||
' Alert("Usuario Creado.<br>El usuario accesará con la contraseña '" & ContraseñaPredeterminada & "'")
|
||||
' ObjUsuario.Commit()
|
||||
' Else
|
||||
' ObjUsuario.RollBack()
|
||||
' End If
|
||||
' Else
|
||||
' ObjUsuario.RollBack()
|
||||
' Alert("No se ha podido registrar al nuevo Usuario, Verifique si el Usuario ya está registrado")
|
||||
' End If
|
||||
|
||||
' ObjUsuario.Dispose()
|
||||
' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
|
||||
' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
|
||||
' Else
|
||||
' CargaGridUsuarios("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
'Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
' Dim Orden As String = ""
|
||||
' Dim Campo As String = ""
|
||||
' Dim Literal As Literal = Nothing
|
||||
' Const OrdenInicial As String = ""
|
||||
' Dim Arg(2) As String
|
||||
|
||||
' Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
' Campo = Arg(0)
|
||||
' Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
' If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
' ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
' Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
' Else
|
||||
' ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
' Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
' End If
|
||||
' Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
' ViewState("Orden") = Orden
|
||||
' CargaGridUsuarios(Orden)
|
||||
'End Sub
|
||||
|
||||
'Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
' Dim Orden As String = ""
|
||||
' Dim Campo As String = ""
|
||||
' Dim Literal As Literal = Nothing
|
||||
' Const OrdenInicial As String = ""
|
||||
' Dim Arg(2) As String
|
||||
|
||||
' Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
' Campo = Arg(0)
|
||||
' Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
' If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
' ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
' Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
' Else
|
||||
' ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
' Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
' End If
|
||||
' Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
' ViewState("Orden") = Orden
|
||||
' CargaGridUsuarios(Orden)
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " BANCOS"
|
||||
Protected Sub BtnExcelGvBancosCuentas_Click(sender As Object, e As EventArgs)
|
||||
Dim retorno As Byte() = ImprimirReporteGvBancosCuentas("EXCEL")
|
||||
|
||||
@@ -829,7 +829,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpUniformesResguardo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvUniformesResguardo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" DataKeyNames="CveAlmacen,CodigoPS,PU,CveUM,CveMovimiento,CveMovimientoDetalle,CvePS,AplicaSeccion,AplicaSerie,CveSeccionAlmacen" ToolTip=""
|
||||
<asp:GridView ID="GvUniformesResguardo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" DataKeyNames="CveAlmacen,CodigoPS,PU,CveUM,CveMovimiento,CveMovimientoDetalle,CvePS,AplicaSeccion,AplicaSerie,CveSeccionAlmacen,Cantidad" ToolTip=""
|
||||
CssClass="table table-hover table-advance Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CveMovimiento" Target="_blank" HeaderText="Folio" DataNavigateUrlFormatString="../Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataTextField="Folio" />
|
||||
@@ -3869,23 +3869,43 @@
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UPPLiberarUniforme" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="width: 75%;">
|
||||
<asp:Label Text="Almacen: " runat="server" Style="width: 20%" />
|
||||
<asp:DropDownList runat="server" ID="DdlAlmacenDestinoLiberarUniforme" CssClass="form-control input-sm select2me" Style="width: 50%" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
||||
<div class="row" style="width: 100%;">
|
||||
<div class="col-md-1" style="width:30%;text-align:right">
|
||||
<asp:Label Text="Almacen: " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-1" style="width:70%">
|
||||
<asp:DropDownList runat="server" ID="DdlAlmacenDestinoLiberarUniforme" Width="100%" CssClass="form-control input-sm select2me" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="divSeccionAlmacen" class="frow" visible="false">
|
||||
<asp:Label Text="Sección: " runat="server" Style="width: 20%" />
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 50% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<div runat="server" id="divSeccionAlmacen" class="row" style="width: 100%;" visible="false">
|
||||
<div class="col-md-1" style="width:30%;text-align:right">
|
||||
<asp:Label Text="Sección: " runat="server" />
|
||||
</div>
|
||||
<div class="col-md-1" style="width:70%">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" Width="100%" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row" style="width: 100%;">
|
||||
<div class="col-md-1" style="width:30%;text-align:right">
|
||||
<asp:Label runat="server" ID="LblCantidadResguardo">Cantidad:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width:70%">
|
||||
<asp:TextBox runat="server" ID="TxtCantidadResguardo" CssClass="form-control " Width="100%"></asp:TextBox>
|
||||
<asp:RangeValidator ID="RvTxtCantidadResguardo" Display="Dynamic" ControlToValidate="TxtCantidadResguardo" runat="server" MinimumValue="0" MaximumValue="1" Type="Integer" ErrorMessage="Se supera la cantidad maxima disponibled" ValidationGroup="GpoResguardo"></asp:RangeValidator>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnLiberarUniforme" runat="server" OnClick="LiberarUniforme" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<asp:Button ID="BtnLiberarUniforme" runat="server" OnClick="LiberarUniforme" ClientIDMode="Static" Text="Guardar" ValidationGroup="GpoResguardo" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -5111,7 +5111,7 @@ Partial Class RH_Personal
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetResguardoUniformesRep(UsuarioActual.CveEmpresa, CvePersonal, -1, -1, Todo:=True) Then
|
||||
If ObjInv.GetResguardoUniformesRep(UsuarioActual.CveEmpresa, CvePersonal, -1, -1, Todo:=False) Then
|
||||
GvUniformesResguardo.DataSource = ObjInv.DtResultados
|
||||
UniformesInfo = ObjInv.DtResultados
|
||||
Else
|
||||
@@ -5149,6 +5149,9 @@ Partial Class RH_Personal
|
||||
CvePS = row.DataKey("CvePS").ToString().ToEntero
|
||||
CveMovimientoUniforme = row.DataKey("CveMovimiento").ToString().ToEntero
|
||||
CveMovimientoDetalleUniforme = row.DataKey("CveMovimientoDetalle").ToString().ToEntero
|
||||
Dim Cantidad As Integer = row.DataKey("Cantidad").ToString().ToEntero
|
||||
TxtCantidadResguardo.Text = Cantidad.ToString
|
||||
RvTxtCantidadResguardo.MaximumValue = Cantidad.ToString
|
||||
If row.DataKey("AplicaSeccion").ToString = "True" Then
|
||||
divSeccionAlmacen.Visible = True
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
@@ -5174,11 +5177,13 @@ Partial Class RH_Personal
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
ObjInventario.IniciaTransacSQL()
|
||||
|
||||
Dim Cantidad As Double = TxtCantidadResguardo.Text.ToDouble()
|
||||
|
||||
Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
|
||||
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, 1.0, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
|
||||
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
|
||||
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||
Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
|
||||
Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, 1.0, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen)
|
||||
Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen)
|
||||
|
||||
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
|
||||
ObjInventario.Commit()
|
||||
|
||||
@@ -2378,6 +2378,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Archivos</HeaderTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"/>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplXML" runat="server" Visible="false" Target="_blank"><i class='fa fa-file-excel-o' style="font-weight:bold;"></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="HplPDF" runat="server" Visible="false" Target="_blank"><i class='fa fa-file-pdf-o' style="font-weight:bold;"></i></asp:HyperLink>
|
||||
@@ -2385,6 +2386,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Reenviar Complemento</HeaderTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"/>
|
||||
<ItemTemplate>
|
||||
<%-- <a id="HLSendMail" runat="server" class="Texto" visible="false">
|
||||
<i class="fa fa-envelope fa-2" aria-hidden="true"></i>
|
||||
|
||||
@@ -2013,6 +2013,7 @@ Partial Class Clientes
|
||||
ObjBancos.Dispose()
|
||||
End If
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveVenta") = "" And e.Row.DBCampo("Banco") = "" Then
|
||||
@@ -6328,6 +6329,7 @@ Partial Class Clientes
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("AgrupadoPor", String.Format("<b>Cliente: </b>{0}", TxtNombreComercial.Text)))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
|
||||
If Imagen.Exists Then
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" data-sort="true" Width="99%"
|
||||
DataKeyNames="CveCliente,CveMoneda,Saldo,Folio,CveVenta,NombreComercial,CveVentaAmortizacion,SerieFolioAmortizacion,SerieFolio,Total,
|
||||
Fecha,FechaAmortizacion,SubTotal,SubTotalAmortizacion,ImporteAmortizacion,CveIE,Tipo,SaldoAcumulativo">
|
||||
Fecha,FechaAmortizacion,SubTotal,SubTotalAmortizacion,ImporteAmortizacion,CveIE,Tipo,SaldoAcumulativo,CveSubProyecto">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -358,17 +358,23 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
CveCuenta = ObjConta.DtResultados.Rows[0]["CveCuentaCliente"].ToString().ToEntero();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, Gv.DataKey("Saldo").ToDouble(), Gv.DataKey("Saldo").ToDouble(), Gv.DataKey("CveMoneda").ToEntero(), TxtFecha.Text.ToDate(), "Saldo de NC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Saldo, Gv.DataKey("Folio").ToString(), ConceptoContable2, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, CveIE, CveVenta, CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteMX: Saldo, CveCuenta: CveCuenta))
|
||||
{
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveCuenta: -1))
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveCuenta: -1, CveSubProyecto: Gv.DataKey("CveSubProyecto").ToEntero()))
|
||||
{
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3771,6 +3771,7 @@ Partial Class Ventas
|
||||
InicializaDTAnticiposAmortizacion()
|
||||
ChkAplicaNCAnticipo.Enabled = False
|
||||
Else
|
||||
ChkAplicaNCAnticipo.Enabled = False
|
||||
ChkAplicaNCAnticipo.Checked = False
|
||||
End If
|
||||
'If DbRowVenta("SaldoAnticipo").ToString().ToDouble <= 0 Then ChkAplicaNCAnticipo.Checked = False : ChkAplicaNCAnticipo.Enabled = False
|
||||
@@ -16656,6 +16657,7 @@ Partial Class Ventas
|
||||
' End If
|
||||
'End If
|
||||
'Creamos el movimiento
|
||||
|
||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
|
||||
CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Vta/E4")
|
||||
|
||||
@@ -16680,7 +16682,7 @@ Partial Class Ventas
|
||||
Dim Serie As String = MovDet("Serie").ToString()
|
||||
Dim Lote As String = MovDet("Lote").ToString()
|
||||
Dim FechaCaducidad As Date = MovDet("FechaCaducidad").ToString.ToDate
|
||||
Dim CveSeccionAlmacen As Integer = MovDet("CveSeccionAlmacen").ToString.ToEntero
|
||||
Dim CveSeccionAlmacen As Integer = -3 'SE DEBE CALCULAR LA SECCION EL EN TRIGGER DE INVENTARIOS
|
||||
Dim Consec As Integer = DtRemisionesTmpDT.FiltroPrimeroValor("Consec", $"CveVentaDetalle = {MovDet("CveVentaDetalle").ToString()}").ToEntero()
|
||||
|
||||
'COMIENZA: VENTADETALLE
|
||||
@@ -22703,7 +22705,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function CargaDtImpuestosNC(CveVentaNC As Integer, Importe As Decimal, Optional NCDescuento As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional NivelTotal As Integer = 1) As DataTable
|
||||
Dim Total As Decimal = 0, SubTotal As Decimal = 0, Saldo As Decimal = 0
|
||||
|
||||
@@ -22750,9 +22751,13 @@ Partial Class Ventas
|
||||
Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100
|
||||
Dim FiltroStr As String = ""
|
||||
Dim importePuTemp As Decimal = 0
|
||||
Dim TotalImpuestosLocales As Decimal = 0
|
||||
Dim TotalImpuestosLocalesVentaOriginal As Decimal = 0
|
||||
Dim TotalImpuestosLocalesRecalculado As Decimal = 0
|
||||
|
||||
'CALCULA LO EQUIVALENTE EN IMPUSTOS LOCALES
|
||||
If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.Rows.Count > 0 Then
|
||||
TotalImpuestosLocales = TmpDTImpuestos.SUM("Importe").ToDecimal()
|
||||
TotalImpuestosLocalesVentaOriginal = TmpDTImpuestos.SUM("Importe").ToDecimal()
|
||||
TotalImpuestosLocalesRecalculado = TotalImpuestosLocalesVentaOriginal * Porcentaje
|
||||
End If
|
||||
|
||||
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
||||
@@ -22760,7 +22765,7 @@ Partial Class Ventas
|
||||
importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr).ToDecimal() - TmpDT.SUM("Descuento", FiltroStr).ToDecimal()))
|
||||
|
||||
If Not AplicaImpuestosLocales Then
|
||||
importePuTemp = importePuTemp - TotalImpuestosLocales
|
||||
importePuTemp = importePuTemp - TotalImpuestosLocalesVentaOriginal
|
||||
End If
|
||||
|
||||
Dr("ImporteTotal") = importePuTemp.RoundSQL(2)
|
||||
@@ -22780,9 +22785,11 @@ Partial Class Ventas
|
||||
Next
|
||||
|
||||
Dim importeNC = (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR"))
|
||||
|
||||
If AplicaImpuestosLocales Then
|
||||
Importe = Importe + TotalImpuestosLocales
|
||||
Importe = Importe + TotalImpuestosLocalesRecalculado
|
||||
End If
|
||||
|
||||
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
|
||||
Dim difTmp As Decimal = Importe - importeNC
|
||||
|
||||
@@ -22800,7 +22807,6 @@ Partial Class Ventas
|
||||
'CargaNCDT(CveVentaNC, Importe.ToDecimal)
|
||||
Return DtImpuestosLocal
|
||||
End Function
|
||||
|
||||
Private Sub AgregaTempDT(ByRef TmpDT As DataTable, CvePS As Integer, PS As String, Codigo As String, CodigoPS As String, CveTipoPS As Integer, CveTipoInvPS As Integer, CveUM As Integer, UM As String,
|
||||
CveClasificacion As Integer, Clasificacion As String, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
|
||||
Obs As String, Cantidad As Double, PU As Double, PorcentajeIVA As Double, ImporteIVA As Double, PorcentajeRetIVA As Double, ImporteRetIVA As Double,
|
||||
@@ -25932,39 +25938,39 @@ Partial Class Ventas
|
||||
If CveVenta <= 0 OrElse EsCreaApartirDe Then
|
||||
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
|
||||
For Each RowServicio As DataRow In TmpDT.Rows
|
||||
Dim tClienteRetIVA = ClienteRetIVA
|
||||
If tClienteRetIVA <= 0 Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
tClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
tClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
|
||||
tClienteRetIVA = 0.06D
|
||||
End If
|
||||
ViewState("ClienteRetIVA") = tClienteRetIVA
|
||||
For Each RowServicio As DataRow In TmpDT.Rows
|
||||
Dim tClienteRetIVA = ClienteRetIVA
|
||||
If tClienteRetIVA <= 0 Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
tClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
tClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
|
||||
tClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal()
|
||||
RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL()
|
||||
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
|
||||
|
||||
Next
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
|
||||
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||
If PorcentajeRetIVA > 0 Then
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
UsuarioActual.Empresa.MostrarRetIVA = True
|
||||
DdlTipoRetencion.Visible = True
|
||||
ViewState("ClienteRetIVA") = tClienteRetIVA
|
||||
End If
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal()
|
||||
RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL()
|
||||
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
|
||||
|
||||
Next
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
|
||||
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||
If PorcentajeRetIVA > 0 Then
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
UsuarioActual.Empresa.MostrarRetIVA = True
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
UpPS.Update()
|
||||
@@ -26137,10 +26143,8 @@ Partial Class Ventas
|
||||
|
||||
Private Sub GuardarValoresEditados()
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(),
|
||||
TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim, UsuarioActual.CveEmpresa, CveVenta, DdlMetodoPago33.SelectedValue.ToEntero, DdlFormaPago33.SelectedValue.ToEntero,
|
||||
TipoDocto:=DdlTipoComprobante.SelectedValue, OrdenCompra:=TxtOrdenCompra.Text, PedidoContrato:=TxtPedidoContrato.Text, ObsAlm:=TxtObsAlmacen.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero,
|
||||
CorreoNot:=TxtCorreoNotificaciones.Text, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||
If ObjVentas.UpdateObservacionesVenta(CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text) Then
|
||||
CargaVenta()
|
||||
BtnEditar.Text = "Editar"
|
||||
Alert("Actualizado correctamente")
|
||||
@@ -26161,7 +26165,7 @@ Partial Class Ventas
|
||||
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
|
||||
DtDatos = ObjMovtos.DtResultados
|
||||
DTDatos = ObjMovtos.DtResultados
|
||||
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
||||
Else
|
||||
GVAuxiliar.DataSource = Nothing
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net40" />
|
||||
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
||||
<package id="Microsoft.IdentityModel.JsonWebTokens" version="5.3.0" targetFramework="net45" />
|
||||
<package id="Microsoft.IdentityModel.Logging" version="5.3.0" targetFramework="net45" />
|
||||
<package id="Microsoft.IdentityModel.Tokens" version="5.3.0" targetFramework="net45" />
|
||||
<package id="Microsoft.IdentityModel.JsonWebTokens" version="6.7.1" targetFramework="net45" />
|
||||
<package id="Microsoft.IdentityModel.Logging" version="6.7.1" targetFramework="net45" />
|
||||
<package id="Microsoft.IdentityModel.Tokens" version="6.7.1" targetFramework="net45" />
|
||||
<package id="Microsoft.Owin" version="4.1.0" targetFramework="net45" />
|
||||
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net45" />
|
||||
<package id="Microsoft.Owin.Security" version="4.1.0" targetFramework="net45" />
|
||||
@@ -37,6 +37,6 @@
|
||||
<package id="NuGet.Core" version="2.8.0" targetFramework="net4" />
|
||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||
<package id="StackExchange.Redis.StrongName" version="1.0.488" targetFramework="net40" />
|
||||
<package id="System.IdentityModel.Tokens.Jwt" version="5.3.0" targetFramework="net45" />
|
||||
<package id="System.IdentityModel.Tokens.Jwt" version="6.7.1" targetFramework="net45" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net40" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user