Cambios CRM
This commit is contained in:
@@ -7686,7 +7686,7 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'COMPU DN DIFUSA
|
'COMPU DN DIFUSA
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 137, 132, 144) Then
|
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 137, 132, 144, 177) Then
|
||||||
|
|
||||||
Dim FirmaVendedor As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveVendedor))
|
Dim FirmaVendedor As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveVendedor))
|
||||||
|
|
||||||
|
|||||||
@@ -291,7 +291,7 @@
|
|||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Label runat="server" ID="LblEncabezadoAcercamiento" Text=" Registro de Acercamiento"></asp:Label>
|
<asp:Label runat="server" ID="LblEncabezadoAcercamiento" Text=" Registro de Acercamiento/Oportunidad"></asp:Label>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -301,7 +301,7 @@
|
|||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkCerrarAcercamiento" OnClick="LnkCerrarAcercamiento_Click" Text="" runat="server" Style="cursor: pointer; margin-right: 5px;"><i class="fa fa-times"></i><span runat="server" id="SpanTituloCierre" style="padding-left: 5px;">Cerrar Acercamiento</span></asp:LinkButton>
|
<asp:LinkButton ID="LnkCerrarAcercamiento" OnClick="LnkCerrarAcercamiento_Click" Text="" runat="server" Style="cursor: pointer; margin-right: 5px;"><i class="fa fa-times"></i><span runat="server" id="SpanTituloCierre" style="padding-left: 5px;">Cerrar Acercamiento/Oportunidad</span></asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -364,7 +364,7 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="fa fa-users font-green"></i>
|
<i class="fa fa-users font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Datos del Acercamiento</span>
|
<span class="caption-subject bold uppercase">Datos del Acercamiento/Oportunidad</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -376,7 +376,7 @@
|
|||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtNombreAcercamiento" CssClass="form-control " runat="server" MaxLength="150"></asp:TextBox>
|
<asp:TextBox ID="TxtNombreAcercamiento" CssClass="form-control " runat="server" MaxLength="150"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVNombreAcercamiento" runat="server" ControlToValidate="TxtNombreAcercamiento" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Acercamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVNombreAcercamiento" runat="server" ControlToValidate="TxtNombreAcercamiento" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Acercamiento/Oportunidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtNombreAcercamiento.ClientID.ToString()%>">Proyecto:</label>
|
<label for="<%= TxtNombreAcercamiento.ClientID.ToString()%>">Proyecto:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -988,7 +988,7 @@
|
|||||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button ID="BtnGuardarAcercamiento" Visible="false" runat="server" OnClick="BtnGuardarAcercamiento_Click" CssClass="btn btn-primary" Text="Guardar" ValidationGroup="GrpGuardar" />
|
<asp:Button ID="BtnGuardarAcercamiento" Visible="false" runat="server" OnClick="BtnGuardarAcercamiento_Click" CssClass="btn btn-primary" Text="Guardar" ValidationGroup="GrpGuardar" />
|
||||||
<asp:Button ID="BtnEliminarAcercamiento" Visible="false" runat="server" OnClick="BtnEliminarAcercamiento_Click" CssClass="btn btn-danger" Text="Eliminar" AlternateText="Eliminar" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea continuar, esta acción eliminara todo registro del acercamiento?" data-btn-ok-label="si" />
|
<asp:Button ID="BtnEliminarAcercamiento" Visible="false" runat="server" OnClick="BtnEliminarAcercamiento_Click" CssClass="btn btn-danger" Text="Eliminar" AlternateText="Eliminar" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea continuar, esta acción eliminara todo registro del acercamiento/Oportunidad?" data-btn-ok-label="si" />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -271,6 +271,23 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int VendedorTipo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (ViewState["VendedorTipo"] == null)
|
||||||
|
{
|
||||||
|
ViewState["VendedorTipo"] = -1;
|
||||||
|
}
|
||||||
|
return ViewState["VendedorTipo"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["VendedorTipo"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } }
|
//public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } }
|
||||||
public System.Data.DataTable CheckListNew { get { return ViewState["CheckListNew"] != null ? (System.Data.DataTable)ViewState["CheckListNew"] : null; } set { ViewState["CheckListNew"] = value; } }
|
public System.Data.DataTable CheckListNew { get { return ViewState["CheckListNew"] != null ? (System.Data.DataTable)ViewState["CheckListNew"] : null; } set { ViewState["CheckListNew"] = value; } }
|
||||||
public int chklistitemindex { get { return ViewState["chklistitemindex"] != null ? ViewState["chklistitemindex"].ToString().ToEntero() : 0; } set { ViewState["chklistitemindex"] = value; } }
|
public int chklistitemindex { get { return ViewState["chklistitemindex"] != null ? ViewState["chklistitemindex"].ToString().ToEntero() : 0; } set { ViewState["chklistitemindex"] = value; } }
|
||||||
@@ -313,6 +330,14 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
}
|
}
|
||||||
CargarPS();
|
CargarPS();
|
||||||
//BtnGuardarAcercamiento.Visible = true;
|
//BtnGuardarAcercamiento.Visible = true;
|
||||||
|
|
||||||
|
if (!(Request["OPTAB"] == null))
|
||||||
|
{
|
||||||
|
if(Request["OPTAB"].ToString() == "COT")
|
||||||
|
{
|
||||||
|
TabsAcercamiento.ActiveTab = TabCotizaciones;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -432,6 +457,21 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
|
|
||||||
CargaImagenes();
|
CargaImagenes();
|
||||||
|
|
||||||
|
|
||||||
|
if (UsuarioActual.CveVendedor > 0)
|
||||||
|
{
|
||||||
|
ClsVtaVendedores ObjVendedores = new ClsVtaVendedores();
|
||||||
|
if (ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
if (ObjVendedores.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
VendedorTipo = ObjVendedores.DtResultados.FiltroPrimeroValor("VendedorTipo", $"CveVendedor = {UsuarioActual.CveVendedor}").ToEntero();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ObjVendedores.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
UpEncabezado.Update();
|
UpEncabezado.Update();
|
||||||
UPAcercamiento.Update();
|
UPAcercamiento.Update();
|
||||||
UPBitacoraEtapas.Update();
|
UPBitacoraEtapas.Update();
|
||||||
@@ -718,7 +758,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
HuboError = false;
|
HuboError = false;
|
||||||
CveEtapaActual = CveEtapaProcesoActualActualizar;
|
CveEtapaActual = CveEtapaProcesoActualActualizar;
|
||||||
HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString();
|
HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString();
|
||||||
Alert(String.Format("Se actualizó el acercamiento {0} de tipo {1}.", NombreAcercamiento, TipoProceso), ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert(String.Format("Se actualizó el acercamiento/oportunidad {0} de tipo {1}.", NombreAcercamiento, TipoProceso), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -798,7 +838,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert("No se actualizó el acercamiento.", ModExtensiones.TipoMensaje.ToastError);
|
Alert("No se actualizó el acercamiento/oportunidad.", ModExtensiones.TipoMensaje.ToastError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -841,12 +881,12 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
}
|
}
|
||||||
if (!HuboError)
|
if (!HuboError)
|
||||||
{
|
{
|
||||||
Alert("El Acercamiento ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion, String.Format("document.location.href=\"/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}\"", CveEmpresaCRM));
|
Alert("El Acercamiento/Oportunidad ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion, String.Format("document.location.href=\"/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}\"", CveEmpresaCRM));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert("No se puede eliminar el acercamiento porque el prospecto cuenta con cotizaciones/facturaciones previas.", ModExtensiones.TipoMensaje.MsgError);
|
Alert("No se puede eliminar el Acercamiento/Oportunidad porque el prospecto cuenta con cotizaciones/facturaciones previas.", ModExtensiones.TipoMensaje.MsgError);
|
||||||
}
|
}
|
||||||
|
|
||||||
objBitacora.Dispose();
|
objBitacora.Dispose();
|
||||||
@@ -941,9 +981,9 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
{
|
{
|
||||||
String MensajeBitacora = "";
|
String MensajeBitacora = "";
|
||||||
if (CveEtapaActual == CveEtapaCierre)
|
if (CveEtapaActual == CveEtapaCierre)
|
||||||
MensajeBitacora = String.Format("Se actualizó el cierre del acercamiento, con motivo {1} y fecha de {0} al {2}.", TituloCierre, DdlRechazoMotivo.SelectedItem.Text, TxtFechaCierreRechazo.Text);
|
MensajeBitacora = String.Format("Se actualizó el cierre del acercamiento/oportunidad, con motivo {1} y fecha de {0} al {2}.", TituloCierre, DdlRechazoMotivo.SelectedItem.Text, TxtFechaCierreRechazo.Text);
|
||||||
else
|
else
|
||||||
MensajeBitacora = String.Format("Se Cerró el acercamiento, con motivo {1} y fecha de {0} al {2}.", TituloCierre, DdlRechazoMotivo.SelectedItem.Text, TxtFechaCierreRechazo.Text);
|
MensajeBitacora = String.Format("Se Cerró el acercamiento/oportunidad, con motivo {1} y fecha de {0} al {2}.", TituloCierre, DdlRechazoMotivo.SelectedItem.Text, TxtFechaCierreRechazo.Text);
|
||||||
|
|
||||||
//if (ObjBitacora.AddEventoBitacora(MensajeBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveEtapaProcesoCRM: CveEtapaCierre))
|
//if (ObjBitacora.AddEventoBitacora(MensajeBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveEtapaProcesoCRM: CveEtapaCierre))
|
||||||
//{
|
//{
|
||||||
@@ -1262,7 +1302,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
//SOLO VENDEDOR ASIGNADO PUEDE EDITAR
|
//SOLO VENDEDOR ASIGNADO PUEDE EDITAR
|
||||||
if (CveVendedorAsignado != UsuarioActual.CveVendedor)
|
if( (CveVendedorAsignado != UsuarioActual.CveVendedor) & VendedorTipo != 2)
|
||||||
{
|
{
|
||||||
BtnGuardarAcercamiento.Visible = false;
|
BtnGuardarAcercamiento.Visible = false;
|
||||||
BtnEliminarAcercamiento.Visible = false;
|
BtnEliminarAcercamiento.Visible = false;
|
||||||
|
|||||||
@@ -321,7 +321,7 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<%-- SECCION ACERCAMIENTO --%>
|
<%-- SECCION ACERCAMIENTO --%>
|
||||||
<ajax:TabPanel ID="TabAcercamiento" runat="server" HeaderText="Acercamientos">
|
<ajax:TabPanel ID="TabAcercamiento" runat="server" HeaderText="Acercamientos/Oportunidades">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 ">
|
<div class="col-md-12 ">
|
||||||
@@ -329,11 +329,11 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Acercamientos Registrados </span>
|
<span class="caption-subject bold uppercase">Acercamientos/Oportunidades Registrados </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<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>
|
<asp:LinkButton runat="server" ID="LnkAgregarAcercamiento" Visible="false" OnClick="LnkAgregarAcercamiento_Click" data-toggle="tooltip" title="Agregar un Acercamiento/Oportunidad" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Acercamiento" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Acercamiento/Oportunidad" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink NavigateUrl="#" Target="_blank" ID="HplNombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:HyperLink>
|
<asp:HyperLink NavigateUrl="#" Target="_blank" ID="HplNombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -428,7 +428,7 @@
|
|||||||
EmptyDataRowStyle-HorizontalAlign="Center" ToolTip="Listado de Cotizaciones" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" AlternatingRowStyle-BorderStyle="None"
|
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">
|
GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" AutoGenerateColumns="false" OnRowDataBound="GvCotizacion_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField DataTextField="NombreAcercamientoCRM" Target="_blank" DataNavigateUrlFields="CveAcercamientoCRM" DataNavigateUrlFormatString="/CRM/Acercamiento.aspx?CveAcercamiento={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Acercamiento" />
|
<asp:HyperLinkField DataTextField="NombreAcercamientoCRM" Target="_blank" DataNavigateUrlFields="CveAcercamientoCRM" DataNavigateUrlFormatString="/CRM/Acercamiento.aspx?CveAcercamiento={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Acercamiento/Oportunidad" />
|
||||||
<asp:BoundField DataField="DescripcionCRM" HeaderText="Descripcion" ItemStyle-HorizontalAlign="Left" />
|
<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:HyperLinkField DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Serie Folio" />
|
||||||
@@ -688,7 +688,7 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<h4 class="modal-title">Agregar Acercamiento</h4>
|
<h4 class="modal-title">Agregar Acercamiento/Oportunidad</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|||||||
@@ -102,6 +102,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (ViewState["DTContactos"] == null)
|
||||||
|
{
|
||||||
|
ViewState["DTContactos"] = new DataTable();
|
||||||
|
}
|
||||||
|
|
||||||
return (DataTable)ViewState["DTContactos"];
|
return (DataTable)ViewState["DTContactos"];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,6 +142,26 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int VendedorTipo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if(ViewState["VendedorTipo"] == null)
|
||||||
|
{
|
||||||
|
ViewState["VendedorTipo"] = -1;
|
||||||
|
}
|
||||||
|
return ViewState["VendedorTipo"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["VendedorTipo"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private int CveSubProyecto
|
private int CveSubProyecto
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -154,6 +179,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
||||||
return (DataTable)ViewState["TempDTContactos"];
|
return (DataTable)ViewState["TempDTContactos"];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -803,6 +829,22 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
|
|
||||||
CargaEventoBitacora();
|
CargaEventoBitacora();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(UsuarioActual.CveVendedor > 0)
|
||||||
|
{
|
||||||
|
ClsVtaVendedores ObjVendedores = new ClsVtaVendedores();
|
||||||
|
if (ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
if(ObjVendedores.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
VendedorTipo = ObjVendedores.DtResultados.FiltroPrimeroValor("VendedorTipo", $"CveVendedor = {UsuarioActual.CveVendedor}").ToEntero();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ObjVendedores.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||||
@@ -1623,7 +1665,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (DTContactos.Rows.Count == 0)
|
if (DTContactos.Rows.Count == 0)
|
||||||
{
|
{
|
||||||
Alert("Para crear un nuevo acercamiento es necesario agregar al menos un Contacto.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert("Para crear un nuevo acercamiento/Oportunidad es necesario agregar al menos un Contacto.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1707,22 +1749,22 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert("No tiene 'Etapa Proceso' con el 'Proceso' seleccionado al agregar el Acercamiento", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert("No tiene 'Etapa Proceso' con el 'Proceso' seleccionado al agregar el Acercamiento/Oportunidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CveAcercamiento > 0)
|
if (CveAcercamiento > 0)
|
||||||
{
|
{
|
||||||
if (ObjBitacora.AddEventoBitacora(String.Format("Se registró el Acercamiento {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoPrincipal, CveEtapaProcesoCRM: CveEtapaProcesoActual))
|
if (ObjBitacora.AddEventoBitacora(String.Format("Se registró el Acercamiento/Oportunidad {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoPrincipal, CveEtapaProcesoCRM: CveEtapaProcesoActual))
|
||||||
{
|
{
|
||||||
string asunto = String.Format("Se registró el Acercamiento {0}", NombreAcercamiento);
|
string asunto = String.Format("Se registró el Acercamiento/Oportunidad {0}", NombreAcercamiento);
|
||||||
string mensaje = String.Format("Se registró el Acercamiento {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text);
|
string mensaje = String.Format("Se registró el Acercamiento/Oportunidad {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text);
|
||||||
mandarCorreo(asunto, mensaje);
|
mandarCorreo(asunto, mensaje);
|
||||||
HuboError = false;
|
HuboError = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert("Ocurrio un error al agregar el Acercamiento", ModExtensiones.TipoMensaje.MsgError);
|
Alert("Ocurrio un error al agregar el Acercamiento/Oportunidad", ModExtensiones.TipoMensaje.MsgError);
|
||||||
HuboError = false;
|
HuboError = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1741,7 +1783,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
//CARGA BITACORA
|
//CARGA BITACORA
|
||||||
if (!HuboError)
|
if (!HuboError)
|
||||||
{
|
{
|
||||||
Alert(String.Format("Se registró el acercamiento <b>{0}</b> como proceso de tipo <b>{1}</b>.<br/><br/> Se le redireccionara al Detalle del Acercamiento.", NombreAcercamiento, DdlTipoProceso.SelectedItem), ModExtensiones.TipoMensaje.MsgInformacion, String.Format("document.location.href=\"/CRM/Acercamiento.aspx?CveAcercamiento={0}\"", CveAcercamiento));
|
Alert(String.Format("Se registró el acercamiento/Oportunidad <b>{0}</b> como proceso de tipo <b>{1}</b>.<br/><br/> Se le redireccionara al Detalle del Acercamiento/Oportunidad.", NombreAcercamiento, DdlTipoProceso.SelectedItem), ModExtensiones.TipoMensaje.MsgInformacion, String.Format("document.location.href=\"/CRM/Acercamiento.aspx?CveAcercamiento={0}\"", CveAcercamiento));
|
||||||
CargaEventoBitacora();
|
CargaEventoBitacora();
|
||||||
}
|
}
|
||||||
limpiarCamposModalAcercamiento();
|
limpiarCamposModalAcercamiento();
|
||||||
@@ -1771,7 +1813,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
LnkAgregarAcercamiento.Visible = false;
|
LnkAgregarAcercamiento.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((UsuarioActual.CveVendedor != CveVendedor))
|
if ((UsuarioActual.CveVendedor != CveVendedor) & VendedorTipo != 2)
|
||||||
{
|
{
|
||||||
if (UsuarioActual.CveUsuario != 100)
|
if (UsuarioActual.CveUsuario != 100)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
Reporte de Acercamientos
|
Reporte de Acercamientos/Oportunidades
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--1--%>
|
<%--1--%>
|
||||||
<asp:TemplateField HeaderText="Acercamiento" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Acercamiento/Oportunidad" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink NavigateUrl="#" Target="_blank" ID="HplNombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:HyperLink>
|
<asp:HyperLink NavigateUrl="#" Target="_blank" ID="HplNombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
Reporte de Procesos de Acercamientos
|
Reporte de Procesos de Acercamientos/Oportunidades
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
Reporte de Rechazos Acercamientos
|
Reporte de Rechazos Acercamientos/Opotunidades
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -1886,6 +1886,18 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CveAcercamiento As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveAcercamiento") Is Nothing Then
|
||||||
|
ViewState("CveAcercamiento") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CveAcercamiento").ToString().ToEntero()
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveAcercamiento") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property CveEmpresaCRM As Integer
|
Private Property CveEmpresaCRM As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveEmpresaCRM").ToString().ToEntero()
|
Return ViewState("CveEmpresaCRM").ToString().ToEntero()
|
||||||
@@ -1895,6 +1907,7 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Private Property CveAcercamientoCRM As Integer
|
Private Property CveAcercamientoCRM As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveAcercamientoCRM").ToString().ToEntero()
|
Return ViewState("CveAcercamientoCRM").ToString().ToEntero()
|
||||||
@@ -10072,6 +10085,18 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
|
||||||
|
|
||||||
|
Dim ArchivoCotRdlc As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim ArchivoCotMrt As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.mrt", UsuarioActual.Empresa.Ruta))
|
||||||
|
|
||||||
|
If ArchivoCotRdlc.Exists Or ArchivoCotMrt.Exists Then
|
||||||
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
|
||||||
|
Else
|
||||||
|
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'ERROR DE NO TIMBRADO
|
'ERROR DE NO TIMBRADO
|
||||||
If Not SeTimbro And (DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
If Not SeTimbro And (DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
||||||
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.")
|
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.")
|
||||||
@@ -10100,6 +10125,10 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
|
||||||
|
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}'", "Imprimir")
|
||||||
|
End If
|
||||||
|
|
||||||
'DESCARGAR PDF DE CICOVISA
|
'DESCARGAR PDF DE CICOVISA
|
||||||
'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then
|
'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then
|
||||||
' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||||
@@ -10108,6 +10137,7 @@ Partial Class Ventas
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||||
|
|
||||||
If Not CveEmpresaCRM > 0 Then
|
If Not CveEmpresaCRM > 0 Then
|
||||||
|
|
||||||
'EN EMPRESA DE ACUMULADORES NO DESCARGAR EL PDF
|
'EN EMPRESA DE ACUMULADORES NO DESCARGAR EL PDF
|
||||||
@@ -10194,7 +10224,18 @@ Partial Class Ventas
|
|||||||
Liga2 = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}"";"
|
Liga2 = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}"";"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
|
||||||
|
Liga = $"document.location.href=""/CRM/Acercamiento.aspx?CveAcercamiento={CveAcercamientoCRM}&OPTAB=COT"";"
|
||||||
|
Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga, TextoConfirmacion:="Aceptar", TextoSegundoBoton:=Nothing, JSBtn2:=Nothing, ShowCloseButton:=False)
|
||||||
|
Else
|
||||||
|
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MensajeAlert.Clear()
|
MensajeAlert.Clear()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user