Exemplo n.º 1
0
 private void ssEmpresa_Search(object sender, EventArgs e)
 {
     if (UIActualizando) { return; }
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     Usuario.Empresa = (Empresa)FrmSeleccionar.GetSelectedEntity(typeof(Empresa), "Empresa");
     Mostrar();
 }
Exemplo n.º 2
0
        private void ssEnsambladoFormulario_Search(object sender, EventArgs e)
        {
            FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();

            EntidadSF.EnsambladoFormulario = (Ensamblado)FrmSeleccionar.GetSelectedEntity(typeof(Ensamblado), "Ensamblado");
            this.Mostrar();
        }
Exemplo n.º 3
0
        private void ssTipoSocio_Search(object sender, EventArgs e)
        {
            FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();

            SocioNegocio.TipoSocioNegocio = (TipoSocioNegocio)FrmSeleccionar.GetSelectedEntity(typeof(TipoSocioNegocio), "Tipo de Socio");
            Mostrar();
        }
Exemplo n.º 4
0
        private void ssMoneda_Search(object sender, EventArgs e)
        {
            FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();

            TipoCambio.Moneda = (Moneda)FrmSeleccionar.GetSelectedEntity(typeof(Moneda), "Moneda");
            Mostrar();
        }
Exemplo n.º 5
0
        private void btnAgregarBancos_Click(object sender, EventArgs e)
        {
            FrmSelectedEntity FrmSeleccionarPanel = new FrmSelectedEntity();
            String            Filtro = "ID NOT IN (";
            String            IDs    = "";

            foreach (ItemSocioNegocioBanco Item in SocioNegocio.Bancos)
            {
                IDs = IDs + "'" + Item.Banco.ID + "',";
            }
            if (IDs.Length > 0)
            {
                Filtro = Filtro + IDs.Substring(0, IDs.Length - 1) + ")";
            }
            else
            {
                Filtro = "";
            }
            Banco Banco = (Banco)FrmSeleccionarPanel.GetSelectedEntity(typeof(Banco), "Banco", Filtro);

            if (Banco != null)
            {
                UltraGridRow Row = GrillaBancos.DisplayLayout.Bands[0].AddNew();
                Row.Tag = this.SocioNegocio.AddItemBanco();
                ItemSocioNegocioBanco Item = (ItemSocioNegocioBanco)Row.Tag;
                Item.Banco = Banco;
                MostrarBanco(Row);
            }
        }
Exemplo n.º 6
0
 private void ssPerfil_Search(object sender, EventArgs e)
 {
     if (UIActualizando) { return; }
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     Usuario.Perfil = (Perfil)FrmSeleccionar.GetSelectedEntity(typeof(Perfil), "Perfil");
     Mostrar();
 }
Exemplo n.º 7
0
        private void busArea_Search(object sender, EventArgs e)
        {
            FrmSelectedEntity    FrmSeleccionar = new FrmSelectedEntity();
            SocioNegocioEmpleado empleado       = SocioNegocio.Empleados.First();

            empleado.Area = (Area)FrmSeleccionar.GetSelectedEntity(typeof(Area), "Area");
            MostrarEmpleado();
        }
Exemplo n.º 8
0
        private void busVendedor_Search(object sender, EventArgs e)
        {
            FrmSelectedEntity   FrmSeleccionar = new FrmSelectedEntity();
            SocioNegocioCliente clliente       = SocioNegocio.Clientes.First();

            clliente.SocioNegocioEmpleado = (SocioNegocioEmpleado)FrmSeleccionar.GetSelectedEntity(typeof(SocioNegocioEmpleado), "Vendedor");
            MostrarCliente();
        }
 private void busDepartamento_Search(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     String Filtro = String.Format(" Nombre LIKE '{0}%'",busDepartamento.Text);
     Item.Departamento  = (Departamento)FrmSeleccionar.GetSelectedEntity(typeof(Departamento), "Departamento", Filtro);
     if (Item.Departamento != null)
     {
         busDepartamento.Text = (Item.Departamento != null) ? Item.Departamento.Nombre : "";
     }
 }
