public Form1() { InitializeComponent(); EmpresaWCFClient objEmpresaWCF = new EmpresaWCFClient(); cboEmpresa.DataSource = objEmpresaWCF.Empresa_Listar(0, ""); cboEmpresa.ValueMember = "idEmpresa"; cboEmpresa.DisplayMember = "razonSocial"; }
private void Empresa_Cargar() { EmpresaWCFClient objEmpresaWCF = new EmpresaWCFClient(); try { cboEmpresa.DataSource = objEmpresaWCF.Empresa_Listar(0, null); cboEmpresa.DataBind(); } catch (Exception ex) { throw ex; } }
private void Empresa_Cargar() { EmpresaWCFClient objEmpresaWCF = new EmpresaWCFClient(); try { cboEmpresa.DataSource = objEmpresaWCF.Empresa_Listar(0, null); cboEmpresa.DataBind(); } catch (Exception ex) { lblMensaje.Text = ex.Message; lblMensaje.CssClass = "mensajeError"; } }
private void Empresa_Cargar() { EmpresaWCFClient objEmpresaWCF = new EmpresaWCFClient(); try { List <Empresa_ListarResult> empresas = new List <Empresa_ListarResult>(); empresas = objEmpresaWCF.Empresa_Listar(0, null).ToList(); cboEmpresa.DataSource = empresas; cboEmpresa.DataBind(); } catch (Exception ex) { throw ex; } }
private void Empresa_Listar(int idEmpresa, string descripcion) { EmpresaWCFClient objEmpresaWCF = new EmpresaWCFClient(); try { List <Empresa_ListarResult> lstEmpresa = objEmpresaWCF.Empresa_Listar(idEmpresa, descripcion).ToList(); grdEmpresa.DataSource = lstEmpresa; grdEmpresa.DataBind(); ViewState["lstEmpresa"] = JsonHelper.JsonSerializer(lstEmpresa); ViewState["idEmpresa"] = idEmpresa; ViewState["descripcion"] = descripcion; } catch (Exception ex) { throw ex; } }