//filtro 1 private void CargarCDS(ref int cds) { try { Sesion sesion = new Sesion(); sesion = (Sesion)Session["Sesion" + Session.SessionID]; List <CrmPromociones> list = new List <CrmPromociones>(); CN_CrmPromocion clscrmCat = new CN_CrmPromocion(); clscrmCat.ComboCds(sesion, ref list); ddlCDS.Items.Clear(); if (list.Count > 0) { cds = list[0].Id; for (int i = 0; i < list.Count; i++) { ddlCDS.Items.Add(new RadComboBoxItem(list[i].Descripcion, list[i].Id.ToString())); } ddlCDS.SelectedValue = cds.ToString(); } } catch (Exception ex) { throw ex; } }
private void CargarSegmentos(int UEN, ref int valorSegmento) { try { Sesion sesion = new Sesion(); sesion = (Sesion)Session["Sesion" + Session.SessionID]; List <CrmPromociones> list = new List <CrmPromociones>(); CN_CrmPromocion clscrmCat = new CN_CrmPromocion(); clscrmCat.ComboSegmento(sesion, UEN, ref list); ddlSegmento.Items.Clear(); if (list.Count > 0) { valorSegmento = list[0].Id; for (int i = 0; i < list.Count; i++) { ddlSegmento.Items.Add(new RadComboBoxItem(list[i].Descripcion, list[i].Id.ToString())); } ddlSegmento.SelectedValue = valorSegmento.ToString(); } } catch (Exception ex) { throw ex; } }
private void CargarAreas(int segmento, ref int area) { try { Sesion sesion = new Sesion(); sesion = (Sesion)Session["Sesion" + Session.SessionID]; List <CrmPromociones> list = new List <CrmPromociones>(); CN_CrmPromocion clscrmCat = new CN_CrmPromocion(); clscrmCat.ComboArea(sesion, segmento, ref list); ddlArea.Items.Clear(); if (list.Count > 0) { area = list[0].Id; for (int i = 0; i < list.Count; i++) { ddlArea.Items.Add(new RadComboBoxItem(list[i].Descripcion, list[i].Id.ToString())); } ddlArea.SelectedValue = area.ToString(); } } catch (Exception ex) { throw ex; } }
private List <CrmPromociones> GetList() { try { CrmPromociones promocion = new CrmPromociones(); //filtro1 promocion.Cds = ddlCDS.Visible ? Convert.ToInt32(ddlCDS.SelectedValue) : session.Id_Cd_Ver; if (promocion.Cds == -1) { promocion.Cds = session.Id_Cd_Ver; } promocion.Representante = session.Id_U; promocion.Uen = !string.IsNullOrEmpty(ddlUENS.SelectedValue) ? Convert.ToInt32(ddlUENS.SelectedValue) : 0; promocion.Segmento = !string.IsNullOrEmpty(ddlSegmento.SelectedValue) ? Convert.ToInt32(ddlSegmento.SelectedValue) : 0; promocion.Territorio = !string.IsNullOrEmpty(ddlTerritorio.SelectedValue) ? Convert.ToInt32(ddlTerritorio.SelectedValue) : 0; //filtro2 promocion.Area = !string.IsNullOrEmpty(ddlArea.SelectedValue) ? Convert.ToInt32(ddlArea.SelectedValue) : 0; promocion.Solucion = !string.IsNullOrEmpty(ddlSolucion.SelectedValue) ? Convert.ToInt32(ddlSolucion.SelectedValue) : 0; promocion.Aplicacion = !string.IsNullOrEmpty(ddlAplicacion.SelectedValue) ? Convert.ToInt32(ddlAplicacion.SelectedValue) : 0; promocion.Estatus = !string.IsNullOrEmpty(ddlEstatus.SelectedValue) ? Convert.ToInt32(ddlEstatus.SelectedValue) : -1; promocion.Cliente = !string.IsNullOrEmpty(HiddenField1.Value) ? Convert.ToInt32(HiddenField1.Value) : ((Request.Form["HiddenField1"] != null) ? (!string.IsNullOrEmpty(Request.Form["HiddenField1"].ToString()) ? Convert.ToInt32(Request.Form["HiddenField1"].ToString()) : 0) : 0); promocion.Id_Rik = ddlRik.SelectedValue; Session["CDS" + Session.SessionID] = promocion.Cds; Session["RIK"] = promocion.Representante; Session["UEN"] = promocion.Uen; Session["SEG"] = promocion.Segmento; Session["TER"] = promocion.Territorio; Session["AREA"] = promocion.Area; Session["SOL"] = promocion.Solucion; Session["APLIC"] = promocion.Aplicacion; Session["STAT"] = promocion.Estatus; List <CrmPromociones> List = new List <CrmPromociones>(); CN_CrmPromocion cls = new CN_CrmPromocion(); Sesion session2 = new Sesion(); session2 = (Sesion)Session["Sesion" + Session.SessionID]; cls.ConsultaCatPromocion(session2, promocion, ref List); return(List); } catch (Exception ex) { throw ex; } }
private List <CrmPromociones> GetListClientes() { try { parametros(); int idCliente = !string.IsNullOrEmpty(txtNoCliente.Text) ? Convert.ToInt32(txtNoCliente.Text) : 0; string nombreCliente = txtBuscaCliente.Text; List <CrmPromociones> List = new List <CrmPromociones>(); CN_CrmPromocion cls = new CN_CrmPromocion(); Sesion session2 = new Sesion(); session2 = (Sesion)Session["Sesion" + Session.SessionID]; cls.ConsultaCatClientes(session2, id_Ter, id_Uen, id_Rik /*session2.Id_Rik*/, id_Seg, idCliente, nombreCliente, ref List); valorGrid = List.Count; HiddenField1.Value = List.Count.ToString(); return(List); } catch (Exception ex) { throw ex; } }