예제 #1
0
 public EntityUsuario(
     Keys.KeyUsuario okey,
     String oUsuario,
     String oClave,
     Int32 oEstado)
 {
     this._Key     = okey;
     this._Usuario = oUsuario;
     this._Clave   = oClave;
     this._Estado  = oEstado;
 }
 public EntityUsuario SelectByKey(KeyUsuario oKeyUsuario)
 {
     try
     {
         return(UsuarioService.SelectByKey(oKeyUsuario));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #3
0
 public EntityUsuario SelectByKey(KeyUsuario oKeyUsuario)
 {
     try
     {
         return(UsuarioApp.SelectByKey(oKeyUsuario));
     }
     catch (Exception)
     {
         throw new FaultException("Error al seleccionar usuarios");
     }
 }
예제 #4
0
 public EntityUsuario SelectByKey(KeyUsuario oKeyUsuario)
 {
     try
     {
         CTransaction oCTransaction = CTransaction.Empty;
         return(Repo.SelectByKey(oKeyUsuario, oCTransaction));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #5
0
 public EntityUsuario SelectByKey(KeyUsuario okey, CTransaction oCTransaction)
 {
     try
     {
         DataUsuarioRepository data = new DataUsuarioRepository(EntityUsuario.Empty, "usuario");
         return(data.SelectByKey(okey, oCTransaction));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #6
0
        public ActionResult Edit(KeyEmpleado oKey)
        {
            EmpleadoServicesController oServices        = new EmpleadoServicesController();
            UsuarioServicesController  oUsuarioServices = new UsuarioServicesController();
            CargoServicesController    oCargoServices   = new CargoServicesController();
            TiendaServicesController   oTiendaServices  = new TiendaServicesController();

            EmpleadoViewModel oEmpleadoViewModel = new EmpleadoViewModel();

            EntityEmpleado oEntityEmpleado = oServices.SelectByKey(oKey);

            oEmpleadoViewModel.ListCargo = oCargoServices.Select
                                               (new EntityCargo
            {
                Key = new KeyCargo {
                    IDCargo = -1
                },
                Estado = Constantes.Activo
            });
            oEmpleadoViewModel.ListTienda = oTiendaServices.Select
                                                (new EntityTienda
            {
                Key = new KeyTienda {
                    CodTienda = Constantes.CadenaVacio
                },
                Estado = Constantes.Activo
            });

            oEmpleadoViewModel.EntityEmpleado = oEntityEmpleado;

            KeyUsuario oKeyUsuario = new KeyUsuario {
                IDUsuario = oEntityEmpleado.Key.IDEmpleado
            };

            oEmpleadoViewModel.EntityUsuarioEmpleado = oUsuarioServices.SelectByKey(oKeyUsuario);


            return(PartialView(Constantes.EmpleadoUsuarioEditPV, oEmpleadoViewModel));
        }