Exemplo n.º 10
0
 private void busDistrito_Search(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     String Filtro = String.Format(" IDProvincia = '{0}' AND Nombre LIKE '{1}%'", Item.Provincia.ID,busDistrito.Text);
     Item.Distrito = (Distrito)FrmSeleccionar.GetSelectedEntity(typeof(Distrito), "Distrito", Filtro);
     if (Item.Distrito != null)
     {
         busDistrito.Text = (Item.Distrito != null) ? Item.Distrito.Nombre : "";
     }
 }
 private void busAlmacen_Search(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionarPanel = new FrmSelectedEntity();
     this.TipoDocumentoInventario.Almacen = (Almacen)FrmSeleccionarPanel.GetSelectedEntity(typeof(Almacen), "Almacen");
     if (this.TipoDocumentoInventario.Almacen != null)
     {
         busAlmacen.Text = this.TipoDocumentoInventario.Almacen.Nombre;
         busAlmacen.Enabled = true;
     }
 }
Exemplo n.º 12
0
 private void busProvincia_Search(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     String Filtro = String.Format (" IDDepartamento = '{0}' AND Nombre LIKE '{1}%'",Item.Departamento.ID,busProvincia.Text);
     Item.Provincia = (Provincia)FrmSeleccionar.GetSelectedEntity(typeof(Provincia), "Provincia", Filtro);
     if (Item.Provincia != null)
     {
         busProvincia.Text = (Item.Provincia != null) ? Item.Provincia.Nombre : "";
     }
 }
Exemplo n.º 13
0
        private void busDistrito_Search(object sender, EventArgs e)
        {
            FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
            String            Filtro         = String.Format(" IDProvincia = '{0}' AND Nombre LIKE '{1}%'", Item.Provincia.ID, busDistrito.Text);

            Item.Distrito = (Distrito)FrmSeleccionar.GetSelectedEntity(typeof(Distrito), "Distrito", Filtro);
            if (Item.Distrito != null)
            {
                busDistrito.Text = (Item.Distrito != null) ? Item.Distrito.Nombre : "";
            }
        }
Exemplo n.º 14
0
        private void busProvincia_Search(object sender, EventArgs e)
        {
            FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
            String            Filtro         = String.Format(" IDDepartamento = '{0}' AND Nombre LIKE '{1}%'", Item.Departamento.ID, busProvincia.Text);

            Item.Provincia = (Provincia)FrmSeleccionar.GetSelectedEntity(typeof(Provincia), "Provincia", Filtro);
            if (Item.Provincia != null)
            {
                busProvincia.Text = (Item.Provincia != null) ? Item.Provincia.Nombre : "";
            }
        }
Exemplo n.º 15
0
        private void busDepartamento_Search(object sender, EventArgs e)
        {
            FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
            String            Filtro         = String.Format(" Nombre LIKE '{0}%'", busDepartamento.Text);

            Item.Departamento = (Departamento)FrmSeleccionar.GetSelectedEntity(typeof(Departamento), "Departamento", Filtro);
            if (Item.Departamento != null)
            {
                busDepartamento.Text = (Item.Departamento != null) ? Item.Departamento.Nombre : "";
            }
        }
Exemplo n.º 16
0
 private void ssMoneda_Search(object sender, EventArgs e)
 {
     try
     {
         FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
         Caja.Moneda = (Moneda)FrmSeleccionar.GetSelectedEntity(typeof(Moneda), "Moneda");
         Mostrar();
     }
     catch (Exception ex)
     {
         SoftException.Control(ex);
     }
 }
Exemplo n.º 17
0
 private void busDepartamento_Search(object sender, EventArgs e)
 {
     try
     {
         FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
         String Filtro = String.Format(" Nombre LIKE '{0}%'", busDepartamento.Text);
         itemSalidaCaja.DepartamentoOrigen = (Departamento)FrmSeleccionar.GetSelectedEntity(typeof(Departamento), "Departamento", Filtro);
         Mostrar(this.itemSalidaCaja);
     }
     catch (Exception ex)
     {
         SoftException.Control(ex);
     }
 }
Exemplo n.º 18
0
        private void busCodigoUsuario_Search(object sender, EventArgs e)
        {
            String Filtro = "";

            if (busCodigoUsuario.Text.Length > 0)
            {
                Filtro = "UserID like '" + busCodigoUsuario.Text + "%'";
            }
            FrmSelectedEntity    FrmSeleccionar = new FrmSelectedEntity();
            SocioNegocioEmpleado Empleado       = SocioNegocio.Empleados.First();

            Empleado.Usuario = (Usuario)FrmSeleccionar.GetSelectedEntity(typeof(Usuario), "Usuario", Filtro);
            MostrarEmpleado();
        }
