public object Get_ComboxPadre(String co_maestro, String co_padre) { ComboBL oComboBL = new ComboBL(); ComboBE oComboBE = new ComboBE(); ComboBEList oComboBEList = oComboBL.Get_Combo(co_maestro, co_padre); //return oComboBEList; System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); return(serializer.Serialize(oComboBEList)); }
public static object Get_Inicial() { #region "Obtiene Tipo Documento" ComboBL oComboBL = new ComboBL(); List <object> oComboTipoPersona = new List <object>(); ComboBEList listaTipoPersona = oComboBL.Get_Combo("TIPO_PERSONA", ""); if (listaTipoPersona != null) { foreach (ComboBE oTD in listaTipoPersona) { oComboTipoPersona.Add(new { value = oTD.value.Trim(), oTD.nombre }); } } #endregion #region "Obtiene Tipo Documento" ClienteBL oClienteBL = new ClienteBL(); List <object> oComboTipoDocumento = new List <object>(); ClienteBEList oClienteBEList = oClienteBL.ListarTipoDocumentos(); if (oClienteBEList != null) { foreach (ClienteBE oTD in oClienteBEList) { oComboTipoDocumento.Add(new { value = oTD.cod_tipo_documento.Trim(), nombre = oTD.des_tipo_documento }); } } #endregion "Obtiene Tipo Documento" #region "Obtiene Marcas" VehiculoBL oVehiculoBL = new VehiculoBL(); ArrayList oComboMarca = new ArrayList(); VehiculoBEList oMarcas = oVehiculoBL.ListarMarcas(); foreach (VehiculoBE oMarca in oMarcas) { object objMarca; objMarca = new { value = oMarca.nid_marca.ToString(), nombre = oMarca.no_marca }; oComboMarca.Add(objMarca); } #endregion "Obtiene Marcas" object response = new { oComboTipoPersona, oComboTipoDocumento, oComboMarca }; System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); return(serializer.Serialize(response)); }