Commit inicial Ventas Productivo
This commit is contained in:
1449
CRM/Acercamiento.aspx
Normal file
1449
CRM/Acercamiento.aspx
Normal file
File diff suppressed because it is too large
Load Diff
1476
CRM/Acercamiento.aspx.cs
Normal file
1476
CRM/Acercamiento.aspx.cs
Normal file
File diff suppressed because it is too large
Load Diff
104
CRM/CatEmpresasCRM.aspx
Normal file
104
CRM/CatEmpresasCRM.aspx
Normal file
@@ -0,0 +1,104 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatEmpresasCRM.aspx.cs" Inherits="CRM_CatEmpresasCRM" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
Catálogo de Empresas CRM
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:HyperLink ID="LnkAgregar" NavigateUrl="/CRM/EmpresaCRM.aspx" runat="server" Target="_blank"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Empresa</span></asp:HyperLink>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="PFiltros" class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" ValidationGroup="VGFiltro" />
|
||||
<%--<a href="javascript:;" class="expand"></a>--%>
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
<label class="col-md-1" id="LblDdlMedioCaptacion" runat="server" style="width: 120px; margin-top: 5px;">Medio Captación:</label>
|
||||
<div class="col-md-2" id="DivDdlMedioCaptacion" runat="server">
|
||||
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" Width="100%" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;"></div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;margin-bottom: 5px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveEmpresaCRM, Empresa, RFC, CveMedioCaptacion, MedioCaptacion, CveVendedorAsignado, Vendedor, NoContactos, NoAcercamientos, CveUsuarioIng, UsuarioIng, FechaIng" EmptyDataText="No se han registrado de Empresas"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true"
|
||||
GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Empresa" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplEmpresa" Target="_blank" runat="server" Text='<%# Eval("Empresa")%>' data-toggle="tooltip" title="Ir a Detalle"> </asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="RFC" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblRFC" runat="server" Text='<%# Eval("RFC")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Vendedor" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="MedioCaptacion" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblMedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Contactos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNoContactos" runat="server" Text='<%# Eval("NoContactos")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Acercamientos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNoAcercamientos" runat="server" Text='<%# Eval("NoAcercamientos")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:g}" />
|
||||
<asp:TemplateField HeaderText="Usuario que Ingresó" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" Visible="false" ItemStyle-Width="10%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplEditar" Target="_blank" runat="server" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:HyperLink>
|
||||
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Eliminar la Empresa tambien eliminara los Contacto de esta, seguro que desea continuar?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
109
CRM/CatEmpresasCRM.aspx.cs
Normal file
109
CRM/CatEmpresasCRM.aspx.cs
Normal file
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
|
||||
using Extensiones;
|
||||
|
||||
public partial class CRM_CatEmpresasCRM : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private DataTable TmpDT
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["TmpDT"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["TmpDT"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaMediosCaptacion();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGA DATOS"
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void CargaDatos()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, CveMedioCaptacion: DdlMedioCaptacion.SelectedValue.ToEntero()) && ObjCRM.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
TmpDT = ObjCRM.DtResultados;
|
||||
GVDatos.DataSource = TmpDT;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
GVDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
protected void CargaMediosCaptacion()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||
DdlMedioCaptacion.DataBind();
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "ACCIONES - GRIEDVIEW"
|
||||
protected void GVDatos_RowDeleting(object sender, GridViewDeleteEventArgs e)
|
||||
{
|
||||
int CveEmpresaCRM = GVDatos.Rows[e.RowIndex].DataKey("CveEmpresaCRM").ToEntero();
|
||||
Boolean HuboError = true;
|
||||
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
ObjCRM.IniciaTransacSQL();
|
||||
|
||||
if (ObjCRM.RemoveContactoEmpresa(-1, CveEmpresaCRM))
|
||||
{
|
||||
if (ObjCRM.RemoveEmpresaCRM(CveEmpresaCRM))
|
||||
{
|
||||
HuboError = false;
|
||||
Alert("La Empresa ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
|
||||
if (!HuboError) { ObjCRM.Commit(); } else { ObjCRM.RollBack(); }
|
||||
|
||||
ObjCRM.Dispose();
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
e.Row.FCHyperLink("HplEmpresa").NavigateUrl = String.Format("/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}", e.Row.DataKey("CveEmpresaCRM")) ;
|
||||
|
||||
if (e.Row.DataKey("NoContactos").ToEntero() > 0)
|
||||
{
|
||||
e.Row.FCLabel("lblNoContactos").Text = String.Format("<b>{0}</b>", e.Row.DataKey("NoContactos"));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
177
CRM/CatEtapasProceso.aspx
Normal file
177
CRM/CatEtapasProceso.aspx
Normal file
@@ -0,0 +1,177 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatEtapasProceso.aspx.cs" Inherits="CRM_CatEtapasProceso" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
Catálogo de Etapas de Procesos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Etapas de Proceso</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="PFiltros" class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" ValidationGroup="VGFiltro" />
|
||||
<%--<a href="javascript:;" class="expand"></a>--%>
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
<label class="col-md-1 " id="LblDdlFiltroProceso" runat="server" style="width: 90px; margin-top: 5px;">Proceso:</label>
|
||||
<div class="col-md-2" id="DivDdlFiltroProceso" runat="server">
|
||||
<asp:DropDownList ID="DdlFiltroProceso" runat="server" Width="100%" DataTextField="TipoProceso" DataValueField="CveTipoProceso" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 " id="LblDdlFiltroEstatus" runat="server" style="width: 90px; margin-top: 5px;">Estatus:</label>
|
||||
<div class="col-md-2" id="DivDdlFiltroEstatus" runat="server">
|
||||
<asp:DropDownList ID="DdlFiltroEstatus" runat="server" Width="100%" Class="table-group-action-input form-control input-inline input-sm select2me">
|
||||
<asp:ListItem Value="-1" Text="Todos"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Activo"></asp:ListItem>
|
||||
<asp:ListItem Value="0" Text="Inactivo"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;"></div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px; margin-bottom: 5px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveEtapaProceso, EtapaProceso, Descripcion, CveTipoProceso, TipoProceso, Estatus, CveEstatus, CveTipoEtapa, TipoEtapa, Orden, UsuarioIng, CveUsuarioIng, FechaIng" EmptyDataText="No se han registrado Etapas"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true"
|
||||
GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Proceso" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblProceso" runat="server" Text='<%# Eval("TipoProceso")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Orden" ItemStyle-Width="5%" HeaderText="No. Etapa" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Etapa" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEtapaProceso" runat="server" Text='<%# Eval("EtapaProceso")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo de Etapa" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTipoEtapa" runat="server" Text='<%# Eval("TipoEtapa")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEstatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="15%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:g}" />
|
||||
<asp:TemplateField HeaderText="Usuario que Ingresó" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar la Etapa del Proceso?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DivModal" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlModalTitulo" Text="Medio de Captación" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoProceso" Width="100%" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%=DdlTipoProceso.ClientID.ToString()%>">Tipo de Proceso:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoEtapa" Width="100%" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Value="1" Text="Inicial"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Proceso"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Terminado"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Cancelado"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%=DdlTipoEtapa.ClientID.ToString()%>">Tipo de Etapa:</label>
|
||||
</div>
|
||||
<div runat="server" id="DivOrden" class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlOrden" Width="100%" runat="server" DataTextField="Orden" DataValueField="Orden" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%=DdlOrden.ClientID.ToString()%>">Orden:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEtapaProceso" onkeyup="CompletaDescripcion(this);" MaxLength="30" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEtapaProceso" runat="server" ControlToValidate="TxtEtapaProceso" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo de Rechazo''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEtapaProceso.ClientID.ToString()%>">Etapa de Proceso:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" MaxLength="50" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" 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="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivEstatus" runat="server">
|
||||
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
function CompletaDescripcion(text) {
|
||||
$('#<%= TxtDescripcion.ClientID %>').val(text.value);
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
319
CRM/CatEtapasProceso.aspx.cs
Normal file
319
CRM/CatEtapasProceso.aspx.cs
Normal file
@@ -0,0 +1,319 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
|
||||
using Extensiones;
|
||||
|
||||
public partial class CRM_CatEtapasProceso : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private int EsEditar
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["EsEditar"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["EsEditar"] = value;
|
||||
}
|
||||
}
|
||||
private DataTable TmpDT
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["TmpDT"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["TmpDT"] = value;
|
||||
}
|
||||
}
|
||||
private DataTable DTProcesos
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTProcesos"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTProcesos"] = value;
|
||||
}
|
||||
}
|
||||
private int CveEtapaProceso
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveEtapaProceso"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveEtapaProceso"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int CveTipoProcesoSeleccionado
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveTipoProcesoSeleccionado"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveTipoProcesoSeleccionado"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int CveTipoEtapaSeleccionada
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveTipoEtapaSeleccionada"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveTipoEtapaSeleccionada"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CveTipoProcesoSeleccionado = -1;
|
||||
CveTipoEtapaSeleccionada = -1;
|
||||
CargaTiposProceso();
|
||||
CargaDatos(-1);
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGA DATOS"
|
||||
protected void CargaDatos(int CveTipoProceso)
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetEtapaProceso(UsuarioActual.CveEmpresa, CveTipoProceso, -1, DdlFiltroEstatus.SelectedValue.ToEntero()))
|
||||
{
|
||||
TmpDT = ObjCRM.DtResultados;
|
||||
GVDatos.DataSource = TmpDT;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
GVDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
protected void limpiarCamposModal()
|
||||
{
|
||||
if (EsEditar == 1)
|
||||
{
|
||||
LtlModalTitulo.Text = "Actualizar Etapa del Proceso";
|
||||
BtnGuardar.Text = "Actualizar";
|
||||
DivEstatus.Visible = true;
|
||||
|
||||
DdlTipoProceso.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
LtlModalTitulo.Text = "Agregar Etapa al Proceso";
|
||||
BtnGuardar.Text = "Guardar";
|
||||
DivEstatus.Visible = false;
|
||||
|
||||
DdlTipoProceso.SelectedValueExist("1");
|
||||
DdlTipoEtapa.SelectedValueExist("1");
|
||||
|
||||
DdlTipoProceso.Enabled = true;
|
||||
}
|
||||
TxtEtapaProceso.Text = "";
|
||||
TxtDescripcion.Text = "";
|
||||
ChkEstatus.Checked = true;
|
||||
}
|
||||
|
||||
protected void CargaTiposProceso()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||
DTProcesos = ObjCRM.DtResultados;
|
||||
|
||||
DdlFiltroProceso.DataSource = ObjCRM.DtResultados;
|
||||
DdlFiltroProceso.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
|
||||
DdlTipoProceso.SelectedValueExist(-1);
|
||||
|
||||
DdlTipoProceso.DataBind();
|
||||
DdlFiltroProceso.DataBind();
|
||||
|
||||
UPFiltros.Update();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "ACCIONES"
|
||||
protected void LnkAgregar_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 0;
|
||||
limpiarCamposModal();
|
||||
DivOrden.Visible = false;
|
||||
|
||||
DdlTipoProceso.SelectedValueExist(CveTipoProcesoSeleccionado);
|
||||
DdlTipoEtapa.SelectedValueExist(CveTipoEtapaSeleccionada);
|
||||
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 1;
|
||||
DivOrden.Visible = true;
|
||||
|
||||
limpiarCamposModal();
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
CveEtapaProceso = GvRow.DataKey("CveEtapaProceso").ToEntero();
|
||||
|
||||
DdlTipoProceso.SelectedValueExist(GvRow.DataKey("CveTipoProceso"));
|
||||
DdlTipoEtapa.SelectedValueExist(GvRow.DataKey("CveTipoEtapa"));
|
||||
|
||||
TxtEtapaProceso.Text = GvRow.DataKey("EtapaProceso").ToString();
|
||||
TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
||||
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
||||
|
||||
CargaDdlOrden(GvRow.DataKey("CveTipoProceso").ToEntero());
|
||||
|
||||
DdlOrden.SelectedValueExist(GvRow.DataKey("Orden").ToEntero());
|
||||
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
}
|
||||
|
||||
protected void BtnGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
String EtapaProceso = TxtEtapaProceso.Text;
|
||||
String Descripcion = TxtDescripcion.Text;
|
||||
|
||||
int CveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero();
|
||||
int CveTipoEtapa = DdlTipoEtapa.SelectedValue.ToEntero();
|
||||
int Orden = TmpDT.FiltraParametros(String.Format("CveTipoProceso = {0} AND CveEstatus = 1", CveTipoProceso)).Rows.Count + 1;
|
||||
|
||||
Boolean Estatus = ChkEstatus.Checked;
|
||||
|
||||
int CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
|
||||
if (EsEditar == 0)
|
||||
{
|
||||
if (ObjCRM.AddEtapaProceso(EtapaProceso, Descripcion, CveTipoEtapa, Orden, CveTipoProceso, UsuarioActual.CveEmpresa, CveUsuarioIng))
|
||||
{
|
||||
Alert(String.Format("La Etapa fue creada correctamente para el proceso {0}.", DdlTipoProceso.SelectedItem), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Orden = Estatus ? DdlOrden.SelectedValue.ToEntero() : -1;
|
||||
|
||||
if (ObjCRM.UpdateEtapaProceso(EtapaProceso, Descripcion, Estatus, CveTipoEtapa, Orden, CveEtapaProceso))
|
||||
{
|
||||
Alert("La Etapa fue actualizada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
|
||||
// PRECARGAMOS LA SIGUIENTE ETAPA A AGREGAR CON LOS MISMA DATOS DE LA ETAPA QUE SE INSERTO
|
||||
CveTipoProcesoSeleccionado = CveTipoProceso;
|
||||
CveTipoEtapaSeleccionada = CveTipoEtapa;
|
||||
|
||||
ObjCRM.Dispose();
|
||||
limpiarCamposModal();
|
||||
this.RegistraScript("$('#DivModal').modal('hide');");
|
||||
|
||||
CargaDatos(-1);
|
||||
DdlFiltroProceso.SelectedValueExist("-1");
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDeleting(object sender, GridViewDeleteEventArgs e)
|
||||
{
|
||||
CveEtapaProceso = GVDatos.Rows[e.RowIndex].DataKey("CveEtapaProceso").ToEntero();
|
||||
String Proceso = GVDatos.Rows[e.RowIndex].DataKey("TipoProceso").ToString();
|
||||
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.RemoveEtapaProceso(CveEtapaProceso))
|
||||
{
|
||||
Alert(String.Format("La Etapa ha sido eliminada del Proceso de {0}.", Proceso), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
CargaDatos(-1);
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (Convert.ToBoolean(e.Row.DataKey("CveEstatus")))
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-success";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-danger";
|
||||
}
|
||||
|
||||
foreach (DataRow proceso in DTProcesos.Rows)
|
||||
{
|
||||
int index = DTProcesos.Rows.IndexOf(proceso);
|
||||
|
||||
if (proceso["CveTipoProceso"].ToEntero() == e.Row.DataKey("CveTipoProceso").ToEntero())
|
||||
{
|
||||
if ((index % 7) == 0) e.Row.Cells[0].CssClass = "bg-green-haze bg-font-green-haze";
|
||||
if ((index % 7) == 1) e.Row.Cells[0].CssClass = "bg-red-pink bg-font-red-pink";
|
||||
if ((index % 7) == 2) e.Row.Cells[0].CssClass = "bg-blue bg-font-blue";
|
||||
if ((index % 7) == 3) e.Row.Cells[0].CssClass = "bg-purple-soft bg-font-purple-soft";
|
||||
if ((index % 7) == 4) e.Row.Cells[0].CssClass = "bg-yellow bg-font-yellow";
|
||||
if ((index % 7) == 5) e.Row.Cells[0].CssClass = "bg-yellow-casablanca bg-font-yellow-casablanca";
|
||||
if ((index % 7) == 6) e.Row.Cells[0].CssClass = "bg-grey-steel bg-font-grey-steel";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void CargaDdlOrden(int CveTipoProceso)
|
||||
{
|
||||
DdlOrden.Items.Clear();
|
||||
|
||||
int i = 0;
|
||||
|
||||
foreach (DataRow row in TmpDT.FiltraParametros(String.Format("CveTipoProceso = {0} AND CveEstatus = 1", CveTipoProceso)).Rows)
|
||||
{
|
||||
DdlOrden.Items.Insert(i++, new ListItem(i.ToString(), i.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region "FILTRO"
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CveTipoProcesoSeleccionado = DdlFiltroProceso.SelectedValue.ToEntero();
|
||||
CargaDatos(DdlFiltroProceso.SelectedValue.ToEntero());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
107
CRM/CatMediosCaptacion.aspx
Normal file
107
CRM/CatMediosCaptacion.aspx
Normal file
@@ -0,0 +1,107 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatMediosCaptacion.aspx.cs" Inherits="CRM_CatMediosCaptacion" %>
|
||||
|
||||
<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="E" Runat="Server">
|
||||
Catálogo de Medios de Captación
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Medio de Captación</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;margin-bottom: 5px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveMedioCaptacion,MedioCaptacion, Descripcion, Estatus, CveEstatus, UsuarioIng, CveUsuarioIng, FechaIng" EmptyDataText="No se han registrado Medios de Captación"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true"
|
||||
GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Medio de Captación" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblMedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEstatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="15%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:g}" />
|
||||
<asp:TemplateField HeaderText="Usuario que Ingresó" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Medio Captación?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DivModal" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlModalTitulo" Text="Medio de Captación" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMedioCaptacion" onkeyup="CompletaDescripcion(this);" MaxLength="30" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMedioCaptacion" runat="server" ControlToValidate="TxtMedioCaptacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Medio de Captación''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtMedioCaptacion.ClientID.ToString()%>">Medio de Captación:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" MaxLength="50" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" 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="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivEstatus" runat="server">
|
||||
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
<script type="text/javascript">
|
||||
function CompletaDescripcion(text) {
|
||||
$('#<%= TxtDescripcion.ClientID %>').val(text.value);
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
182
CRM/CatMediosCaptacion.aspx.cs
Normal file
182
CRM/CatMediosCaptacion.aspx.cs
Normal file
@@ -0,0 +1,182 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
|
||||
using Extensiones;
|
||||
|
||||
public partial class CRM_CatMediosCaptacion : ClsPaginas
|
||||
{
|
||||
|
||||
#region "PROPIEDADES"
|
||||
private int EsEditar
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["EsEditar"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["EsEditar"] = value;
|
||||
}
|
||||
}
|
||||
private DataTable TmpDT
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["TmpDT"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["TmpDT"] = value;
|
||||
}
|
||||
}
|
||||
private int CveMedioCaptacion
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveMedioCaptacion"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveMedioCaptacion"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGA DATOS"
|
||||
protected void CargaDatos()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
TmpDT = ObjCRM.DtResultados;
|
||||
GVDatos.DataSource = TmpDT;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
GVDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
protected void limpiarCamposModal()
|
||||
{
|
||||
if (EsEditar == 1)
|
||||
{
|
||||
LtlModalTitulo.Text = "Actualizar Medio de Captación";
|
||||
BtnGuardar.Text = "Actualizar";
|
||||
DivEstatus.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LtlModalTitulo.Text = "Agregar Medio de Captación";
|
||||
BtnGuardar.Text = "Guardar";
|
||||
DivEstatus.Visible = false;
|
||||
}
|
||||
TxtMedioCaptacion.Text = "";
|
||||
TxtDescripcion.Text = "";
|
||||
ChkEstatus.Checked = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "ACCIONES"
|
||||
protected void LnkAgregar_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 0;
|
||||
limpiarCamposModal();
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDeleting(object sender, GridViewDeleteEventArgs e)
|
||||
{
|
||||
CveMedioCaptacion = GVDatos.Rows[e.RowIndex].DataKey("CveMedioCaptacion").ToEntero();
|
||||
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.RemoveMedioCaptacion(CveMedioCaptacion))
|
||||
{
|
||||
Alert("El Medio de Captación ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (Convert.ToBoolean(e.Row.DataKey("CveEstatus")))
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-success";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-danger";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 1;
|
||||
limpiarCamposModal();
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
CveMedioCaptacion = GvRow.DataKey("CveMedioCaptacion").ToEntero();
|
||||
TxtMedioCaptacion.Text = GvRow.DataKey("MedioCaptacion").ToString();
|
||||
TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
||||
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
||||
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
}
|
||||
|
||||
protected void BtnGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
String MedioCaptacion = TxtMedioCaptacion.Text;
|
||||
String Descripcion = TxtDescripcion.Text;
|
||||
Boolean Estatus = ChkEstatus.Checked;
|
||||
|
||||
int CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
|
||||
if (EsEditar == 0)
|
||||
{
|
||||
if (ObjCRM.AddMedioCaptacion(MedioCaptacion, Descripcion, UsuarioActual.CveEmpresa, CveUsuarioIng))
|
||||
{
|
||||
Alert("El Medio de Captación fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjCRM.UpdateMedioCaptacion(MedioCaptacion, Descripcion, Estatus, CveMedioCaptacion))
|
||||
{
|
||||
Alert("El Medio de Captación fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
limpiarCamposModal();
|
||||
this.RegistraScript("$('#DivModal').modal('hide');");
|
||||
CargaDatos();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
103
CRM/CatProbabilidadAcercamiento.aspx
Normal file
103
CRM/CatProbabilidadAcercamiento.aspx
Normal file
@@ -0,0 +1,103 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatProbabilidadAcercamiento.aspx.cs" Inherits="CRM_CatProbabilidadAcercamiento" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
Catálogo de Probabilidades de Acercamiento
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Probabilidad de Acercamiento</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px; margin-bottom: 5px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveProbabilidadAcercamiento, ProbabilidadAcercamiento, Estatus, CveEstatus, CveEmpresa, UsuarioIng, CveUsuarioIng, FechaIng"
|
||||
EmptyDataText="No se han registrado conceptos de Probabilidades de Acercamiento" EmptyDataRowStyle-HorizontalAlign="Center"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true" GridLines="None"
|
||||
AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Probabilidad de Acercamiento" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblProbabilidadAcercamiento" runat="server" Text='<%# Eval("ProbabilidadAcercamiento")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField HeaderText="Descripción" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEstatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="20%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:g}" />
|
||||
<asp:TemplateField HeaderText="Usuario que Ingresó" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Motivo de Rechazo?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DivModal" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlModalTitulo" Text="Probabilidad de Acercamiento" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtProbabilidadAcercamiento" MaxLength="30" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVProbabilidadAcercamiento" runat="server" ControlToValidate="TxtProbabilidadAcercamiento" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Probabilidad de Acercamiento''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtProbabilidadAcercamiento.ClientID.ToString()%>">Probabilidad de Acercamiento:</label>
|
||||
</div>
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" MaxLength="50" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" 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="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivEstatus" runat="server">
|
||||
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
183
CRM/CatProbabilidadAcercamiento.aspx.cs
Normal file
183
CRM/CatProbabilidadAcercamiento.aspx.cs
Normal file
@@ -0,0 +1,183 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
|
||||
using Extensiones;
|
||||
|
||||
public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private int EsEditar
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["EsEditar"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["EsEditar"] = value;
|
||||
}
|
||||
}
|
||||
private DataTable TmpDT
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["TmpDT"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["TmpDT"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int CveProbabilidadAcercamiento
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveProbabilidadAcercamiento"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveProbabilidadAcercamiento"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGA DATOS"
|
||||
protected void CargaDatos()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
TmpDT = ObjCRM.DtResultados;
|
||||
GVDatos.DataSource = TmpDT;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
GVDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
protected void limpiarCamposModal()
|
||||
{
|
||||
if (EsEditar == 1)
|
||||
{
|
||||
LtlModalTitulo.Text = "Actualizar Probabilidad de Acercamiento";
|
||||
BtnGuardar.Text = "Actualizar";
|
||||
DivEstatus.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LtlModalTitulo.Text = "Agregar Probabilidad de Acercamiento";
|
||||
BtnGuardar.Text = "Guardar";
|
||||
DivEstatus.Visible = false;
|
||||
}
|
||||
TxtProbabilidadAcercamiento.Text = "";
|
||||
//TxtDescripcion.Text = "";
|
||||
ChkEstatus.Checked = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "ACCIONES"
|
||||
protected void LnkAgregar_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 0;
|
||||
limpiarCamposModal();
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 1;
|
||||
limpiarCamposModal();
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
CveProbabilidadAcercamiento = GvRow.DataKey("CveProbabilidadAcercamiento").ToEntero();
|
||||
TxtProbabilidadAcercamiento.Text = GvRow.DataKey("ProbabilidadAcercamiento").ToString();
|
||||
//TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
||||
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
||||
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
}
|
||||
|
||||
protected void BtnGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
String ProbabilidadAcercamiento = TxtProbabilidadAcercamiento.Text;
|
||||
//String Descripcion = TxtDescripcion.Text;
|
||||
Boolean Estatus = ChkEstatus.Checked;
|
||||
|
||||
int CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
|
||||
if (EsEditar == 0)
|
||||
{
|
||||
if (ObjCRM.AddProbabilidadAcercamiento(ProbabilidadAcercamiento, UsuarioActual.CveEmpresa, CveUsuarioIng))
|
||||
{
|
||||
Alert("La Probabilidad de Acercamiento fue creada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjCRM.UpdateProbabilidadAcercamiento(ProbabilidadAcercamiento, Estatus, CveProbabilidadAcercamiento))
|
||||
{
|
||||
Alert("La Probabilidad de Acercamiento fue actualizada correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
limpiarCamposModal();
|
||||
this.RegistraScript("$('#DivModal').modal('hide');");
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDeleting(object sender, GridViewDeleteEventArgs e)
|
||||
{
|
||||
CveProbabilidadAcercamiento = GVDatos.Rows[e.RowIndex].DataKey("CveProbabilidadAcercamiento").ToEntero();
|
||||
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.RemoveProbabilidadAcercamiento(CveProbabilidadAcercamiento))
|
||||
{
|
||||
Alert("La Probabilidad de Acercamiento ha sido eliminada.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (Convert.ToBoolean(e.Row.DataKey("CveEstatus")))
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-success";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-danger";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
118
CRM/CatRechazoMotivo.aspx
Normal file
118
CRM/CatRechazoMotivo.aspx
Normal file
@@ -0,0 +1,118 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatRechazoMotivo.aspx.cs" Inherits="CRM_CatRechazoMotivo" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
Catálogo de Motivos de Rechazo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Motivo de Rechazo</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px; margin-bottom: 5px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveRechazoMotivo, RechazoMotivo, Descripcion, Estatus, CveEstatus, UsuarioIng, CveUsuarioIng, FechaIng, CveTipoProceso, TipoProceso, CveTipoEtapa, EtapaProceso" EmptyDataText="No se han registrado Motivos de Rechazo"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true"
|
||||
GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo de Proceso" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTipoProceso" runat="server" Text='<%# Eval("TipoProceso")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Motivo de Rechazo" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblRechazoMotivo" runat="server" Text='<%# Eval("RechazoMotivo")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="21%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEstatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="15%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:g}" />
|
||||
<asp:TemplateField HeaderText="Usuario Ing." ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Motivo de Rechazo?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DivModal" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlModalTitulo" Text="Medio de Captación" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoProceso" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlTipoProceso.ClientID.ToString()%>">Proceso:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoProceso" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlTipoProceso" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proceso''</b> es necesario." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRechazoMotivo" onkeyup="CompletaDescripcion(this);" MaxLength="30" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRechazoMotivo" runat="server" ControlToValidate="TxtRechazoMotivo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo de Rechazo''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtRechazoMotivo.ClientID.ToString()%>">Motivo de Rechazo:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" MaxLength="50" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" 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="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivEstatus" runat="server">
|
||||
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
function CompletaDescripcion(text) {
|
||||
$('#<%= TxtDescripcion.ClientID %>').val(text.value);
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
228
CRM/CatRechazoMotivo.aspx.cs
Normal file
228
CRM/CatRechazoMotivo.aspx.cs
Normal file
@@ -0,0 +1,228 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
|
||||
using Extensiones;
|
||||
|
||||
public partial class CRM_CatRechazoMotivo : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private int EsEditar
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["EsEditar"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["EsEditar"] = value;
|
||||
}
|
||||
}
|
||||
private DataTable TmpDT
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["TmpDT"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["TmpDT"] = value;
|
||||
}
|
||||
}
|
||||
private DataTable DTProcesos
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTProcesos"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTProcesos"] = value;
|
||||
}
|
||||
}
|
||||
private int CveRechazoMotivo
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveRechazoMotivo"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveRechazoMotivo"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaTiposProcesos();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
#region "CARGA DATOS"
|
||||
protected void CargaDatos()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetRechazoMotivo(UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
TmpDT = ObjCRM.DtResultados;
|
||||
GVDatos.DataSource = TmpDT;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
GVDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
protected void CargaTiposProcesos()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
DTProcesos = ObjCRM.DtResultados;
|
||||
DdlTipoProceso.DataSource = DTProcesos.FiltraParametros("CveEstatus = 1");
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
DdlTipoProceso.DataBind();
|
||||
}
|
||||
|
||||
protected void limpiarCamposModal(string NombreRechazo = "")
|
||||
{
|
||||
if (EsEditar == 1)
|
||||
{
|
||||
LtlModalTitulo.Text = String.Format("Actualizar Motivo de {0}", (NombreRechazo == "" ? "Rechazo" : NombreRechazo));
|
||||
BtnGuardar.Text = "Actualizar";
|
||||
DivEstatus.Visible = true;
|
||||
DdlTipoProceso.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
LtlModalTitulo.Text = "Agregar Motivo de Rechazo";
|
||||
BtnGuardar.Text = "Guardar";
|
||||
DivEstatus.Visible = false;
|
||||
DdlTipoProceso.Enabled = true;
|
||||
}
|
||||
TxtRechazoMotivo.Text = "";
|
||||
TxtDescripcion.Text = "";
|
||||
ChkEstatus.Checked = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "ACCIONES"
|
||||
protected void LnkAgregar_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 0;
|
||||
limpiarCamposModal();
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
}
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 1;
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
limpiarCamposModal(GvRow.DataKey("EtapaProceso").ToString());
|
||||
|
||||
CveRechazoMotivo = GvRow.DataKey("CveRechazoMotivo").ToEntero();
|
||||
TxtRechazoMotivo.Text = GvRow.DataKey("RechazoMotivo").ToString();
|
||||
TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
||||
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
||||
DdlTipoProceso.SelectedValueExist(GvRow.DataKey("CveTipoProceso").ToEntero());
|
||||
|
||||
UPModal.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModal').modal();");
|
||||
}
|
||||
|
||||
protected void BtnGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
int CveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero();
|
||||
String RechazoMotivo = TxtRechazoMotivo.Text;
|
||||
String Descripcion = TxtDescripcion.Text;
|
||||
Boolean Estatus = ChkEstatus.Checked;
|
||||
|
||||
int CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
|
||||
if (EsEditar == 0)
|
||||
{
|
||||
if (ObjCRM.AddRechazoMotivo(RechazoMotivo, Descripcion, UsuarioActual.CveEmpresa, CveUsuarioIng, CveTipoProceso))
|
||||
{
|
||||
Alert("El Motivo de Rechazo fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjCRM.UpdateRechazoMotivo(RechazoMotivo, Descripcion, Estatus, CveRechazoMotivo))
|
||||
{
|
||||
Alert("El Motivo de Rechazo fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
limpiarCamposModal();
|
||||
this.RegistraScript("$('#DivModal').modal('hide');");
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDeleting(object sender, GridViewDeleteEventArgs e)
|
||||
{
|
||||
CveRechazoMotivo = GVDatos.Rows[e.RowIndex].DataKey("CveRechazoMotivo").ToEntero();
|
||||
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.RemoveRechazoMotivo(CveRechazoMotivo))
|
||||
{
|
||||
Alert("El Motivo de Rechazo ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (Convert.ToBoolean(e.Row.DataKey("CveEstatus")))
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-success";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-danger";
|
||||
}
|
||||
|
||||
foreach (DataRow proceso in DTProcesos.Rows)
|
||||
{
|
||||
int index = DTProcesos.Rows.IndexOf(proceso);
|
||||
|
||||
if (proceso["CveTipoProceso"].ToEntero() == e.Row.DataKey("CveTipoProceso").ToEntero())
|
||||
{
|
||||
if ((index % 7) == 0) e.Row.Cells[0].CssClass = "bg-green-haze bg-font-green-haze";
|
||||
if ((index % 7) == 1) e.Row.Cells[0].CssClass = "bg-red-pink bg-font-red-pink";
|
||||
if ((index % 7) == 2) e.Row.Cells[0].CssClass = "bg-blue bg-font-blue";
|
||||
if ((index % 7) == 3) e.Row.Cells[0].CssClass = "bg-purple-soft bg-font-purple-soft";
|
||||
if ((index % 7) == 4) e.Row.Cells[0].CssClass = "bg-yellow bg-font-yellow";
|
||||
if ((index % 7) == 5) e.Row.Cells[0].CssClass = "bg-yellow-casablanca bg-font-yellow-casablanca";
|
||||
if ((index % 7) == 6) e.Row.Cells[0].CssClass = "bg-grey-steel bg-font-grey-steel";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
116
CRM/CatTipoProceso.aspx
Normal file
116
CRM/CatTipoProceso.aspx
Normal file
@@ -0,0 +1,116 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatTipoProceso.aspx.cs" Inherits="CRM_CatTipoProceso" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
Catálogo de Tipos de Procesos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregarTipoProceso" OnClick="LnkAgregarTipoProceso_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Tipo de Proceso</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px; margin-bottom: 5px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVTiposProcesos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVTiposProcesos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVTiposProcesos" runat="server" DataKeyNames="CveTipoProceso,TipoProceso, Descripcion, NoEtapas, Estatus, CveEstatus, UsuarioIng, CveUsuarioIng, FechaIng" EmptyDataText="No se han registrado Tipos de Procesos"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true"
|
||||
GridLines="None" AutoGenerateColumns="false" OnRowDeleting="GVTiposProcesos_RowDeleting" OnRowDataBound="GVTiposProcesos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo de Proceso" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTipoProceso" runat="server" Text='<%# Eval("TipoProceso")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="No. Etapas" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNoEtapas" runat="server" Text='<%# Eval("NoEtapas")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEstatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="15%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:g}" />
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario que Ingresó" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblUsuarioIng" runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="LnkEditar_Click" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Tipo de Proceso?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DivModalTipoProceso" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModalTipoProceso" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlModalTitulo" Text="Tipo de Proceso" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTipoProceso" onkeyup="CompletaDescripcion(this);" MaxLength="30" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoProceso" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTipoProceso" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Proceso''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTipoProceso.ClientID.ToString()%>">Tipo de Proceso:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" MaxLength="50" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivEstatus" runat="server">
|
||||
<label runat="server" id="lblEstatus" for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGGuardar" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
function CompletaDescripcion(text) {
|
||||
$('#<%= TxtDescripcion.ClientID %>').val(text.value);
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
186
CRM/CatTipoProceso.aspx.cs
Normal file
186
CRM/CatTipoProceso.aspx.cs
Normal file
@@ -0,0 +1,186 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
|
||||
using Extensiones;
|
||||
|
||||
public partial class CRM_CatTipoProceso : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private int EsEditar
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["EsEditar"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["EsEditar"] = value;
|
||||
}
|
||||
}
|
||||
private DataTable TmpDT
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["TmpDT"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["TmpDT"] = value;
|
||||
}
|
||||
}
|
||||
private int CveTipoProceso
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveTipoProceso"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveTipoProceso"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
#region "CARGA DATOS"
|
||||
protected void CargaDatos()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
TmpDT = ObjCRM.DtResultados;
|
||||
GVTiposProcesos.DataSource = TmpDT;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
GVTiposProcesos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
protected void limpiarCamposModal()
|
||||
{
|
||||
if (EsEditar == 1)
|
||||
{
|
||||
LtlModalTitulo.Text = "Actualizar Tipo de Proceso";
|
||||
BtnGuardar.Text = "Actualizar";
|
||||
DivEstatus.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LtlModalTitulo.Text = "Agregar Tipo de Proceso";
|
||||
BtnGuardar.Text = "Guardar";
|
||||
DivEstatus.Visible = false;
|
||||
}
|
||||
TxtTipoProceso.Text = "";
|
||||
TxtDescripcion.Text = "";
|
||||
ChkEstatus.Checked = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "ACCIONES"
|
||||
protected void LnkAgregarTipoProceso_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 0;
|
||||
limpiarCamposModal();
|
||||
UPModalTipoProceso.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModalTipoProceso').modal();");
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
EsEditar = 1;
|
||||
limpiarCamposModal();
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
CveTipoProceso = GvRow.DataKey("CveTipoProceso").ToEntero();
|
||||
TxtTipoProceso.Text = GvRow.DataKey("TipoProceso").ToString();
|
||||
TxtDescripcion.Text = GvRow.DataKey("Descripcion").ToString();
|
||||
ChkEstatus.Checked = GvRow.DataKey("CveEstatus").ToString() == "True" ? true : false;
|
||||
|
||||
UPModalTipoProceso.Update();
|
||||
|
||||
this.RegistraScript("$('#DivModalTipoProceso').modal();");
|
||||
}
|
||||
|
||||
protected void BtnGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
String TipoProceso = TxtTipoProceso.Text;
|
||||
String Descripcion = TxtDescripcion.Text;
|
||||
Boolean Estatus = ChkEstatus.Checked;
|
||||
|
||||
int CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
|
||||
if (EsEditar == 0)
|
||||
{
|
||||
if (ObjCRM.AddTipoProceso(TipoProceso, Descripcion, UsuarioActual.CveEmpresa, CveUsuarioIng))
|
||||
{
|
||||
Alert("El Tipo de Proceso fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjCRM.UpdateTipoProceso(TipoProceso, Descripcion, Estatus, CveTipoProceso))
|
||||
{
|
||||
Alert("El Tipo de Proceso fue actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
limpiarCamposModal();
|
||||
this.RegistraScript("$('#DivModalTipoProceso').modal('hide');");
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void GVTiposProcesos_RowDeleting(object sender, GridViewDeleteEventArgs e)
|
||||
{
|
||||
CveTipoProceso = GVTiposProcesos.Rows[e.RowIndex].DataKey("CveTipoProceso").ToEntero();
|
||||
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.RemoveTipoProceso(CveTipoProceso))
|
||||
{
|
||||
Alert("El Tipo de Proceso ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void GVTiposProcesos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (Convert.ToBoolean(e.Row.DataKey("CveEstatus")))
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-success";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCLabel("lblEstatus").CssClass = "label label-sm label-danger";
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("NoEtapas").ToEntero() > 0)
|
||||
{
|
||||
e.Row.FCLabel("lblNoEtapas").Text = String.Format("<b>{0}</b>", e.Row.DataKey("NoEtapas"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
826
CRM/EmpresaCRM.aspx
Normal file
826
CRM/EmpresaCRM.aspx
Normal file
@@ -0,0 +1,826 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" EnableEventValidation="false" CodeFile="EmpresaCRM.aspx.cs" Inherits="CRM_EmpresaCRM" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.MultiLineTextBox {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.ADScroller-body {
|
||||
max-height: 140px !important;
|
||||
}
|
||||
|
||||
.ADScroller-footer {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
Div.MultiLineTextBox > label#lbltxtdinamico {
|
||||
height: 83px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" ID="LblEncabezadoEmpresa" Text="Registro de Empresas"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%-- <li>
|
||||
<asp:HyperLink ID="HplAddCotizacion" Target="_blank" Visible="false" runat="server"><i class="fa fa-plus"></i>Agregar Cotización</asp:HyperLink>
|
||||
</li>--%>
|
||||
<li>
|
||||
<asp:HyperLink ID="HplCrearCliente" Target="_blank" Visible="false" runat="server"><i class="fa fa-plus"></i><span style="padding: 0.5rem;"></span>Crear Cliente</asp:HyperLink>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" class="Widthall" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="TabEmpresaCRM" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
|
||||
<ajax:TabPanel ID="TabEmpresaContactos" runat="server" HeaderText="Información de la Empresa">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6 ">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-users font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos de Empresa </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivBodyEmpresa" class="portlet-body form">
|
||||
<%-- DATOS ESTATICOS - TABLA EMPRESACRM --%>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreEmpresa" CssClass="form-control " runat="server" MaxLength="100"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombreEmpresa" runat="server" ControlToValidate="TxtNombreEmpresa" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre de Empresa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtNombreEmpresa.ClientID.ToString()%>">Nombre de Empresa:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRFC" CssClass="form-control " runat="server" MaxLength="13"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRFC" runat="server" ControlToValidate="TxtRFC" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCorreoEmpresaCRM" CssClass="form-control " runat="server" MaxLength="255"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBECorreoEmpresaCRM" runat="server" FilterType="Numbers, LowercaseLetters, UppercaseLetters, Custom" ValidChars=".;@_-ñ" TargetControlID="TxtCorreoEmpresaCRM" />
|
||||
<asp:RegularExpressionValidator ID="REVFTBECorreoEmpresaCRM" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9ñÑ_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtCorreoEmpresaCRM" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||
<asp:RequiredFieldValidator ID="RFVCorreoEmpresaCRM" runat="server" ControlToValidate="TxtCorreoEmpresaCRM" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCorreoEmpresaCRM.ClientID.ToString()%>">Email:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMedioCaptacion" Width="50%" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%=DdlMedioCaptacion.ClientID.ToString()%>">Medio de Captación:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlVendedorAsignado" Width="50%" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%=DdlVendedorAsignado.ClientID.ToString()%>">Vendedor:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVVendedorAsignado" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlVendedorAsignado" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSucursales" Width="50%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%=DdlSucursales.ClientID.ToString()%>">Sucursal:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVSubProyecto" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlSucursales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- DATOS DINAMICOS - TABLA ENCUESTA --%>
|
||||
<asp:UpdatePanel ID="UpDatosTecnicos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivEncuesta" style="display: inline; width: 100%; padding-top: 0px;" runat="server">
|
||||
<hr style="margin-top: 20px; margin-bottom: 10px;" />
|
||||
|
||||
<asp:GridView ID="GvDatosTecnicos" DataKeyNames="CvePregunta,CveTipoPregunta, CveEncuestaAplicadaDetalle, RespuestaDefault, CveRespuesta, Valor" EmptyDataText="No se encontraron Respuestas Registrados" Width="100%"
|
||||
Visible="false" runat="server" GridLines="None" AutoGenerateColumns="False" ShowHeader="False" CssClass="xspadding" OnRowDataBound="GvDatosTecnicos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle BorderStyle="None" />
|
||||
<ItemTemplate>
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="padding: 0 !important; margin: 0; border: 0; width: 100%;">
|
||||
<tr style="padding: 0 !important; margin: 0;">
|
||||
<td colspan="2" style="text-align: left; padding: 0 !important; margin: 0; border: 0;" class="t">
|
||||
<%--<asp:Label ID="LblPreguntaDinamica" Text='<%# Eval("Pregunta") + ":"%>' runat="server" CssClass="control-label" Font-Size="13px" ForeColor="#888888"></asp:Label>--%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="padding: 0 !important; margin: 0; border: 0;">
|
||||
<td style="padding: 0 !important; margin: 0; border: 0;">
|
||||
<div runat="server" id="DivTxtRespuestaDinamica" visible="false" class="form-group col-md-12 form-md-line-input input-iconright" style="padding-top: 0px; padding-left: 0; padding-right: 0;">
|
||||
<asp:TextBox ID="TxtRespuestaDinamica" runat="server" CausesValidation="true" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<label for="GvDatosTecnicos.ClientID.ToString()" style="left: 0; margin-top: -10px;"><%# Eval("Pregunta") + ":"%> </label>
|
||||
<%--<asp:RequiredFieldValidator SetFocusOnError="true" ID="RFVTxtRespuestaDinamica" CssClass="errorimput" runat="server" ControlToValidate="TxtRespuestaDinamica" ErrorMessage="<i><span style='color: darkred;'>Campo requerido</span></i>"></asp:RequiredFieldValidator>--%>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivDdlRespuestaDinamica" visible="false" class="form-group col-md-12 form-md-line-input input-iconright" style="padding-top: 0px; padding-left: 0; padding-right: 0;">
|
||||
<asp:DropDownList ID="DdlRespuestaDinamica" Width="50%" runat="server" DataTextField="Respuesta" DataValueField="CveRespuesta" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="GvDatosTecnicos.ClientID.ToString()" style="left: 0; margin-top: -10px;"><%# Eval("Pregunta") + ":"%> </label>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivRdlRespuestaDinamica" visible="false" class="form-group col-md-12 form-md-line-input input-iconright" style="padding-top: 0px; padding-left: 0; padding-right: 0;">
|
||||
<asp:RadioButtonList ID="RdlRespuestaDinamica" runat="server" DataTextField="Respuesta" DataValueField="CveRespuesta" CssClass="form-control" BorderStyle="None" RepeatDirection="Horizontal"></asp:RadioButtonList>
|
||||
<label for="GvDatosTecnicos.ClientID.ToString()" style="left: 0; margin-top: -10px;"><%# Eval("Pregunta") + ":"%> </label>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivChkRespuestaDinamica" visible="false" class="form-group col-md-12 form-md-line-input input-iconright" style="padding-top: 15px; padding-left: 0px; padding-right: 0;">
|
||||
<asp:CheckBox ID="ChkRespuestaDinamica" runat="server" CssClass="form-control make-switchsd" BorderStyle="None" data-size="small"></asp:CheckBox>
|
||||
<label for="GvDatosTecnicos.ClientID.ToString()" style="left: 0; margin-top: -8px;"><%# Eval("Pregunta") + ":"%> </label>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivTxtRespuestaDinamicaMultilinea" visible="false" class="form-group col-md-12 form-md-line-input input-iconright" style="padding-top: 0px; padding-left: 0; padding-right: 0;">
|
||||
<asp:TextBox ID="TxtRespuestaDinamicaMultilinea" runat="server" TextMode="MultiLine" Rows="3" CausesValidation="true" Width="100%" CssClass="form-control MultiLineTextBox"></asp:TextBox>
|
||||
<label for="GvDatosTecnicos.ClientID.ToString()" style="left: 0; margin-top: -10px; height: 83px;"><%# Eval("Pregunta") + ":"%> </label>
|
||||
<%--<asp:RequiredFieldValidator SetFocusOnError="true" ID="RFVTxtRespuestaDinamica" CssClass="errorimput" runat="server" ControlToValidate="TxtRespuestaDinamica" ErrorMessage="<i><span style='color: darkred;'>Campo requerido</span></i>"></asp:RequiredFieldValidator>--%>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="padding: 0!important; padding-top: 5px !important;">
|
||||
<div runat="server" id="DivFechaDinamica" visible="false" class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0!important;">
|
||||
<asp:TextBox ID="TxtRespuestaFechaDinamica" runat="server" Style="margin: 0px; padding: 0px;" CssClass="form-control" Width="90px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioFechaDinamica" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<label for="<%= GvDatosTecnicos.ClientID.ToString()%>" style="left: 0; margin-top: -17px;"><%# Eval("Pregunta") + ":"%></label>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEETxtFechaDinamica" runat="server" TargetControlID="TxtRespuestaFechaDinamica" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtFechaDinamica" TargetControlID="TxtRespuestaFechaDinamica" PopupButtonID="imgCalendarioFechaDinamica" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<%-- END DATOS DINAMICOS - TABLA ENCUESTA --%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-6 ">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-users font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos Técnicos</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivBodyDatosTecnicos" class="portlet-body form">
|
||||
<div class="form-group form-md-checkboxes" style="margin-top: 15px; margin-left: -7px; margin-bottom: 10px">
|
||||
<asp:CheckBox ID="ChkAplicaEncuesta" onclick="activaDivEncuesta()" CssClass="md-checksd" runat="server" Text="Aplica Encuesta" />
|
||||
</div>
|
||||
|
||||
<div id="DivEncuesta" style="display: none;" class="form-group form-md-line-input input-iconright" runat="server">
|
||||
<asp:DropDownList ID="DdlEncuesta" Width="50%" runat="server" DataTextField="NombreEncuesta" DataValueField="CveEncuesta" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label style="margin-top: -8px; width: 50%;" for="<%=DdlEncuesta.ClientID.ToString()%>">Encuesta:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<%-- SECCION CONTACTOS --%>
|
||||
<ajax:TabPanel ID="TabContactos" runat="server" HeaderText="Contactos">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12 ">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-phone font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Contactos </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarContacto" Visible="false" OnClick="BtnAgregarContacto_Click" data-toggle="tooltip" title="Agregar un Contacto" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<div runat="server" id="DivBuscadorContactos" visible="false" class="row" style="margin-right: 10px; margin-top: 0px; margin-bottom: 5px;" align="right">
|
||||
<input type="text" id="TxtBusquedaContactos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaContactos','{0}')", GVContactos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaContactos','{0}')", GVContactos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<div runat="server" id="DivContactos" style="padding: 0 10px 10px 10px;">
|
||||
<asp:UpdatePanel runat="server" ID="UpContactos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVContactos" runat="server" DataKeyNames="CveContacto, Nombre, TelefonoOficina, Celular, Correo, CveUsuarioIng, FechaIng" EmptyDataText="Aún no se han registrado contactos"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" ToolTip="Listado de Contactos" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" AlternatingRowStyle-BorderStyle="None"
|
||||
GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" OnRowDeleting="GVContactos_RowDeleting" AutoGenerateColumns="false" OnRowDataBound="GVContactos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Nombre" ItemStyle-Width="35%" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombreContacto" runat="server" Text='<%# Eval("Nombre", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Teléfono Oficina" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTelefonoOficina" runat="server" Text='<%# Eval("TelefonoOficina")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Celular" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblCelular" runat="server" Text='<%# Eval("Celular")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField ItemStyle-Width="25%" DataField="Correo" HeaderText="Correo" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="10%" HeaderText="Comandos" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarContacto" runat="server" OnClick="LnkEditarContacto_Click" AlternateText="Editar" CommandArgument='<%# Eval("CveContacto")%>' CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Desea eliminar este contacto?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%-- SECCION ACERCAMIENTO --%>
|
||||
<ajax:TabPanel ID="TabAcercamiento" runat="server" HeaderText="Acercamientos">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12 ">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Acercamientos Registrados </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarAcercamiento" Visible="false" OnClick="LnkAgregarAcercamiento_Click" data-toggle="tooltip" title="Agregar un Acercamiento" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<div runat="server" id="DivBuscadorAcercamientos" visible="false" class="row" style="margin-right: 10px; margin-top: 0px; margin-bottom: 5px;" align="right">
|
||||
<input type="text" id="TxtBusquedaAcercamiento" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAcercamiento','{0}')", GVAcercamientos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAcercamiento','{0}')", GVAcercamientos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<div runat="server" id="DivAcercamientos" style="padding: 0 10px 10px 10px;">
|
||||
<asp:UpdatePanel runat="server" ID="UPAcercamientos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVAcercamientos" runat="server" DataKeyNames="CveAcercamiento, CveContactoPrincipal, Contacto,
|
||||
CveTipoProceso, TipoProceso, CveEtapaProcesoActual, EtapaProcesoActual, CveVendedor, Vendedor, CveMedioCaptacion,
|
||||
MedioCaptacion, CveRechazoMotivo, RechazoMotivo, CveProbabilidadAcercamiento, ProbabilidadAcercamiento,
|
||||
NombreAcercamiento, FechaApertura, FechaCierre, Importe, Comision"
|
||||
EmptyDataText="Aún no se han registrado Acercamientos"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" ToolTip="Listado de Acercamientos" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" AlternatingRowStyle-BorderStyle="None"
|
||||
GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" AutoGenerateColumns="false" OnRowDataBound="GVAcercamientos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Proceso" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoProceso" runat="server" Text='<%# Eval("TipoProceso") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Acercamiento" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink NavigateUrl="#" Target="_blank" ID="HplNombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Etapa Actual" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEtapaProcesoActual" runat="server" Text='<%# Eval("EtapaProcesoActual")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Medio de Captación" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblMedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="10%" HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:BoundField ItemStyle-Width="10%" DataField="Importe" HeaderText="Importe" DataFormatString="{0:C2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField ItemStyle-Width="10%" DataField="FechaApertura" HeaderText="Apertura" DataFormatString="{0:g}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField ItemStyle-Width="10%" DataField="FechaCierre" HeaderText="Cierre" DataFormatString="{0:g}" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%-- END SECCION ACERCAMIENTO --%>
|
||||
|
||||
<%-- SECCION COTIZACIONES --%>
|
||||
<ajax:TabPanel ID="TabCotizacion" runat="server" HeaderText="Cotizaciones">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12 ">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Cotizaciones </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div runat="server" id="Div1" visible="false" class="row" style="margin-right: 10px; margin-top: 0px; margin-bottom: 5px;" align="right">
|
||||
<input type="text" id="TxtBusquedaCotizacion" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCotizacion','{0}')", GvCotizacion.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaCotizacion','{0}')", GvCotizacion.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<div runat="server" id="Div2" style="padding: 0 10px 10px 10px;">
|
||||
<asp:UpdatePanel runat="server" ID="UpCotizacion" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCotizacion" runat="server" DataKeyNames="CveVenta,CveEmpresaCRM,CveAcercamientoCRM,CveEstatusFactura, EstatusFactura" EmptyDataText="Aún no se han registrado Cotizaciones"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" ToolTip="Listado de Cotizaciones" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" AlternatingRowStyle-BorderStyle="None"
|
||||
GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" AutoGenerateColumns="false" OnRowDataBound="GvCotizacion_RowDataBound">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="NombreAcercamientoCRM" Target="_blank" DataNavigateUrlFields="CveAcercamientoCRM" DataNavigateUrlFormatString="/CRM/Acercamiento.aspx?CveAcercamiento={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Acercamiento" />
|
||||
<asp:BoundField DataField="DescripcionCRM" HeaderText="Descripcion" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Serie Folio" />
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Total" ItemStyle-HorizontalAlign="Right" HeaderText="Total" DataFormatString="{0:N2}" />
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEstatus" runat="server" Text='<%# Eval("EstatusFactura")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%-- END SECCION COTIZACIONES --%>
|
||||
</ajax:TabContainer>
|
||||
|
||||
<table border="0" class="Widthall" style="padding-top: 20px;">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardarEmpresa" runat="server" OnClick="BtnGuardarEmpresa_Click" CssClass="btn btn-primary" Text="Guardar" ValidationGroup="GrpGuardar" />
|
||||
<asp:Button ID="BtnEliminarEmpresa" runat="server" Visible="false" OnClick="BtnEliminarEmpresa_Click" CssClass="btn btn-danger" Text="Eliminar" AlternateText="Eliminar" data-toggle="confirmation" data-popout="true" data-original-title="¿Eliminar la Empresa tambien eliminara los Contacto de esta, seguro que desea continuar?" data-btn-ok-label="si" />
|
||||
<%--<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- BITACORA --%>
|
||||
<div class="row" id="DivPortletBitacora" runat="server">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UPBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered" runat="server" id="DivBitacora" visible="false">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<%--<i class="fa fa-users font-green"></i>--%>
|
||||
<span class="caption-subject bold uppercase">Bitacora</span>
|
||||
</div>
|
||||
<div runat="server" id="DivAccionesBitacora" class="actions">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-circle btn-sm btn-default" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="false">Agregar <i class="fa fa-angle-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li>
|
||||
<asp:HyperLink ID="LnkAgregarObservaciones" Visible="false" Text="<i class='fa fa-commenting-o'></i> Observación" data-toggle="modal" data-target="#ModalBitacora" runat="server" Style="cursor: pointer; margin-right: 5px;"></asp:HyperLink>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="LnkAgregarAgenda" Visible="false" Text="<i class='fa fa-calendar-plus-o'></i> Agenda" data-toggle="modal" data-target="#ModalAgenda" runat="server" Style="cursor: pointer; margin-right: 5px;"></asp:HyperLink>
|
||||
</li>
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkAgregarEvento" Visible="false" Text="<i class='fa fa-calendar-plus-o'></i> Agenda" OnClick="LnkAgregarEvento_Click" runat="server"></asp:LinkButton>
|
||||
</li>--%>
|
||||
</ul>
|
||||
</div>
|
||||
<%--<div class="btn-group" style="padding-right: 10px;">
|
||||
<asp:HyperLink ID="LnkAgregarObservaciones" Visible="false" CssClass="btn btn-circle blue btn-outline btn-sm" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting' ></i>Agregar" Style="cursor: pointer; margin-right: 5px;" ToolTip="Observaciones"></asp:HyperLink>
|
||||
<asp:LinkButton ID="LnkAgregarEvento" Visible="false" CssClass="btn btn-circle blue btn-outline btn-sm" OnClick="LnkAgregarEvento_Click" runat="server" Text=" <i class='fa fa-calendar-plus-o'></i> Agendar"></asp:LinkButton>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="padding: 10px 10px 5px 10px; max-height: 200px !important;">
|
||||
<asp:GridView ID="GVEventoBitacora" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado comentarios o bitácora" EmptyDataRowStyle-HorizontalAlign="Center"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="max-height: 200px !important" GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" OnRowDataBound="GVEventoBitacora_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha Agenda</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaAgenda" runat="server" Text='<%# Eval("FechaInicio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Usuario</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Descripción</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Archivo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LinkArchivo" Visible="False" runat="server" CssClass="Texto" OnClick="DownloadFile">
|
||||
<asp:Image ImageUrl="/Imagenes/Abajo.png" ID="ImgArchivo" runat="server" />
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="Titulos" />--%>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<%-- FIN BITACORA --%>
|
||||
|
||||
<%-- MODALES --%>
|
||||
|
||||
<%-- MODAL AGREGAR CONTACTO --%>
|
||||
<div id="DivModalContacto" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModalContacto" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlModalTitulo" Text="Contacto" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreContacto" MaxLength="100" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombreContacto" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtNombreContacto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Contacto''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardarContacto"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtNombreContacto.ClientID.ToString()%>">Nombre del Contacto:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTelefonoOficina" MaxLength="10" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEETelefonoOficina" runat="server" TargetControlID="TxtTelefonoOficina" Mask="(999)-999-9999" InputDirection="LeftToRight" MessageValidatorTip="true" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVTelefonoOficina" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTelefonoOficina" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono de Oficina''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardarContacto"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtTelefonoOficina.ClientID.ToString()%>">Teléfono de Oficina:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" MaxLength="10" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEE" runat="server" TargetControlID="TxtCelular" Mask="(999)-999-9999" InputDirection="LeftToRight" MessageValidatorTip="true" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVCelular" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardarContacto"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCorreo" MaxLength="80" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<%-- <ajax:FilteredTextBoxExtender ID="FTBECorreo" runat="server" FilterType="Numbers, LowercaseLetters, UppercaseLetters, Custom" ValidChars=".;@_-ñ" TargetControlID="TxtCorreo" />
|
||||
<asp:RegularExpressionValidator ID="REVCorreo" runat="server" CssClass="errorimput" ValidationExpression="(([a-zA-Z0-9ñÑ_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtCorreo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="VGGuardarContacto"></asp:RegularExpressionValidator>--%>
|
||||
<label for="<%= TxtCorreo.ClientID.ToString()%>">Correo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardarContacto" OnClick="BtnGuardarContacto_Click" runat="server" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VGGuardarContacto" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<%-- END MODAL AGREGAR CONTACTO --%>
|
||||
|
||||
<%-- MODAL AGREGAR ACERCAMIENTO --%>
|
||||
<div id="DivModalAltaAcercamiento" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpAltaAcercamiento" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<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">Agregar Acercamiento</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAcercamiento" onkeyup="CompletaDescripcion(this);" MaxLength="100" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAcercamiento" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAcercamiento" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br /> El campo <b>''Acercamiento''</b> es necesario, por favor ingréselo." ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtAcercamiento.ClientID.ToString()%>">Proyecto:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcionAcercamiento" CssClass="form-control " runat="server" MaxLength="200"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcionAcercamiento" 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="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtDescripcionAcercamiento.ClientID.ToString()%>">Descripción del Proyecto:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoProceso" DataTextField="TipoProceso" DataValueField="CveTipoProceso" runat="server" Width="100%" AppendDataBoundItems="true" Class="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlTipoProceso.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Proceso:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoProceso" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlTipoProceso" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Proceso''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlContactoPrincipal" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveContacto" Class="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlContactoPrincipal.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Contacto Principal:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVContacto" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlContactoPrincipal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Contacto''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<%--<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlVendedor.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Vendedor Asignado:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVVendedor" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlVendedor" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlVendedor" DataTextField="Vendedor" DataValueField="CveVendedor" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlVendedor.ClientID.ToString()%>">Vendedor Asignado:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVVen" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlVendedor" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMedioCaptacionAcercamiento" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" Class="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlMedioCaptacionAcercamiento.ClientID.ToString()%>">Medio de Captación:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="padding: 0;">
|
||||
|
||||
<div runat="server" id="DivFechaApertura" class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaApertura" Text="<%= DateTime.Now.ToShortDateString();%>" runat="server" Style="margin-left: -5px;" CssClass="form-control" Width="121px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioFechaApertura" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<label for="<%= TxtFechaApertura.ClientID.ToString()%>" style="width: 125px !important;"><span style="color: #F3565D">*</span> Apertura:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaApertura" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtFechaApertura" ErrorMessage="El campo <b>''Fecha de Apertura''</b> es necesario." ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
<ajax:MaskedEditExtender ID="MEETxtFechaApertura" runat="server" TargetControlID="TxtFechaApertura" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CETxtFechaApertura" runat="server" TargetControlID="TxtFechaApertura" PopupButtonID="imgCalendarioFechaApertura" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RangeValidator ID="RVFechaApertura" runat="server" CssClass="help-block errorimput" ErrorMessage="La <b>''Fecha de Apertura''</b> esta fuera de rango." ControlToValidate="TxtFechaApertura" Type="Date"></asp:RangeValidator>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server" MaxLength="15" Style="text-align: right;" onkeyup="FormatoMoneda(this)"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVTxtPuestoContactoProveedor" runat="server" ControlToValidate="TxtPuestoContactoProveedor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puesto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarContactoProveedor"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtImporte.ClientID.ToString()%>" style="width: 90%;">Importe de Venta:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtComision" Text="0.00" CssClass="form-control " runat="server" MaxLength="15" Style="text-align: right;" onkeyup="FormatoMoneda(this)"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVTxtPuestoContactoProveedor" runat="server" ControlToValidate="TxtPuestoContactoProveedor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puesto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarContactoProveedor"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtComision.ClientID.ToString()%>" style="width: 90%;">Comisión:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlProbabilidadAcercamiento" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" Class="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlProbabilidadAcercamiento.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Probabilidad de Acercamiento:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVProbabilidad" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlProbabilidadAcercamiento" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Probabilidad''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrioridadAcercamiento" runat="server" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Value="1" Text="Baja"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Media"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Alta"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%=DdlPrioridadAcercamiento.ClientID.ToString()%>">Prioridad:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardarAcercamiento" OnClick="BtnGuardarAcercamiento_Click" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VGAcercamiento" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<%-- END MODAL AGREGAR ACERCAMIENTO --%>
|
||||
|
||||
<%-- MODAL OBSERVACIONES BITACORA --%>
|
||||
<div id="ModalBitacora" 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">Bitácora</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-8 form-md-line-input input-iconright">
|
||||
<asp:TextBox BackColor="#f9f9f9" ID="TxtEventoDescripcion" MaxLength="5000" Style="margin-top: 10px;" runat="server" TextMode="MultiLine" CausesValidation="true" Width="100%" CssClass="form-control MultiLineTextBox" Columns="60" Rows="6"></asp:TextBox>
|
||||
<label for="<%= TxtEventoDescripcion.ClientID.ToString()%>" style="height: 160px; width: 368px;">Bitácora/Observaciones:</label>
|
||||
|
||||
<%--<asp:CheckBox ID="ChkEventoPrioridad" CssClass="md-checksd2" Text="Bitácora de Atención" runat="server" />--%>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div>
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%--<div>
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div> --%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardarEventoBitacora" OnClick="BtnGuardarEventoBitacora_Click" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- FIN MODAL BITACORA --%>
|
||||
|
||||
<%-- MODAL AGENDA --%>
|
||||
<div id="ModalAgenda" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAgenda" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<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">Agendar Evento</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoAgenda" Width="100%" DataTextField="AgendaTipo" DataValueField="CveAgendaTipo" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true">
|
||||
</asp:DropDownList>
|
||||
<label for="<%=DdlTipoAgenda.ClientID.ToString()%>">Tipo de Asunto:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrioridadAgenda" Width="100%" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Baja" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Media" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Alta" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%=DdlPrioridadAgenda.ClientID.ToString()%>">Prioridad:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlContactoAgenda" Width="100%" DataTextField="Nombre" DataValueField="CveContacto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true">
|
||||
</asp:DropDownList>
|
||||
<label for="<%=DdlContactoAgenda.ClientID.ToString()%>">Contacto:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAsuntoAgenda" MaxLength="100" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVAsuntoAgenda" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsuntoAgenda" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtAsuntoAgenda.ClientID.ToString()%>">Asunto:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcionAgenda" MaxLength="5000" TextMode="MultiLine" Rows="2" CssClass="form-control MultiLineTextBox" runat="server" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcionAgenda" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcionAgenda" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtDescripcionAgenda.ClientID.ToString()%>" style="height: 60px;">Descripción:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="col-md-4 input-group input-sm date date-picker" data-date-format="dd/mm/yyyy hh:mm">
|
||||
|
||||
<asp:TextBox ID="TxtFechaInicioAgenda" runat="server" Width="100%" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||
<label for="<%= TxtFechaInicioAgenda.ClientID.ToString()%>"><span style='color: #F3565D'>*</span> Fecha de Inicio:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicioAgenda" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtFechaInicioAgenda" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Fecha de Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardarAgenda" OnClick="BtnGuardarAgenda_Click" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VGGuardarAgenda" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<%-- FIN MODAL BITACORA --%>
|
||||
|
||||
<%-- FIN MODALES --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
<%-- function activaDivEncuesta() {
|
||||
var check = (document.getElementById('C_TabEmpresaCRM_TabEmpresaContactos_ChkAplicaEncuesta').checked) ? 'inline' : 'none';
|
||||
document.getElementById('C_TabEmpresaCRM_TabEmpresaContactos_DivEncuesta').style.display = check;
|
||||
//document.getElementById("C_TabEmpresaCRM_TabEmpresaContactos_DdlEncuesta").value = -1;
|
||||
__doPostBack(<%=DdlEncuesta.ClientID.ToString()%>, '');
|
||||
}--%>
|
||||
|
||||
function validate(evt) {
|
||||
var theEvent = evt || window.event;
|
||||
var key = theEvent.keyCode || theEvent.which;
|
||||
key = String.fromCharCode(key);
|
||||
var regex = /[0-9]|\./;
|
||||
if (!regex.test(key)) {
|
||||
theEvent.returnValue = false;
|
||||
if (theEvent.preventDefault) theEvent.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function CompletaDescripcion(text) {
|
||||
$('#<%= TxtDescripcionAcercamiento.ClientID %>').val(text.value);
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
1426
CRM/EmpresaCRM.aspx.cs
Normal file
1426
CRM/EmpresaCRM.aspx.cs
Normal file
File diff suppressed because it is too large
Load Diff
167
CRM/PopUpBuscarAcercamiento.aspx
Normal file
167
CRM/PopUpBuscarAcercamiento.aspx
Normal file
@@ -0,0 +1,167 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="PopUpBuscarAcercamiento.aspx.cs" Inherits="CRM_PopUpBuscarAcercamiento" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
Búsqueda de Acercamientos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="Widthall">
|
||||
<tr>
|
||||
<td class="Titulos" colspan="4">Filtros para búsqueda</td>
|
||||
</tr>
|
||||
|
||||
<tr align="left">
|
||||
<td class="text-right"><b>Acercamiento:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtAcercamiento" runat="server" MaxLength="90" Width="200px"></asp:TextBox></td>
|
||||
</tr>
|
||||
|
||||
<tr align="left" visible="true">
|
||||
<td class="text-right" style="width: 140px;"><b>Empresa CRM:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEmpresaCRM" runat="server" AppendDataBoundItems="true" DataTextField="Empresa" DataValueField="CveEmpresaCRM" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
||||
</td>
|
||||
<td class="text-right" style="width: 140px;"><b>Tipo de Proceso:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" AppendDataBoundItems="true" DataTextField="TipoProceso" DataValueField="CveTipoProceso" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr align="left" visible="true">
|
||||
<td class="text-right" style="width: 140px;"><b>Vendedor:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
||||
</td>
|
||||
<td class="text-right" style="width: 140px;"><b>Medio de Captación:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" AppendDataBoundItems="true" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr align="left" visible="true">
|
||||
<td class="text-right" style="width: 140px;"><b>Motivo de Rechazo:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlRechazoMotivo" runat="server" AppendDataBoundItems="true" DataTextField="RechazoMotivo" DataValueField="CveRechazoMotivo" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
||||
</td>
|
||||
<td class="text-right" style="width: 140px;"><b>Probabilidad:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlProbabilidad" runat="server" AppendDataBoundItems="true" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="RowFechas" align="left">
|
||||
<td class="text-right" style="width: 140px"><b>Fecha Apertura:</b></td>
|
||||
<td style="width: 200px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 117px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaApertura" runat="server" CssClass="form-control" Width="170px" Height="30px" Style="padding: 0px" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaApertura" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server" Width="30px"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaApertura" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFechaApertura" PopupButtonID="LnkFechaApertura" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right" style="width: 140px;"><b>Fecha Cierre:</b></td>
|
||||
<td style="width: 200px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 117px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaCierre" runat="server" CssClass="form-control" Width="170px" Height="30px" Style="padding: 0px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaCierre" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server" Width="30px"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaEstimada" runat="server" TargetControlID="TxtFechaCierre" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaEstimada" TargetControlID="TxtFechaCierre" PopupButtonID="LnkFechaCierre" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: center;" colspan="4">
|
||||
<asp:Button ID="BtnBuscar" OnClick="BtnBuscar_Click" runat="server" Text="Buscar" class="btn btn-primary" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table id="TblBusqueda" runat="server" visible="false" style="width: 100%">
|
||||
<tr>
|
||||
<td style="text-align: left">Número de registros encontrados: <b><asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b></td>
|
||||
<td>
|
||||
<div id="DivBusqueda" runat="server" align="right" style="margin-right: 30px!important;" visible="false">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div style="overflow-y: auto; width: 758px; height: 200px;">
|
||||
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveAcercamiento, CveContactoPrincipal, Contacto, CveTipoProceso, TipoProceso, CveEtapaProcesoActual, EtapaProcesoActual, CveVendedor, Vendedor, CveMedioCaptacion, MedioCaptacion, CveRechazoMotivo, RechazoMotivo, CveProbabilidadAcercamiento, ProbabilidadAcercamiento, NombreAcercamiento, FechaApertura, FechaCierre, Importe, Comision"
|
||||
AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros con los filtros especificados" CssClass="table table-striped table-advance table-hover" Width="740px" GridLines="None"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Proceso" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoProceso" runat="server" Text='<%# Eval("TipoProceso") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Acercamiento" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink NavigateUrl="#" Target="_blank" ID="HplNombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Etapa Actual" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEtapaProcesoActual" runat="server" Text='<%# Eval("EtapaProcesoActual")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Medio de Captación" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblMedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="10%" HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField ItemStyle-Width="10%" DataField="Importe" HeaderText="Importe" DataFormatString="{0:C2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField ItemStyle-Width="10%" DataField="FechaApertura" HeaderText="Apertura" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField ItemStyle-Width="10%" DataField="FechaCierre" HeaderText="Cierre" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
118
CRM/PopUpBuscarAcercamiento.aspx.cs
Normal file
118
CRM/PopUpBuscarAcercamiento.aspx.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
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.IO;
|
||||
using System.Data;
|
||||
|
||||
public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
((BaseMasterPage)this.Master).EsPopup = true;
|
||||
CargaFiltros();
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGA FILTROS"
|
||||
protected void CargaFiltros()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
|
||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
||||
DdlProbabilidad.Items.Insert(0, new ListItem("Todas ", "-1"));
|
||||
}
|
||||
if (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlEmpresaCRM.DataSource = ObjCRM.DtResultados;
|
||||
DdlEmpresaCRM.Items.Insert(0, new ListItem("Todas ", "-1"));
|
||||
}
|
||||
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||
DdlTipoProceso.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
}
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
}
|
||||
|
||||
if (ObjCRM.GetRechazoMotivo(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlRechazoMotivo.DataSource = ObjCRM.DtResultados;
|
||||
DdlRechazoMotivo.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
}
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlVendedor.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor);
|
||||
ObjCRM.Dispose();
|
||||
|
||||
DdlProbabilidad.DataBind();
|
||||
DdlEmpresaCRM.DataBind();
|
||||
DdlTipoProceso.DataBind();
|
||||
DdlVendedor.DataBind();
|
||||
DdlMedioCaptacion.DataBind();
|
||||
DdlRechazoMotivo.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "CARGA DATOS"
|
||||
|
||||
protected void BtnBuscar_Click(object sender, EventArgs e)
|
||||
{
|
||||
TblBusqueda.Visible = true;
|
||||
CargaDatos();
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DataKey("CveAcercamiento").ToEntero() > 0)
|
||||
e.Row.FCHyperLink("HplNombreAcercamiento").NavigateUrl = String.Format("/CRM/Acercamiento.aspx?CveAcercamiento={0}", e.Row.DataKey("CveAcercamiento"));
|
||||
}
|
||||
}
|
||||
|
||||
protected void CargaDatos()
|
||||
{
|
||||
int CveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero();
|
||||
int CveEmpresaCRM = DdlEmpresaCRM.SelectedValue.ToEntero();
|
||||
|
||||
int CveVendedor = DdlVendedor.SelectedValue.ToEntero();
|
||||
int CveMedioCaptacion = DdlMedioCaptacion.SelectedValue.ToEntero();
|
||||
|
||||
int CveRechazoMotivo = DdlRechazoMotivo.SelectedValue.ToEntero();
|
||||
int CveProbabilidad = DdlProbabilidad.SelectedValue.ToEntero();
|
||||
|
||||
string FechaApertura = TxtFechaApertura.Text == "" ? "-1" : TxtFechaApertura.Text;
|
||||
string FechaCierre = TxtFechaCierre.Text == "" ? "-1" : TxtFechaCierre.Text;
|
||||
string NombreAcercamiento = TxtAcercamiento.Text == "" ? "-1" : TxtAcercamiento.Text;
|
||||
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM, -1, CveTipoProceso, CveVendedor, "-1", "-1", NombreAcercamiento, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidad, FechaApertura, FechaCierre))
|
||||
{
|
||||
GVDatos.DataSource = ObjCRM.DtResultados;
|
||||
GVDatos.DataBind();
|
||||
|
||||
LtlTotalRegistros.Text = ObjCRM.DtResultados.Rows.Count.ToString();
|
||||
if (ObjCRM.DtResultados.Rows.Count > 0)
|
||||
DivBusqueda.Visible = true;
|
||||
else
|
||||
DivBusqueda.Visible = false;
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
UPDatos.Update();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
122
CRM/RepAcercamientos.aspx
Normal file
122
CRM/RepAcercamientos.aspx
Normal file
@@ -0,0 +1,122 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepAcercamientos.aspx.cs" Inherits="CRM_RepAcercamientos" %>
|
||||
|
||||
<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="E" runat="Server">
|
||||
Reporte de Acercamientos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivFiltros" class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" ValidationGroup="Valida" />
|
||||
<%--<a href="javascript:;" class="expand"></a>--%>
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
<label class="col-md-1 " style="width: 90px; margin-top: 5px;">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 " style="width: 90px; margin-top: 5px;">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 " style="width: 90px; margin-top: 5px;">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="portlet-body" style="display: none;">
|
||||
<div class="row" style="margin-left: 10px; margin-top: 10px;">
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveAcercamiento, CveContactoPrincipal, Contacto, CveTipoProceso, TipoProceso, CveEtapaProcesoActual, EtapaProcesoActual, CveVendedor, Vendedor, CveMedioCaptacion,
|
||||
MedioCaptacion, CveRechazoMotivo, RechazoMotivo, CveProbabilidadAcercamiento, ProbabilidadAcercamiento, NombreAcercamiento, FechaApertura, FechaCierre, Importe, Comision"
|
||||
AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros con los filtros especificados" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" GridLines="None"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Proceso" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoProceso" runat="server" Text='<%# Eval("TipoProceso") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Acercamiento" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink NavigateUrl="#" Target="_blank" ID="HplNombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Etapa Actual" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEtapaProcesoActual" runat="server" Text='<%# Eval("EtapaProcesoActual")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Medio de Captación" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblMedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="10%" HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField ItemStyle-Width="10%" DataField="Importe" HeaderText="Importe" DataFormatString="{0:C2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField ItemStyle-Width="10%" DataField="FechaApertura" HeaderText="Apertura" DataFormatString="{0:g}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField ItemStyle-Width="10%" DataField="FechaCierre" HeaderText="Cierre" DataFormatString="{0:g}" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
83
CRM/RepAcercamientos.aspx.cs
Normal file
83
CRM/RepAcercamientos.aspx.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class CRM_RepAcercamientos : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private int CveVendedor
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveVendedor"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveVendedor"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaDatos();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGA DATOS"
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void CargaDatos()
|
||||
{
|
||||
CveVendedor = DdlVendedor.SelectedValue.ToEntero();
|
||||
|
||||
string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
|
||||
string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
|
||||
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin))
|
||||
{
|
||||
GVDatos.DataSource = ObjCRM.DtResultados;
|
||||
GVDatos.DataBind();
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DataKey("CveAcercamiento").ToEntero() > 0)
|
||||
e.Row.FCHyperLink("HplNombreAcercamiento").NavigateUrl = String.Format("/CRM/Acercamiento.aspx?CveAcercamiento={0}", e.Row.DataKey("CveAcercamiento"));
|
||||
}
|
||||
}
|
||||
|
||||
protected void InicializaDatos()
|
||||
{
|
||||
CveVendedor = UsuarioActual.CveVendedor;
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlVendedor.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
DdlVendedor.DataBind();
|
||||
|
||||
DdlVendedor.SelectedValueExist(CveVendedor);
|
||||
|
||||
//CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL
|
||||
TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).ToShortDateString();
|
||||
//TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
252
CRM/RepAcercamientosProcesos.aspx
Normal file
252
CRM/RepAcercamientosProcesos.aspx
Normal file
@@ -0,0 +1,252 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepAcercamientosProcesos.aspx.cs" Inherits="CRM_RepAcercamientosProcesos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Filtros {
|
||||
padding: 10px;
|
||||
background-color: #C3C3C3;
|
||||
}
|
||||
|
||||
.Filtros label, .Filtros .form-group.form-md-line-input .form-control ~ label {
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.form-group.form-md-line-input .form-control {
|
||||
background-color: #fff;
|
||||
}
|
||||
.GVRep tr td a{
|
||||
display:block;
|
||||
text-align:center;
|
||||
}
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="upDatosRepA" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="Filtros">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Vendedor:" AssociatedControlID="DdlVendedor"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Medio de Captación:" AssociatedControlID="DdlMedioCaptacion"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlProbabilidad" runat="server" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Probabilidad:" AssociatedControlID="DdlProbabilidad"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1 text-right">
|
||||
<br />
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" CssClass="btn btn-default">Consultar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlGrupo1" runat="server" CssClass="form-control input-sm select2me Widthall">
|
||||
<asp:ListItem Value="1" Text="Vendedor" Selected="true"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Medio de Captación"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Agrupado Por:" AssociatedControlID="DdlGrupo1"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="display:none;">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlGrupo2" runat="server" CssClass="form-control input-sm select2me Widthall">
|
||||
<asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Vendedor"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Medio Captacion"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="">
|
||||
<asp:Label runat="server" Text="Fecha Inicio:" AssociatedControlID="TxtFechaInicio"></asp:Label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="">
|
||||
<asp:Label runat="server" Text="Fecha Fin:" AssociatedControlID="TxtFechaFin"></asp:Label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GVRepAcercamientosEtapas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRep" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveGrupo1,Grupo1,CveGrupo2,Grupo2" ShowHeaderWhenEmpty="true">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Grupo1">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblgrupo1" runat="server" Text='<%# Eval("Grupo1")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Grupo2">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblgrupo2" runat="server" Text='<%# Eval("Grupo2")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlGrafica_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function CargaGraficaBarras(data) {
|
||||
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b>",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaPastel(data) {
|
||||
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
292
CRM/RepAcercamientosProcesos.aspx.cs
Normal file
292
CRM/RepAcercamientosProcesos.aspx.cs
Normal file
@@ -0,0 +1,292 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using Extensiones;
|
||||
|
||||
public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private string Agrupador
|
||||
{
|
||||
get { return (ViewState["Agrupador"] == null) ? "" : (ViewState["Agrupador"]).ToString(); }
|
||||
set { ViewState["Agrupador"] = value; }
|
||||
}
|
||||
|
||||
private DataTable DtColor
|
||||
{
|
||||
get { return DtColor = (DataTable)ViewState["DtColor"]; }
|
||||
set { ViewState["DtColor"] = value; }
|
||||
}
|
||||
|
||||
private DataTable DtDatos
|
||||
{
|
||||
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
||||
set { ViewState["DtDatos"] = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
DateTime startOfWeek = DateTime.Today.AddDays(-1 * (int)(DateTime.Today.DayOfWeek));
|
||||
TxtFechaInicio.Text = startOfWeek.ToString("dd/MM/yyyy");
|
||||
TxtFechaFin.Text = startOfWeek.AddDays(7).ToString("dd/MM/yyyy");
|
||||
CargaDdl();
|
||||
cargarDatos();
|
||||
CreaDtColor();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void CargaDdl()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
DdlTipoProceso.DataSource = null;
|
||||
DdlVendedor.DataSource = null;
|
||||
DdlMedioCaptacion.DataSource = null;
|
||||
DdlProbabilidad.DataSource = null;
|
||||
|
||||
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||
}
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||
}
|
||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
|
||||
DdlTipoProceso.DataBind();
|
||||
DdlVendedor.DataBind();
|
||||
DdlMedioCaptacion.DataBind();
|
||||
DdlProbabilidad.DataBind();
|
||||
DdlVendedor.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlVendedor.SelectedValue = "-1";
|
||||
DdlMedioCaptacion.SelectedValue = "-1";
|
||||
DdlProbabilidad.SelectedValue = "-1";
|
||||
DdlTipoProceso.SelectedIndex = 0;
|
||||
upDatosRepA.Update();
|
||||
}
|
||||
protected void cargarDatos()
|
||||
{
|
||||
int cveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero();
|
||||
int idgrupo1 = DdlGrupo1.SelectedValue.ToEntero();
|
||||
int idgrupo2 = DdlGrupo2.SelectedValue.ToEntero();
|
||||
string fechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
|
||||
string fechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
|
||||
int cveVendedor = DdlVendedor.SelectedValue.ToEntero();
|
||||
int cveMedioCaptacion = DdlMedioCaptacion.SelectedValue.ToEntero();
|
||||
int cveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero();
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
GVRepAcercamientosEtapas.Columns.Clear();
|
||||
|
||||
if (ObjCRM.RepAcercamientosEtapas(UsuarioActual.CveEmpresa, cveTipoProceso, idgrupo1, idgrupo2, fechaIni, fechaFin, cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento))
|
||||
{
|
||||
DataTable dte = ObjCRM.DSResultados.Tables[1];
|
||||
GVRepAcercamientosEtapas.DataSource = ObjCRM.DSResultados.Tables[0];
|
||||
DtDatos= ObjCRM.DSResultados.Tables[0];
|
||||
BoundField test = new BoundField();
|
||||
test.DataField = "Grupo1";
|
||||
test.HeaderText = "";
|
||||
switch (idgrupo1)
|
||||
{
|
||||
case 1:
|
||||
test.HeaderText = "Vendedor";
|
||||
Agrupador = "Vendedor";
|
||||
break;
|
||||
case 2:
|
||||
test.HeaderText = "Medio de Captación";
|
||||
Agrupador = "Medio de Captación";
|
||||
break;
|
||||
case 3:
|
||||
test.HeaderText = "Probabilidad de Acercamiento";
|
||||
Agrupador = "Probabilidad de Acercamiento";
|
||||
break;
|
||||
case 4:
|
||||
test.HeaderText = "Fecha";
|
||||
Agrupador = "Fecha";
|
||||
break;
|
||||
}
|
||||
GVRepAcercamientosEtapas.Columns.Add(test);
|
||||
|
||||
HyperLinkField hypt = new HyperLinkField();
|
||||
hypt.DataTextField = $"Total";
|
||||
hypt.HeaderText = $"Total";
|
||||
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" };
|
||||
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}";
|
||||
GVRepAcercamientosEtapas.Columns.Add(hypt);
|
||||
foreach (DataRow row in dte.Rows)
|
||||
{
|
||||
HyperLinkField hyp = new HyperLinkField();
|
||||
hyp.DataTextField = $"C_{row["CveEtapaProceso"]}";
|
||||
hyp.HeaderText = $"{row["EtapaProceso"]}";
|
||||
hyp.DataNavigateUrlFields = new string[]{ "CveGrupo1","CveGrupo2"};
|
||||
hyp.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}&cveEtapaProceso={row["CveEtapaProceso"]}";
|
||||
GVRepAcercamientosEtapas.Columns.Add(hyp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GVRepAcercamientosEtapas.DataSource = null;
|
||||
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
GVRepAcercamientosEtapas.DataBind();
|
||||
upDatosRepA.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
cargarDatos();
|
||||
}
|
||||
|
||||
private void CreaDtColor()
|
||||
{
|
||||
DtColor = new DataTable();
|
||||
DtColor.Columns.Add("Color");
|
||||
DataRow RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#FF0F00";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#FF6600";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#FF9E01";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#FCD202";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#F8FF01";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#B0DE09";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#04D215";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#0D8ECF";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#0D52D1";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#2A0CD0";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#8A0CCF";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#CD0D74";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#754DEB";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#DDDDDD";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#999999";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#333333";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#000000";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
}
|
||||
|
||||
protected void LnkVerGrafica_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DtDatos != null)
|
||||
{
|
||||
if (DtDatos.Rows.Count < 1)
|
||||
{
|
||||
Alert("No hay datos disponibles", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
LblTituloGrafica.Text = $"Agrupado por: {Agrupador}";
|
||||
RegistraScript("$('#DivModalGrafica').modal('show')");
|
||||
CambioGrafica();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No hay datos disponibles", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
protected void DdlGrafica_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CambioGrafica();
|
||||
}
|
||||
|
||||
private void CambioGrafica()
|
||||
{
|
||||
DataTable Dt = new DataTable();
|
||||
Dt.Columns.Add("Texto");
|
||||
Dt.Columns.Add("Valor");
|
||||
Dt.Columns.Add("Color");
|
||||
|
||||
int RowColorIndex = 0;
|
||||
foreach (DataRow Dr in DtDatos.Rows)
|
||||
{
|
||||
DataRow Row = Dt.NewRow();
|
||||
Row["Texto"] = $"{Dr["Grupo1"].ToString()}";
|
||||
Row["Valor"] = Dr["TOTAL"].ToString().FormatoNumero();
|
||||
Row["Color"] = DtColor.Rows[RowColorIndex]["Color"].ToString();
|
||||
Dt.Rows.Add(Row);
|
||||
RowColorIndex++;
|
||||
if (RowColorIndex == 17) { RowColorIndex = 0; }
|
||||
}
|
||||
|
||||
var query = from s in Dt.AsEnumerable()
|
||||
select new
|
||||
{
|
||||
Texto = s["Texto"].ToString(),
|
||||
Valor = s["Valor"].ToString().ToDouble(),
|
||||
Color = s["Color"].ToString()
|
||||
};
|
||||
var json = Newtonsoft.Json.JsonConvert.SerializeObject(query);
|
||||
switch (DdlGrafica.SelectedValue.ToEntero())
|
||||
{
|
||||
case 1:
|
||||
RegistraScript($"CargaGraficaBarras({json})", "22");
|
||||
break;
|
||||
case 2:
|
||||
RegistraScript($"CargaGraficaPastel({json})", "22");
|
||||
break;
|
||||
}
|
||||
UPModalProd.Update();
|
||||
}
|
||||
}
|
||||
73
CRM/RepAcercamientosProcesosDetalle.aspx
Normal file
73
CRM/RepAcercamientosProcesosDetalle.aspx
Normal file
@@ -0,0 +1,73 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepAcercamientosProcesosDetalle.aspx.cs" Inherits="CRM_RepAcercamientosProcesosDetalle" %>
|
||||
|
||||
<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="E" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="upDatosRepA" runat ="server" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVRepAcercamientosDetalle" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" DataKeyNames="CveAcercamiento">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Empresa">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblempresa" runat="server" Text='<%# Eval("Empresa")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Vendedor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblvendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Medio Captacion">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblmedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Etapa Proceso">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbletapaProceso" runat="server" Text='<%# Eval("EtapaProceso")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Probabilidad Acercamiento">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblprobabilidadAcercamiento" runat="server" Text='<%# Eval("ProbabilidadAcercamiento")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre Acercamiento">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblnombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblnombre" runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Telefono Oficina">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbltelefonoOficina" runat="server" Text='<%# Eval("TelefonoOficina")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblcelular" runat="server" Text='<%# Eval("Celular")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
93
CRM/RepAcercamientosProcesosDetalle.aspx.cs
Normal file
93
CRM/RepAcercamientosProcesosDetalle.aspx.cs
Normal file
@@ -0,0 +1,93 @@
|
||||
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 CRM_RepAcercamientosProcesosDetalle : ClsPaginas
|
||||
{
|
||||
#region Propiedades
|
||||
private int RcveVendedor
|
||||
{
|
||||
get { return (ViewState["RcveVendedor"] == null) ? 0 : Convert.ToInt32(ViewState["RcveVendedor"]); }
|
||||
set { ViewState["RcveVendedor"] = value; }
|
||||
}
|
||||
private int RcveMedioCaptacion
|
||||
{
|
||||
get { return (ViewState["RcveMedioCaptacion"] == null) ? 0 : Convert.ToInt32(ViewState["RcveMedioCaptacion"]); }
|
||||
set { ViewState["RcveMedioCaptacion"] = value; }
|
||||
}
|
||||
private int RcveProbabilidadAcercamiento
|
||||
{
|
||||
get { return (ViewState["RcveProbabilidadAcercamiento"] == null) ? 0 : Convert.ToInt32(ViewState["RcveProbabilidadAcercamiento"]); }
|
||||
set { ViewState["RcveProbabilidadAcercamiento"] = value; }
|
||||
}
|
||||
private int RcveEtapaProceso
|
||||
{
|
||||
get { return (ViewState["RcveEtapaProceso"] == null) ? 0 : Convert.ToInt32(ViewState["RcveEtapaProceso"]); }
|
||||
set { ViewState["RcveEtapaProceso"] = value; }
|
||||
}
|
||||
private string RsFecha
|
||||
{
|
||||
get { return (ViewState["RsFecha"] == null) ? "" : Convert.ToString(ViewState["RsFecha"]); }
|
||||
set { ViewState["RsFecha"] = value; }
|
||||
}
|
||||
private string RsFechaIni
|
||||
{
|
||||
get { return (ViewState["RsFechaIni"] == null) ? "" : Convert.ToString(ViewState["RsFechaIni"]); }
|
||||
set { ViewState["RsFechaIni"] = value; }
|
||||
}
|
||||
private string RsFechaFin
|
||||
{
|
||||
get { return (ViewState["RsFechaFin"] == null) ? "" : Convert.ToString(ViewState["RsFechaFin"]); }
|
||||
set { ViewState["RsFechaFin"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
int CveTipoProceso = Request["CveTipoProceso"] == null ? -1 : Request["CveTipoProceso"].ToString().ToEntero();
|
||||
RcveVendedor = Request["cveVendedor"] == null ? -1 : Request["cveVendedor"].ToString().ToEntero();
|
||||
RcveMedioCaptacion = Request["cveMedioCaptacion"] == null ? -1 : Request["cveMedioCaptacion"].ToString().ToEntero();
|
||||
RcveProbabilidadAcercamiento = Request["cveProbabilidadAcercamiento"] == null ? -1 : Request["cveProbabilidadAcercamiento"].ToString().ToEntero();
|
||||
RcveEtapaProceso = Request["cveEtapaProceso"] == null ? -1 : Request["cveEtapaProceso"].ToString().ToEntero();
|
||||
RsFecha = Request["Fecha"] == null ? "" : Request["Fecha"].ToString();
|
||||
RsFechaIni = Request["FechaInicio"] == null ? "" : Request["FechaInicio"].ToString();
|
||||
RsFechaFin = Request["FechaFin"] == null ? "" : Request["FechaFin"].ToString();
|
||||
try { RsFechaIni = RsFechaIni.ToDateTime().ToString("yyyy/MM/dd"); }
|
||||
catch (Exception) { RsFechaIni = ""; }
|
||||
try { RsFechaFin = RsFechaFin.ToDateTime().ToString("yyyy/MM/dd"); }
|
||||
catch (Exception) { RsFechaFin = ""; }
|
||||
switch (CveTipoProceso)
|
||||
{
|
||||
case 1:
|
||||
RcveVendedor = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
|
||||
break;
|
||||
case 2:
|
||||
RcveMedioCaptacion = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
|
||||
break;
|
||||
case 3:
|
||||
RcveProbabilidadAcercamiento = Request["CveGrupo1"] == null ? -1 : Request["CveGrupo1"].ToString().ToEntero();
|
||||
break;
|
||||
case 4:
|
||||
RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString();
|
||||
break;
|
||||
}
|
||||
cargarDatos();
|
||||
}
|
||||
}
|
||||
protected void cargarDatos()
|
||||
{
|
||||
ClsCRM ObjRepA = new ClsCRM();
|
||||
ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa,RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin);
|
||||
GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados;
|
||||
ObjRepA.Dispose();
|
||||
GVRepAcercamientosDetalle.DataBind();
|
||||
upDatosRepA.Update();
|
||||
}
|
||||
}
|
||||
254
CRM/RepAcercamientosRechazos.aspx
Normal file
254
CRM/RepAcercamientosRechazos.aspx
Normal file
@@ -0,0 +1,254 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepAcercamientosRechazos.aspx.cs" Inherits="CRM_RepAcercamientosRechazos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Filtros {
|
||||
padding: 10px;
|
||||
background-color: #C3C3C3;
|
||||
}
|
||||
|
||||
.Filtros label, .Filtros .form-group.form-md-line-input .form-control ~ label {
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.form-group.form-md-line-input .form-control {
|
||||
background-color: #fff;
|
||||
}
|
||||
.GVRep tr td a{
|
||||
display:block;
|
||||
text-align:center;
|
||||
}
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="upDatosRepA" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="Filtros">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Vendedor:" AssociatedControlID="DdlVendedor"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Medio de Captación:" AssociatedControlID="DdlMedioCaptacion"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlProbabilidad" runat="server" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Probabilidad:" AssociatedControlID="DdlProbabilidad"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1 text-right">
|
||||
<br />
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" CssClass="btn btn-default">Consultar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlGrupo1" runat="server" CssClass="form-control input-sm select2me Widthall">
|
||||
<asp:ListItem Value="1" Text="Vendedor" Selected="true"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Medio de Captación"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Agrupado Por:" AssociatedControlID="DdlGrupo1"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="display:none;">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlGrupo2" runat="server" CssClass="form-control input-sm select2me Widthall">
|
||||
<asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Vendedor"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Medio Captacion"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="">
|
||||
<asp:Label runat="server" Text="Fecha Inicio:" AssociatedControlID="TxtFechaInicio"></asp:Label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="">
|
||||
<asp:Label runat="server" Text="Fecha Fin:" AssociatedControlID="TxtFechaFin"></asp:Label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GVRepAcercamientosEtapas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRep" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveGrupo1,Grupo1,CveGrupo2,Grupo2" ShowHeaderWhenEmpty="true">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Grupo1">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblgrupo1" runat="server" Text='<%# Eval("Grupo1")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Grupo2">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblgrupo2" runat="server" Text='<%# Eval("Grupo2")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlGrafica_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function CargaGraficaBarras(data) {
|
||||
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b>",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaPastel(data) {
|
||||
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
292
CRM/RepAcercamientosRechazos.aspx.cs
Normal file
292
CRM/RepAcercamientosRechazos.aspx.cs
Normal file
@@ -0,0 +1,292 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using Extensiones;
|
||||
|
||||
public partial class CRM_RepAcercamientosRechazos : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private string Agrupador
|
||||
{
|
||||
get { return (ViewState["Agrupador"] == null) ? "" : (ViewState["Agrupador"]).ToString(); }
|
||||
set { ViewState["Agrupador"] = value; }
|
||||
}
|
||||
|
||||
private DataTable DtColor
|
||||
{
|
||||
get { return DtColor = (DataTable)ViewState["DtColor"]; }
|
||||
set { ViewState["DtColor"] = value; }
|
||||
}
|
||||
|
||||
private DataTable DtDatos
|
||||
{
|
||||
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
||||
set { ViewState["DtDatos"] = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
DateTime startOfWeek = DateTime.Today.AddDays(-1 * (int)(DateTime.Today.DayOfWeek));
|
||||
TxtFechaInicio.Text = startOfWeek.ToString("dd/MM/yyyy");
|
||||
TxtFechaFin.Text = startOfWeek.AddDays(7).ToString("dd/MM/yyyy");
|
||||
CargaDdl();
|
||||
cargarDatos();
|
||||
CreaDtColor();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void CargaDdl()
|
||||
{
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
DdlTipoProceso.DataSource = null;
|
||||
DdlVendedor.DataSource = null;
|
||||
DdlMedioCaptacion.DataSource = null;
|
||||
DdlProbabilidad.DataSource = null;
|
||||
|
||||
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
|
||||
}
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados;
|
||||
}
|
||||
if (ObjCRM.GetProbabilidadAcercamiento(UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
DdlProbabilidad.DataSource = ObjCRM.DtResultados;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
|
||||
DdlTipoProceso.DataBind();
|
||||
DdlVendedor.DataBind();
|
||||
DdlMedioCaptacion.DataBind();
|
||||
DdlProbabilidad.DataBind();
|
||||
DdlVendedor.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlProbabilidad.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlVendedor.SelectedValue = "-1";
|
||||
DdlMedioCaptacion.SelectedValue = "-1";
|
||||
DdlProbabilidad.SelectedValue = "-1";
|
||||
DdlTipoProceso.SelectedIndex = 0;
|
||||
upDatosRepA.Update();
|
||||
}
|
||||
protected void cargarDatos()
|
||||
{
|
||||
int cveTipoProceso = DdlTipoProceso.SelectedValue.ToEntero();
|
||||
int idgrupo1 = DdlGrupo1.SelectedValue.ToEntero();
|
||||
int idgrupo2 = DdlGrupo2.SelectedValue.ToEntero();
|
||||
string fechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
|
||||
string fechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
|
||||
int cveVendedor = DdlVendedor.SelectedValue.ToEntero();
|
||||
int cveMedioCaptacion = DdlMedioCaptacion.SelectedValue.ToEntero();
|
||||
int cveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero();
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
GVRepAcercamientosEtapas.Columns.Clear();
|
||||
|
||||
if (ObjCRM.RepAcercamientosRechazos(UsuarioActual.CveEmpresa, cveTipoProceso, idgrupo1, idgrupo2, fechaIni, fechaFin, cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento))
|
||||
{
|
||||
DataTable dte = ObjCRM.DSResultados.Tables[1];
|
||||
GVRepAcercamientosEtapas.DataSource = ObjCRM.DSResultados.Tables[0];
|
||||
DtDatos = ObjCRM.DSResultados.Tables[0];
|
||||
BoundField test = new BoundField();
|
||||
test.DataField = "Grupo1";
|
||||
test.HeaderText = "";
|
||||
switch (idgrupo1)
|
||||
{
|
||||
case 1:
|
||||
test.HeaderText = "Vendedor";
|
||||
Agrupador = "Vendedor";
|
||||
break;
|
||||
case 2:
|
||||
test.HeaderText = "Medio de Captación";
|
||||
Agrupador = "Medio de Captación";
|
||||
break;
|
||||
case 3:
|
||||
test.HeaderText = "Probabilidad de Acercamiento";
|
||||
Agrupador = "Probabilidad de Acercamiento";
|
||||
break;
|
||||
case 4:
|
||||
test.HeaderText = "Fecha";
|
||||
Agrupador = "Fecha";
|
||||
break;
|
||||
}
|
||||
GVRepAcercamientosEtapas.Columns.Add(test);
|
||||
|
||||
HyperLinkField hypt = new HyperLinkField();
|
||||
hypt.DataTextField = $"Total";
|
||||
hypt.HeaderText = $"Total";
|
||||
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" };
|
||||
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}";
|
||||
GVRepAcercamientosEtapas.Columns.Add(hypt);
|
||||
foreach (DataRow row in dte.Rows)
|
||||
{
|
||||
HyperLinkField hyp = new HyperLinkField();
|
||||
hyp.DataTextField = $"C_{row["CveRechazoMotivo"]}";
|
||||
hyp.HeaderText = $"{row["RechazoMotivo"]}";
|
||||
hyp.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" };
|
||||
hyp.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}&CveRechazoMotivo={row["CveRechazoMotivo"]}";
|
||||
GVRepAcercamientosEtapas.Columns.Add(hyp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GVRepAcercamientosEtapas.DataSource = null;
|
||||
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
GVRepAcercamientosEtapas.DataBind();
|
||||
upDatosRepA.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
cargarDatos();
|
||||
}
|
||||
|
||||
private void CreaDtColor()
|
||||
{
|
||||
DtColor = new DataTable();
|
||||
DtColor.Columns.Add("Color");
|
||||
DataRow RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#FF0F00";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#FF6600";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#FF9E01";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#FCD202";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#F8FF01";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#B0DE09";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#04D215";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#0D8ECF";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#0D52D1";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#2A0CD0";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#8A0CCF";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#CD0D74";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#754DEB";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#DDDDDD";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#999999";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#333333";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
RowColor = null;
|
||||
RowColor = DtColor.NewRow();
|
||||
RowColor["Color"] = "#000000";
|
||||
DtColor.Rows.Add(RowColor);
|
||||
}
|
||||
|
||||
protected void LnkVerGrafica_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DtDatos != null)
|
||||
{
|
||||
if (DtDatos.Rows.Count < 1)
|
||||
{
|
||||
Alert("No hay datos disponibles", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
LblTituloGrafica.Text = $"Agrupado por: {Agrupador}";
|
||||
RegistraScript("$('#DivModalGrafica').modal('show')");
|
||||
CambioGrafica();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No hay datos disponibles", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
protected void DdlGrafica_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CambioGrafica();
|
||||
}
|
||||
|
||||
private void CambioGrafica()
|
||||
{
|
||||
DataTable Dt = new DataTable();
|
||||
Dt.Columns.Add("Texto");
|
||||
Dt.Columns.Add("Valor");
|
||||
Dt.Columns.Add("Color");
|
||||
|
||||
int RowColorIndex = 0;
|
||||
foreach (DataRow Dr in DtDatos.Rows)
|
||||
{
|
||||
DataRow Row = Dt.NewRow();
|
||||
Row["Texto"] = $"{Dr["Grupo1"].ToString()}";
|
||||
Row["Valor"] = Dr["TOTAL"].ToString().FormatoNumero();
|
||||
Row["Color"] = DtColor.Rows[RowColorIndex]["Color"].ToString();
|
||||
Dt.Rows.Add(Row);
|
||||
RowColorIndex++;
|
||||
if (RowColorIndex == 17) { RowColorIndex = 0; }
|
||||
}
|
||||
|
||||
var query = from s in Dt.AsEnumerable()
|
||||
select new
|
||||
{
|
||||
Texto = s["Texto"].ToString(),
|
||||
Valor = s["Valor"].ToString().ToDouble(),
|
||||
Color = s["Color"].ToString()
|
||||
};
|
||||
var json = Newtonsoft.Json.JsonConvert.SerializeObject(query);
|
||||
switch (DdlGrafica.SelectedValue.ToEntero())
|
||||
{
|
||||
case 1:
|
||||
RegistraScript($"CargaGraficaBarras({json})", "22");
|
||||
break;
|
||||
case 2:
|
||||
RegistraScript($"CargaGraficaPastel({json})", "22");
|
||||
break;
|
||||
}
|
||||
UPModalProd.Update();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user