Mejoras CRM
This commit is contained in:
@@ -176,59 +176,62 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas
|
||||
string Correo = row["Correo"].ToString();
|
||||
|
||||
int CveMedioCaptacion = -1;
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DataRow MediosCaptacion = ObjCRM.DtResultados.FiltroPrimero(String.Format("MedioCaptacion = '{0}'",MedioCaptacion));
|
||||
if(MediosCaptacion != null)
|
||||
if (MedioCaptacion != "" || Agente != "") {
|
||||
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CveMedioCaptacion = MediosCaptacion["CveMedioCaptacion"].ToString().ToEntero();
|
||||
DataRow MediosCaptacion = ObjCRM.DtResultados.FiltroPrimero(String.Format("MedioCaptacion = '{0}'",MedioCaptacion));
|
||||
if(MediosCaptacion != null)
|
||||
{
|
||||
CveMedioCaptacion = MediosCaptacion["CveMedioCaptacion"].ToString().ToEntero();
|
||||
}else
|
||||
{
|
||||
Alert(String.Format("El medio de captación '{0}' no fue encontrado", MedioCaptacion), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int CveVendedor = -1;
|
||||
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("Vendedor = '{0}'",Agente));
|
||||
if (Vendedor != null)
|
||||
{
|
||||
CveVendedor = Vendedor["CveVendedor"].ToString().ToEntero();
|
||||
}else
|
||||
{
|
||||
Alert(String.Format("El medio de captación '{0}' no fue encontrado", MedioCaptacion), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
Alert(String.Format("El vendedor '{0}' no fue encontrado", Agente), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int CveVendedor = -1;
|
||||
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("Vendedor = '{0}'",Agente));
|
||||
if (Vendedor != null)
|
||||
{
|
||||
CveVendedor = Vendedor["CveVendedor"].ToString().ToEntero();
|
||||
}else
|
||||
{
|
||||
Alert(String.Format("El vendedor '{0}' no fue encontrado", MedioCaptacion), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
int CveSubProyecto = -1;
|
||||
DataRow SubProyecto = get_GlobalDTSubProyectos(-1,CveEmpresa:UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("SubProyecto = '{0}'",Sucursal));
|
||||
if(SubProyecto != null)
|
||||
{
|
||||
CveSubProyecto = SubProyecto["CveSubProyecto"].ToString().ToEntero();
|
||||
}else
|
||||
{
|
||||
Alert(String.Format("El SubProyecto '{0}'", Sucursal), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
|
||||
int CveSubProyecto = -1;
|
||||
DataRow SubProyecto = get_GlobalDTSubProyectos(-1,CveEmpresa:UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("SubProyecto = '{0}'",Sucursal));
|
||||
if(SubProyecto != null)
|
||||
{
|
||||
CveSubProyecto = SubProyecto["CveSubProyecto"].ToString().ToEntero();
|
||||
}else
|
||||
{
|
||||
Alert(String.Format("El SubProyecto '{0}'", Sucursal), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
int CveGiro = -1;
|
||||
DataRow GiroDt = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("ClienteClasificacion = '{0}'", Giro));
|
||||
if (GiroDt != null)
|
||||
{
|
||||
CveGiro = GiroDt["CveClienteClasificacion"].ToString().ToEntero();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert(String.Format("El Giro de Empresa '{0}', No está especificado", Giro), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
|
||||
int CveGiro = -1;
|
||||
DataRow GiroDt = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("ClienteClasificacion = '{0}'", Giro));
|
||||
if (GiroDt != null)
|
||||
{
|
||||
CveGiro = GiroDt["CveClienteClasificacion"].ToString().ToEntero();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert(String.Format("El Giro de Empresa '{0}', No está especificado", Giro), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
|
||||
TieneError = (!(ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, -1, CveVendedor, CveSubProyecto, Mail, CveGiro) > 0));
|
||||
TieneError = (!(ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, -1, CveVendedor, CveSubProyecto, Mail, CveGiro) > 0));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (TieneError)
|
||||
|
||||
@@ -88,8 +88,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoPrceso2" runat="server" Width="50%" DataTextField="TipoProceso" DataValueField="CveTipoProceso" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" OnSelectedIndexChanged="DdlTipoProcesos_Change" AutoPostBack="true"/>
|
||||
<label for="<%=DdlTipoPrceso2.ClientID.ToString()%>">Tipo Proceso:</label>
|
||||
<asp:DropDownList ID="DdlTipoProceso2" runat="server" Width="50%" DataTextField="TipoProceso" DataValueField="CveTipoProceso" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" OnSelectedIndexChanged="DdlTipoProcesos_Change" AutoPostBack="true"/>
|
||||
<label for="<%=DdlTipoProceso2.ClientID.ToString()%>">Tipo Proceso:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
@@ -571,10 +571,10 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlTipoPrceso2.DataSource = ObjCRM.DtResultados;
|
||||
DdlTipoPrceso2.Items.Insert(0, new ListItem("Seleccione","-1"));
|
||||
DdlTipoProceso2.DataSource = ObjCRM.DtResultados;
|
||||
DdlTipoProceso2.Items.Insert(0, new ListItem("Seleccione","-1"));
|
||||
}
|
||||
DdlTipoPrceso2.DataBind();
|
||||
DdlTipoProceso2.DataBind();
|
||||
ObjCRM.Dispose();
|
||||
}
|
||||
|
||||
@@ -583,7 +583,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoPrceso2.SelectedValue));
|
||||
DdlMedioCaptacion.DataSource = ObjCRM.DtResultados.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso2.SelectedValue));
|
||||
DdlMedioCaptacion.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlMedioCaptacionAcercamiento.Items.Clear();
|
||||
DdlMedioCaptacionAcercamiento.DataSource = ObjCRM.DtResultados;
|
||||
@@ -638,7 +638,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
|
||||
TxtNombreEmpresa.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Empresa");
|
||||
TxtRFC.Text = ObjCRM.DtResultados.FiltroPrimeroValor("RFC");
|
||||
DdlTipoPrceso2.SelectedValue = ObjCRM.DtResultados.FiltroPrimeroValor("CveTipoProceso");
|
||||
DdlTipoProceso2.SelectedValueExist(ObjCRM.DtResultados.FiltroPrimeroValor("CveTipoProceso"));
|
||||
CargaMetodosCaptacion();
|
||||
TxtCorreoEmpresaCRM.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Correo");
|
||||
DdlMedioCaptacion.SelectedValueExist(ObjCRM.DtResultados.FiltroPrimeroValor("CveMedioCaptacion"));
|
||||
|
||||
Reference in New Issue
Block a user