Exemplo n.º 19
0
        private void GrillaBancos_ClickCellButton(object sender, CellEventArgs e)
        {
            ItemSocioNegocioBanco Item = (ItemSocioNegocioBanco)e.Cell.Row.Tag;

            switch (e.Cell.Column.Key)
            {
            case colMoneda:
                FrmSelectedEntity FrmSeleccionarPanel = new FrmSelectedEntity();
                Moneda            moneda = (Moneda)FrmSeleccionarPanel.GetSelectedEntity(typeof(Moneda), "Moneda");
                Item.Moneda = moneda;
                break;

            default:
                break;
            }
            this.MostrarBanco(e.Cell.Row);
        }
Exemplo n.º 20
0
        private void busProvincia_Search(object sender, EventArgs e)
        {
            try 
	        {
                if (itemSalidaCaja.DepartamentoOrigen == null)
                {
                    throw new Exception("Debe de seleccionar un departamento...");
                }
                else 
                {
                    FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
                    String Filtro = String.Format(" IDDepartamento = '{0}' AND Nombre LIKE '{1}%'", itemSalidaCaja.DepartamentoOrigen.ID, busProvincia.Text);
                    itemSalidaCaja.ProvinciaOrigen = (Provincia)FrmSeleccionar.GetSelectedEntity(typeof(Provincia), "Provincia", Filtro);
                    Mostrar(this.itemSalidaCaja);
                }
	        }
	        catch (Exception ex)
	        {
                SoftException.Control(ex);
	        }
        }
Exemplo n.º 21
0
 private void MostrarCliente()
 {
     mUIMoficiado = true;
     if (SocioNegocio.Clientes.Count > 0)
     {
         SocioNegocioCliente cliente = SocioNegocio.Clientes.First();
         if (cliente != null)
         {
             if (cliente.SocioNegocioEmpleado != null)
             {
                 FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
                 String            Filtro         = "ID='" + cliente.SocioNegocioEmpleado.ID + "'";
                 cliente.SocioNegocioEmpleado = (SocioNegocioEmpleado)FrmSeleccionar.GetSelectedEntity(typeof(SocioNegocioEmpleado), "Vendedor", Filtro);
                 busVendedor.Text             = cliente.SocioNegocioEmpleado.Nombre;
             }
             else
             {
                 busVendedor.Text = null;
             }
             checkActivoClliente.Checked = cliente.Activo;
         }
     }
     mUIMoficiado = false;
 }
 private void ssTipoDocumento_Search(object sender, EventArgs e)
 {
     try
     {
         if (ActualizandoIU) { return; }
         InfoAsistente.Presupuesto = (Presupuesto)HelperNHibernate.GetEntityByID("Presupuesto", Presupuesto.ID);
         InfoAsistente.Cliente = InfoAsistente.Presupuesto.Cliente;
         InfoAsistente.FechaCreacion = InfoAsistente.Presupuesto.FechaCreacion;
         udtFechaCreacion.Value = InfoAsistente.Presupuesto.FechaCreacion;
         FrmSelectedEntity FrmSeleccionarTipoDocumento = new FrmSelectedEntity();
         InfoAsistente.TipoDocumento = (TipoOrdenProduccion)FrmSeleccionarTipoDocumento.GetSelectedEntity(typeof(TipoOrdenProduccion), "Tipo Orden de Producción");
         if (InfoAsistente.TipoDocumento != null)
         {
             ssTipoDocumento.Text = InfoAsistente.TipoDocumento.Nombre;
             InfoAsistente.Responsable = FrmMain.ObtenerResponsable();
             ssReponsable.Text = (InfoAsistente.Responsable != null) ? InfoAsistente.Responsable.Nombre : "";
         }
         Mostrar();
     }
     catch (Exception ex)
     {
         SoftException.Control(ex);
     }
 }
Exemplo n.º 23
0
 private void GrillaBancos_ClickCellButton(object sender, CellEventArgs e)
 {
     ItemSocioNegocioBanco Item = (ItemSocioNegocioBanco)e.Cell.Row.Tag;
     switch (e.Cell.Column.Key)
     {
         case colMoneda:
             FrmSelectedEntity FrmSeleccionarPanel = new FrmSelectedEntity();
             Moneda moneda = (Moneda)FrmSeleccionarPanel.GetSelectedEntity(typeof(Moneda), "Moneda");
             Item.Moneda = moneda;
             break;
         default:
             break;
     }
     this.MostrarBanco(e.Cell.Row);
 }
