Esempio n. 1
0
        public Form1()
        {
            InitializeComponent();

            EmpresaWCFClient objEmpresaWCF = new EmpresaWCFClient();

            cboEmpresa.DataSource    = objEmpresaWCF.Empresa_Listar(0, "");
            cboEmpresa.ValueMember   = "idEmpresa";
            cboEmpresa.DisplayMember = "razonSocial";
        }
Esempio n. 2
0
        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";
            }
        }
Esempio n. 4
0
        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;
            }
        }
Esempio n. 5
0
        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;
            }
        }