Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
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"));
|
||||
}
|
||||
}
|
||||
@@ -39,15 +39,21 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Registro Revisión
|
||||
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">
|
||||
|
||||
@@ -90,9 +96,7 @@
|
||||
</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>
|
||||
@@ -100,13 +104,13 @@
|
||||
<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="30"></asp:TextBox>
|
||||
<%-- <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>
|
||||
@@ -125,28 +129,43 @@
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" >
|
||||
|
||||
<ajax:TabPanel ID="TabMaterial" runat="server" HeaderText="Materia">
|
||||
<ajax:TabPanel ID="TabMaterial" runat="server" HeaderText="Material">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvMaterial" 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>
|
||||
<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>
|
||||
|
||||
@@ -156,49 +175,73 @@
|
||||
<ajax:TabPanel ID="TabActividades" runat="server" HeaderText="Actividades">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:GridView ID="GvActividades" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames=""
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:UpdatePanel runat="server" ID="UpGvActividades" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Unidad")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<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>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<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">
|
||||
<ajax:TabPanel ID="TabCheckList" runat="server" HeaderText="Check List">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvCheckList" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames=""
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<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>
|
||||
<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>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -209,13 +252,60 @@
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -262,13 +352,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:center">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" Visible="false" />
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" Visible="true" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -12,20 +12,59 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
Property CveOrdenTrabajo As Integer
|
||||
Property CveTipoServicio As Integer
|
||||
Get
|
||||
If ViewState("CveOrdenTrabajo") Is Nothing Then
|
||||
If ViewState("CveTipoServicio") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveOrdenTrabajo").ToString.ToEntero
|
||||
Return ViewState("CveTipoServicio").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOrdenTrabajo") = value
|
||||
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
|
||||
@@ -34,8 +73,12 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
|
||||
If Request("CveOrdenTrabajo") IsNot Nothing Then
|
||||
CveOrdenTrabajo = Request("CveOrdenTrabajo").ToEntero
|
||||
If Request("CveTipoServicio") IsNot Nothing Then
|
||||
CveTipoServicio = Request("CveTipoServicio").ToEntero
|
||||
End If
|
||||
|
||||
If CveTipoServicio = -1 Then
|
||||
CrearTablas()
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
@@ -43,11 +86,57 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
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
|
||||
@@ -65,6 +154,52 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
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
|
||||
@@ -72,6 +207,7 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
'Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
' CargaDatos()
|
||||
@@ -85,6 +221,61 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -94,7 +285,6 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -110,9 +300,6 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -277,4 +464,154 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
|
||||
|
||||
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
|
||||
@@ -3995,6 +4005,167 @@ Public Class ClsAF
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3958,6 +3958,8 @@ Public Class ClsPaginas
|
||||
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)
|
||||
|
||||
@@ -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,12 +235,12 @@
|
||||
<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="Fecha" msprop:Generator_ColumnVarNameInTable="columnFecha" msprop:Generator_ColumnPropNameInRow="Fecha" msprop:Generator_ColumnPropNameInTable="FechaColumn" msprop:Generator_UserColumnName="Fecha" type="xs:string" 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="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: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" />
|
||||
@@ -256,7 +256,7 @@
|
||||
</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="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" />
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="191" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="7" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:DataTable1" ZOrder="13" X="511" Y="201" Height="143" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="139" />
|
||||
<Shape ID="DesignTable:VentaUtilidadDetalle" ZOrder="12" X="679" Y="199" Height="257" Width="187" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="253" />
|
||||
@@ -16,7 +16,7 @@
|
||||
<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="296" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="292" />
|
||||
<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>
|
||||
|
||||
@@ -467,6 +467,7 @@
|
||||
<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>
|
||||
|
||||
@@ -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"))
|
||||
@@ -6411,6 +6418,13 @@ Partial Class Compras_Compras
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'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, 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
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
@@ -6611,6 +6625,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
|
||||
@@ -10117,9 +10138,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
|
||||
@@ -11589,6 +11619,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 +18749,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 +19664,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
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -458,7 +458,7 @@ 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
|
||||
@@ -467,6 +467,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
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()
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -29,8 +29,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 />
|
||||
@@ -47,18 +47,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%" />
|
||||
@@ -83,7 +74,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>
|
||||
@@ -104,7 +95,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" />
|
||||
@@ -144,6 +135,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>
|
||||
|
||||
@@ -11,11 +11,12 @@ using System.Text;
|
||||
|
||||
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
|
||||
@@ -96,6 +97,8 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
Cargar();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "CARGAS"
|
||||
private void CargarCveDocumento()
|
||||
{
|
||||
@@ -107,6 +110,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
else
|
||||
{
|
||||
this.CveDocumento = -1;
|
||||
this.CveUsuarioResponsable = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +128,9 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
case "Publicado":
|
||||
Alert("Documento publicado");
|
||||
break;
|
||||
case "Rechazado":
|
||||
Alert("Documento rechazado");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,8 +164,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 != "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,7 +217,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();
|
||||
@@ -220,6 +230,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
}else
|
||||
{
|
||||
this.CveDocumento = -1;
|
||||
Alert("No se encontró el Documento", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
ObjOI.Dispose();
|
||||
@@ -246,7 +257,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;
|
||||
@@ -273,7 +284,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;
|
||||
@@ -284,8 +294,11 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
|
||||
private void ConfigurarSegunEstatus()
|
||||
{
|
||||
bool MostrarSegunAprobado = (DdlEstatus.SelectedValue == "2");
|
||||
DivBotonesAcciones.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);
|
||||
UpAgregar.Visible = MostrarSegunAprobado;
|
||||
}
|
||||
|
||||
@@ -310,12 +323,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()
|
||||
@@ -326,7 +336,6 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
CargarUsuarios();
|
||||
if (this.CveDocumento > 0)
|
||||
{
|
||||
EstatusMostrar(true);
|
||||
if (CargarDocumentoYaExistente())
|
||||
{
|
||||
CargarUsuariosParticipantes();
|
||||
@@ -335,6 +344,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
ConfigurarGridUsuariosParticipantes();
|
||||
ConfigurarCamposDetalleSegunUsuario();
|
||||
CargarMensajeNuevoEditado();
|
||||
MostrarBotonRechazar();
|
||||
}
|
||||
}
|
||||
ConfigurarSegunEstatus();
|
||||
@@ -344,39 +354,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)
|
||||
@@ -444,6 +460,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
{
|
||||
string Archivo = ActualizarArchivoEnDirectorio();
|
||||
ActualizarDocumentoYaExistente(Archivo);
|
||||
TxtDocumentoFile.Text = "";
|
||||
Cargar();
|
||||
UpCliente.Update();
|
||||
Alert("Documento actualizado");
|
||||
@@ -468,8 +485,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);
|
||||
}
|
||||
@@ -554,9 +571,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();
|
||||
@@ -658,7 +687,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)
|
||||
@@ -671,6 +709,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);
|
||||
@@ -685,14 +729,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
|
||||
|
||||
@@ -705,6 +751,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)
|
||||
@@ -728,7 +778,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;
|
||||
@@ -740,6 +790,12 @@ public partial class OI_DocumentoDetalle : ClsPaginas
|
||||
break;
|
||||
}
|
||||
}
|
||||
return Aprobado;
|
||||
}
|
||||
|
||||
protected void LkbPublicar_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool Aprobado = VerificarAprobaciónParticipantes();
|
||||
|
||||
if (Aprobado)
|
||||
{
|
||||
@@ -771,8 +827,21 @@ 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
|
||||
|
||||
#region "Rechazar"
|
||||
protected void LkbRechazar_Click(object sender, EventArgs e)
|
||||
{
|
||||
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
|
||||
}
|
||||
@@ -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>" />
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -25937,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()
|
||||
@@ -26166,7 +26167,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
|
||||
|
||||
Reference in New Issue
Block a user