Exemplo n.º 24
0
 private void ssTipoSocio_Search(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     SocioNegocio.TipoSocioNegocio = (TipoSocioNegocio)FrmSeleccionar.GetSelectedEntity(typeof(TipoSocioNegocio), "Tipo de Socio");
     Mostrar();
 }
Exemplo n.º 25
0
 private void btnAgregarBancos_Click(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionarPanel = new FrmSelectedEntity();
     String Filtro = "ID NOT IN (";
     String IDs = "";
     foreach (ItemSocioNegocioBanco Item in SocioNegocio.Bancos) { IDs = IDs + "'" + Item.Banco.ID + "',"; }
     if (IDs.Length > 0) { Filtro = Filtro + IDs.Substring(0, IDs.Length - 1) + ")"; }
     else { Filtro = ""; }
     Banco Banco = (Banco)FrmSeleccionarPanel.GetSelectedEntity(typeof(Banco), "Banco", Filtro);
     if (Banco != null)
     {
         UltraGridRow Row = GrillaBancos.DisplayLayout.Bands[0].AddNew();
         Row.Tag = this.SocioNegocio.AddItemBanco();
         ItemSocioNegocioBanco Item = (ItemSocioNegocioBanco)Row.Tag;
         Item.Banco = Banco;
         MostrarBanco(Row);
     }
 }
Exemplo n.º 26
0
 private void busVendedor_Search(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     SocioNegocioCliente clliente = SocioNegocio.Clientes.First();
     clliente.SocioNegocioEmpleado = (SocioNegocioEmpleado)FrmSeleccionar.GetSelectedEntity(typeof(SocioNegocioEmpleado), "Vendedor");
     MostrarCliente();
 }
Exemplo n.º 27
0
 private void ssReporte_Search(object sender, EventArgs e)
 {
     try
     {
         FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
         TipoCaja.Reporte = (Soft.Reporte.Entidades.Reporte)FrmSeleccionar.GetSelectedEntity(typeof(Soft.Reporte.Entidades.Reporte), "Reporte");
         ssReporte.Text = (TipoCaja.Reporte != null) ? TipoCaja.Reporte.Nombre : "";
     }
     catch (Exception ex)
     {
         SoftException.Control(ex);
     }
 }
Exemplo n.º 28
0
        private void busResponsable_Search(object sender, EventArgs e)
        {
            try
            {

            FrmSelectedEntity FrmSeleccionarResponsable = new FrmSelectedEntity();
            ConsolidadoOp.Responsable = (SocioNegocio)FrmSeleccionarResponsable.GetSelectedEntity(typeof(SocioNegocio), "Socio de Negocio", " Empleado = 1");
            busResponsable.Text = (ConsolidadoOp.Responsable != null) ? ConsolidadoOp.Responsable.Nombre : "";
            }
            catch (Exception ex)
            {
                SoftException.Control(ex);
            }

        }
Exemplo n.º 29
0
        private void busLineaProduccion_Search(object sender, EventArgs e)
        {
            try
            {

                FrmSelectedEntity FrmSeleccionarTipoDocumento = new FrmSelectedEntity();
                LineaProduccion LineaProduccion = (LineaProduccion)FrmSeleccionarTipoDocumento.GetSelectedEntity(typeof(LineaProduccion), "Linea de Produccion");
                if ((Plantilla.LineaProduccion == null))
                {

                    Plantilla.LineaProduccion = LineaProduccion;
                }
                Mostrar();
            }
            catch (Exception ex)
            {

                SoftException.Control(ex);
            }
        }
Exemplo n.º 30
0
 private void ssTipoUnidad_Search(object sender, EventArgs e)
 {
     if (ItemPlantilla == null) { return; }
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     ItemPlantilla.TipoUnidad = (TipoUnidad)FrmSeleccionar.GetSelectedEntity(typeof(TipoUnidad), "Tipo Unidad");
     ssTipoUnidad.Text = (ItemPlantilla.TipoUnidad != null) ? ItemPlantilla.TipoUnidad.Nombre : "";
 }
