validación de campos en los pop up
This commit is contained in:
@@ -164,21 +164,41 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
|
||||
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))
|
||||
if (ValidarFiltrosSeleccionados())
|
||||
{
|
||||
GVDatos.DataSource = ObjCRM.DtResultados;
|
||||
GVDatos.DataBind();
|
||||
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;
|
||||
LtlTotalRegistros.Text = ObjCRM.DtResultados.Rows.Count.ToString();
|
||||
if (ObjCRM.DtResultados.Rows.Count > 0)
|
||||
DivBusqueda.Visible = true;
|
||||
else
|
||||
DivBusqueda.Visible = false;
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
UPDatos.Update();
|
||||
}else
|
||||
{
|
||||
Alert("Seleccione un criterio de busqueda",ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
UPDatos.Update();
|
||||
private bool ValidarFiltrosSeleccionados()
|
||||
{
|
||||
if (DdlTipoProceso.SelectedValue.ToEntero() > 0) return true;
|
||||
if (DdlEmpresaCRM.SelectedValue.ToEntero() > 0) return true;
|
||||
if (DdlVendedor.SelectedValue.ToEntero() > 0) return true;
|
||||
if (DdlMedioCaptacion.SelectedValue.ToEntero() > 0) return true;
|
||||
if (DdlRechazoMotivo.SelectedValue.ToEntero() > 0) return true;
|
||||
if (DdlProbabilidad.SelectedValue.ToEntero() > 0) return true;
|
||||
if (TxtFechaApertura.Text != "") return true;
|
||||
if (TxtFechaCierre.Text != "") return true;
|
||||
if (TxtAcercamiento.Text != "") return true;
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user