soporte y atendiendo tareas en CRM
This commit is contained in:
@@ -38,11 +38,12 @@
|
|||||||
CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true" GridLines="None"
|
CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" data-sort="true" GridLines="None"
|
||||||
AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
AutoGenerateColumns="false" OnRowDeleting="GVDatos_RowDeleting" OnRowDataBound="GVDatos_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Probabilidad de Acercamiento" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left">
|
<asp:HyperLinkField HeaderText="Probabilidad de Acercamiento" DataTextField="ProbabilidadAcercamiento" DataNavigateUrlFields="CveProbabilidadAcercamiento" DataNavigateUrlFormatString="/CRM/RepAcercamientosProcesos.aspx?CveProbabilidadAcercamiento={0}"/>
|
||||||
|
<%--<asp:TemplateField HeaderText="Probabilidad de Acercamiento" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblProbabilidadAcercamiento" runat="server" Text='<%# Eval("ProbabilidadAcercamiento")%>'> </asp:Label>
|
<asp:Label ID="lblProbabilidadAcercamiento" runat="server" Text='<%# Eval("ProbabilidadAcercamiento")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>--%>
|
||||||
<%-- <asp:TemplateField HeaderText="Descripción" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
<%-- <asp:TemplateField HeaderText="Descripción" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'> </asp:Label>
|
<asp:Label ID="lblDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'> </asp:Label>
|
||||||
|
|||||||
@@ -302,7 +302,13 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ObjBitacora.AddEventoBitacora(Mensaje, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
|
if (!ObjBitacora.AddEventoBitacora(Mensaje, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
|
||||||
|
{
|
||||||
HuboError = true;
|
HuboError = true;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
string asunto = String.Format("Se registró la empresa {0} con datos RFC: {1}, Vendedor: {2}", NombreEmpresa, RFC, Vendedor);
|
||||||
|
mandarCorreo(asunto, Mensaje);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -316,10 +322,15 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
|
|
||||||
if ((CveEncuestaAplicada != 0) && ObjCRM.UpdateEmpresCRM(NombreEmpresa, RFC, CveMedioCaptacion, CveEmpresaCRM, CveVendedorActualizar, UsuarioActual.CveUsuario, CveSubProyecto: CveSubProyecto, Correo: Correo))
|
if ((CveEncuestaAplicada != 0) && ObjCRM.UpdateEmpresCRM(NombreEmpresa, RFC, CveMedioCaptacion, CveEmpresaCRM, CveVendedorActualizar, UsuarioActual.CveUsuario, CveSubProyecto: CveSubProyecto, Correo: Correo))
|
||||||
{
|
{
|
||||||
//if (ObjBitacora.AddEventoBitacora(String.Format("Se actualizó la empresa {0} con RFC {1}", NombreEmpresa, RFC), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
|
if (!ObjBitacora.AddEventoBitacora(String.Format("Se actualizó la empresa {0} con RFC {1}", NombreEmpresa, RFC), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
|
||||||
//{
|
{
|
||||||
HuboError = false;
|
HuboError = true;
|
||||||
//}
|
}else
|
||||||
|
{
|
||||||
|
string asunto = String.Format("Se actualizó la empresa {0}",NombreEmpresa);
|
||||||
|
string mensaje = String.Format("Se actualizó la empresa {0} con RFC {1} por el usuario {2}", NombreEmpresa, RFC,UsuarioActual.Nombre);
|
||||||
|
mandarCorreo(asunto, mensaje);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,8 +574,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
|
|
||||||
protected void CargaSucursales()
|
protected void CargaSucursales()
|
||||||
{
|
{
|
||||||
DdlSucursales.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1);
|
//DdlSucursales.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1);
|
||||||
DdlSucursales.DataBind();
|
//DdlSucursales.DataBind();
|
||||||
DdlSucursales.Items.Insert(0, new ListItem("Todos ", "-1"));
|
DdlSucursales.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -856,6 +867,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
|
|
||||||
if (ObjBitacora.AddEventoBitacora(String.Format("Se registró un Contacto con Nombre: {0}{1}{2}{3}", NombreContacto, TelefonoOficina, Celular, Correo), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
|
if (ObjBitacora.AddEventoBitacora(String.Format("Se registró un Contacto con Nombre: {0}{1}{2}{3}", NombreContacto, TelefonoOficina, Celular, Correo), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
|
||||||
{
|
{
|
||||||
|
string asunto = "Se registró un Contacto";
|
||||||
|
string mensaje = String.Format("Se registró un Contacto con Nombre: {0}{1}{2}{3}. Realzado por el usuario {4}", NombreContacto, TelefonoOficina, Celular, Correo,UsuarioActual.Nombre);
|
||||||
|
mandarCorreo(asunto, mensaje);
|
||||||
HuboError = false;
|
HuboError = false;
|
||||||
Alert("El Contacto fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert("El Contacto fue creado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
}
|
}
|
||||||
@@ -933,7 +947,12 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
Alert("El Contacto ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert("El Contacto ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
|
|
||||||
if (ObjBitacora.AddEventoBitacora(String.Format("Se eliminó el contacto {0}", NombreContacto), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
|
if (ObjBitacora.AddEventoBitacora(String.Format("Se eliminó el contacto {0}", NombreContacto), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
|
||||||
|
{
|
||||||
|
string asunto = "Se eliminó el contacto";
|
||||||
|
string mensaje = String.Format("Se eliminó el contacto {0} por el usuario {1}", NombreContacto,UsuarioActual.Nombre);
|
||||||
|
mandarCorreo(asunto, mensaje);
|
||||||
ObjCRM.Commit();
|
ObjCRM.Commit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1079,6 +1098,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
|
|
||||||
if (ObjEventos.AddEventoAgenda(DdlTipoAgenda.SelectedValue.ToEntero(), TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridadAgenda.SelectedValue.ToEntero(), FechaInicio, FechaInicio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM, CveContactoCRM: DdlContactoAgenda.SelectedValue.ToEntero()))
|
if (ObjEventos.AddEventoAgenda(DdlTipoAgenda.SelectedValue.ToEntero(), TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridadAgenda.SelectedValue.ToEntero(), FechaInicio, FechaInicio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM, CveContactoCRM: DdlContactoAgenda.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
|
mandarCorreo(TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text);
|
||||||
limpiarModalAgendar();
|
limpiarModalAgendar();
|
||||||
RegistraScript("$('#ModalAgenda').modal('hide')");
|
RegistraScript("$('#ModalAgenda').modal('hide')");
|
||||||
Alert("El Evento se agendó correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert("El Evento se agendó correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
@@ -1389,6 +1409,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
{
|
{
|
||||||
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 {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 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);
|
||||||
|
mandarCorreo(asunto, mensaje);
|
||||||
HuboError = false;
|
HuboError = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1471,4 +1494,17 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
private void mandarCorreo(string Asunto, string body)
|
||||||
|
{
|
||||||
|
DataTable Usuarios = get_GlobalDTUsuarios(CveEmpresa:UsuarioActual.CveEmpresa);
|
||||||
|
int CveUsuario = Usuarios.FiltroPrimeroValor("CveUsuario",String.Format("CveVendedor = {0}",DdlVendedor.SelectedValue)).ToEntero();
|
||||||
|
if (CveUsuario != UsuarioActual.CveUsuario)
|
||||||
|
{
|
||||||
|
string correoVendedor = Usuarios.FiltroPrimeroValor("Correo", String.Format("CveUsuario = {0}", CveUsuario));
|
||||||
|
ClsSisMail Mail = new ClsSisMail();
|
||||||
|
List<ClsSisMail.ArchivoMail> LSRutasMail = new List<ClsSisMail.ArchivoMail>();
|
||||||
|
//ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail();
|
||||||
|
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, correoVendedor, Asunto,body);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -107,6 +107,14 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
|
|||||||
DdlMedioCaptacion.SelectedValue = "-1";
|
DdlMedioCaptacion.SelectedValue = "-1";
|
||||||
DdlProbabilidad.SelectedValue = "-1";
|
DdlProbabilidad.SelectedValue = "-1";
|
||||||
DdlTipoProceso.SelectedIndex = 0;
|
DdlTipoProceso.SelectedIndex = 0;
|
||||||
|
|
||||||
|
int n;
|
||||||
|
string CveProbabilidadAcercamiento = Request["CveProbabilidadAcercamiento"];
|
||||||
|
bool isNumeric = int.TryParse(CveProbabilidadAcercamiento, out n);
|
||||||
|
if (isNumeric)
|
||||||
|
{
|
||||||
|
DdlProbabilidad.SelectedValue = CveProbabilidadAcercamiento;
|
||||||
|
}
|
||||||
upDatosRepA.Update();
|
upDatosRepA.Update();
|
||||||
}
|
}
|
||||||
protected void cargarDatos()
|
protected void cargarDatos()
|
||||||
|
|||||||
@@ -470,6 +470,19 @@ Partial Class OC
|
|||||||
ViewState("CveDireccionEnvio") = value
|
ViewState("CveDireccionEnvio") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property MonedaTexto As String
|
||||||
|
Get
|
||||||
|
If ViewState("MonedaTexto") Is Nothing Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return ViewState("MonedaTexto").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("CveDireccionEnvio") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property NumRow As Integer
|
Private Property NumRow As Integer
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -1254,7 +1267,7 @@ Partial Class OC
|
|||||||
TxtDescrip.Text = objOC.Descripcion
|
TxtDescrip.Text = objOC.Descripcion
|
||||||
TxtJustificacion.Text = objOC.Justificacion
|
TxtJustificacion.Text = objOC.Justificacion
|
||||||
DdlMoneda.SelectedValueExist(objOC.CveMoneda.ToString)
|
DdlMoneda.SelectedValueExist(objOC.CveMoneda.ToString)
|
||||||
|
MonedaTexto = DdlMoneda.SelectedItem.Text
|
||||||
Select Case objOC.PorcentajeIVA.ToString.ToDouble
|
Select Case objOC.PorcentajeIVA.ToString.ToDouble
|
||||||
Case 0
|
Case 0
|
||||||
DdlIVA.SelectedValue = "1"
|
DdlIVA.SelectedValue = "1"
|
||||||
@@ -1745,6 +1758,7 @@ Partial Class OC
|
|||||||
If CveEmpresaActual.Contiene(13, 14, 24) Then
|
If CveEmpresaActual.Contiene(13, 14, 24) Then
|
||||||
DdlMoneda.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlMoneda.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaClasificaciones()
|
Private Sub CargaClasificaciones()
|
||||||
Dim TipoClasif As Integer = -1
|
Dim TipoClasif As Integer = -1
|
||||||
@@ -2894,6 +2908,11 @@ Partial Class OC
|
|||||||
|
|
||||||
'COMMIT
|
'COMMIT
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
|
If MonedaTexto <> DdlMoneda.SelectedItem.Text Then
|
||||||
|
If Not OCBitacora.AddEventoBitacora(String.Format("Se cambió el valor de moneda de '{0}' a '{1}'", MonedaTexto, DdlMoneda.SelectedItem.Text), "-1", UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
OC.Commit()
|
OC.Commit()
|
||||||
If Conta IsNot Nothing Then Conta.Commit()
|
If Conta IsNot Nothing Then Conta.Commit()
|
||||||
|
|
||||||
@@ -5279,6 +5298,7 @@ Partial Class OC
|
|||||||
'MONEDA PREFERENTE
|
'MONEDA PREFERENTE
|
||||||
If CveOrdenCompra <= 0 Then
|
If CveOrdenCompra <= 0 Then
|
||||||
DdlMoneda.SelectedValueExist(Objeto.CveMonedaPreferente)
|
DdlMoneda.SelectedValueExist(Objeto.CveMonedaPreferente)
|
||||||
|
MonedaTexto = DdlMoneda.SelectedItem.Text
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'MUESTRA IVA PROVEEDOR EXTRANJERO
|
'MUESTRA IVA PROVEEDOR EXTRANJERO
|
||||||
@@ -7638,5 +7658,7 @@ Partial Class OC
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub DdlMoneda_Change() Handles DdlMoneda.SelectedIndexChanged
|
||||||
|
MonedaTexto = DdlMoneda.SelectedItem.Text
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user