Exemplo n.º 31
0
 private void ssMaterial_Search(object sender, EventArgs e)
 {
     if (ItemPlantilla == null) { return; }
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     ItemPlantilla.Material = (Existencia)FrmSeleccionar.GetSelectedEntity(typeof(Existencia), "Existencia"," EsInventariable = 1");
     ssMaterial.Text = (ItemPlantilla.Material != null) ? ItemPlantilla.Material.Nombre : "";
 }
Exemplo n.º 32
0
        private void ubNuevo_Click(object sender, EventArgs e)
        {
            if (ItemPlantilla == null) { return; }
            FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
            String Filtro = "ID NOT IN (";
            String IDs = "";
            foreach (ItemPlantillaServicio Item in ItemPlantilla.Servicios)
            {
                IDs = IDs + "'" + Item.Servicio.ID + "',";
            }
            Filtro = (IDs.Length > 0) ? Filtro + IDs.Substring(0, IDs.Length - 1) + ") AND EsServicio = 1" : " EsServicio = 1";

            Existencia Existencia = (Existencia)FrmSeleccionar.GetSelectedEntity(typeof(Existencia), "Existencia", Filtro);
            if (Existencia != null)
            {
                Existencia ExistenciaCompleta = (Existencia)HelperNHibernate.GetEntityByID("Existencia",Existencia.ID);
                UltraGridRow Row = ugServicios.DisplayLayout.Bands[0].AddNew();
                Row.Tag = ItemPlantilla.CrearServicio(ExistenciaCompleta);
                MostrarServicio(Row);
            }
        }
Exemplo n.º 33
0
 private void ssRelacionMedidas_Search(object sender, EventArgs e)
 {
     if (ItemPlantilla == null) { return; }
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     ItemPlantilla.RelacionMedidas = (RelacionMedidas)FrmSeleccionar.GetSelectedEntity(typeof(RelacionMedidas), "Relación Medidas");
     ssRelacionMedidas.Text = (ItemPlantilla.RelacionMedidas != null) ? ItemPlantilla.RelacionMedidas.Nombre : "";
 }
Exemplo n.º 34
0
 private void ssReporte_Search(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionarReporte = new FrmSelectedEntity();
     TipoNotaDebito.Reporte = (Soft.Reporte.Entidades.Reporte)FrmSeleccionarReporte.GetSelectedEntity(typeof(Soft.Reporte.Entidades.Reporte), "Reporte");
     ssReporte.Text = (TipoNotaDebito.Reporte != null) ? TipoNotaDebito.Reporte.Nombre : "";
 }
Exemplo n.º 35
0
 private void ssMoneda_Search(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     TipoCambio.Moneda = (Moneda)FrmSeleccionar.GetSelectedEntity(typeof(Moneda), "Moneda");
     Mostrar();
 }
Exemplo n.º 36
0
 private void ugItemAccion_ClickCellButton(object sender, CellEventArgs e)
 {
     ItemAccion Item = (ItemAccion)e.Cell.Row.Tag;
     switch (e.Cell.Column.Key)
     {
         case colEnsamblado:
             FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
             Item.Ensamblado = (Ensamblado)FrmSeleccionar.GetSelectedEntity(typeof(Ensamblado), "Ensamblado");
             break;
         default:
             break;
     }
     this.MostrarItem(e.Cell.Row);
 }
Exemplo n.º 37
0
 private void busArea_Search(object sender, EventArgs e)
 {
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     SocioNegocioEmpleado empleado = SocioNegocio.Empleados.First();
     empleado.Area = (Area)FrmSeleccionar.GetSelectedEntity(typeof(Area), "Area");
     MostrarEmpleado();
 }
Exemplo n.º 38
0
 private void ssOperacion_Search(object sender, EventArgs e)
 {
     if (ItemPlantilla == null) { return; }
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     ItemPlantilla.Operacion = (Existencia)FrmSeleccionar.GetSelectedEntity(typeof(Existencia), "Existencia"," EsServicio = 1");
     ssOperacion.Text = (ItemPlantilla.Operacion != null) ? ItemPlantilla.Operacion.Nombre : "";
 }
Exemplo n.º 39
0
 private void MostrarCliente()
 {
     mUIMoficiado = true;
     if (SocioNegocio.Clientes.Count > 0)
     {
         SocioNegocioCliente cliente = SocioNegocio.Clientes.First();
         if (cliente != null)
         {
             if (cliente.SocioNegocioEmpleado != null)
             {
                 FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
                 String Filtro = "ID='" + cliente.SocioNegocioEmpleado.ID + "'";
                 cliente.SocioNegocioEmpleado = (SocioNegocioEmpleado)FrmSeleccionar.GetSelectedEntity(typeof(SocioNegocioEmpleado), "Vendedor", Filtro);
                 busVendedor.Text = cliente.SocioNegocioEmpleado.Nombre;
             }
             else
             {
                 busVendedor.Text = null;
             }
             checkActivoClliente.Checked = cliente.Activo;
         }
     }
     mUIMoficiado = false;
 }
Exemplo n.º 40
0
        private void ssTipoPresupuesto_Search(object sender, EventArgs e)
        {
            try
            {
                FrmSelectedEntity FrmSeleccionarTipoDocumento = new FrmSelectedEntity();
                TipoDocumentoConsolidadoOp TipoDocumento = (TipoDocumentoConsolidadoOp)FrmSeleccionarTipoDocumento.GetSelectedEntity(typeof(TipoDocumentoConsolidadoOp), "Tipo Documento Consolidado Op");
                if (TipoDocumento != null)
                {
                    ConsolidadoOp.TipoDocumento = (TipoDocumentoConsolidadoOp)HelperNHibernate.GetEntityByID("TipoDocumentoConsolidadoOp", TipoDocumento.ID);
                    ssTipoConsolidadosOp.Text = (ConsolidadoOp.TipoDocumento != null) ? ConsolidadoOp.TipoDocumento.Nombre : "";

                    try
                    {
                        FrmSelectedEntity FrmSeleccionarEmpleado = new FrmSelectedEntity();
                        String filtro = "IDUsuario='" + FrmMain.Usuario.ID + "'";
                        SocioNegocio sn = (SocioNegocio)FrmSeleccionarEmpleado.GetSelectedEntity(typeof(SocioNegocio), "Empleado", filtro);

                        ConsolidadoOp.Responsable = (SocioNegocio)HelperNHibernate.GetEntityByID("SocioNegocio", sn.ID);
                        busResponsable.Text = ConsolidadoOp.Responsable.Nombre;
                    }
                    catch (Exception)
                    {
                    }
                }
                else
                {
                    ssTipoConsolidadosOp.Text = "";
                    busResponsable.Text = "";

                }
            }
            catch (Exception ex)
            {
                SoftException.Control(ex);
            }
        }
Exemplo n.º 41
0
 private void busCodigoUsuario_Search(object sender, EventArgs e)
 {
     String Filtro = "";
     if (busCodigoUsuario.Text.Length > 0)
     {
         Filtro = "UserID like '" + busCodigoUsuario.Text + "%'";
     }
     FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
     SocioNegocioEmpleado Empleado = SocioNegocio.Empleados.First();
     Empleado.Usuario = (Usuario)FrmSeleccionar.GetSelectedEntity(typeof(Usuario), "Usuario", Filtro);
     MostrarEmpleado();
 }
Exemplo n.º 42
0
        private void ubAgregar_Click(object sender, EventArgs e)
        {

            try
            {
                if (ConsolidadoOp.TipoDocumento == null)
                {
                    throw new Exception("Debe elegir un tipo de Documento");
                }


                if (ConsolidadoOp.Cliente == null)
                {
                    throw new Exception("Debe seleccionar un Cliente");
                }


                Collection OrdenesProduccion = new Collection();
                FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity();
                String Filtro = ConsolidadoOp.ObtenerFiltroOPs();
                Filtro = (Filtro.Length > 0) ? String.Format(" ID NOT IN ({0}) AND IDCliente = '{1}'", Filtro, ConsolidadoOp.Cliente.ID) : String.Format(" IDCliente = '{0}'", ConsolidadoOp.Cliente.ID);
                OrdenesProduccion = FrmSeleccionar.GetSelectedsEntities(typeof(OrdenProduccion), "Selección de Ordenes de Produccion Consolidado", Filtro);
                foreach (OrdenProduccion Item in OrdenesProduccion)
                {
                    ConsolidadoOp.AddItem(Item);
                }
                MostrarItems(true);
            }
            catch (Exception ex)
            {

                SoftException.Control(ex);
            }

        }