public Entity BuildObject(Dictionary <string, object> row)
        {
            var vistaRol = new Vista_Rol
            {
                IdVista = GetStringValue(row, DB_COL_ID_VISTA),
                IdRol   = GetStringValue(row, DB_COL_ID_ROL)
            };

            return(vistaRol);
        }
Example #2
0
 public void Create(Vista_Rol vistaRol)
 {
     try
     {
         crudManager.Create(vistaRol);
     }
     catch (Exception ex)
     {
         ExceptionManager.GetInstance().Process(ex);
     }
 }
Example #3
0
        public void Create(Rol rol)
        {
            try
            {
                var c = crudRol.Retrieve <Rol>(rol);

                if (c != null)
                {
                    throw new BussinessException(15);
                }

                crudRol.Create(rol);

                var mng = new Vista_RolManager();
                foreach (string vista in rol.Vistas)
                {
                    var vistaRol = new Vista_Rol
                    {
                        IdVista = vista,
                        IdRol   = rol.Codigo
                    };

                    mng.Create(vistaRol);
                }

                var mngRolHotel = new RolHotelManager();
                foreach (string hotel in rol.Hoteles)
                {
                    var rolHotel = new RolHotel
                    {
                        IdRol   = rol.Codigo,
                        IdHotel = hotel
                    };

                    mngRolHotel.Create(rolHotel);
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.GetInstance().Process(ex);
            }
        }
Example #4
0
 public void Delete(Vista_Rol vistaRol)
 {
     crudManager.Delete(vistaRol);
 }
Example #5
0
 public List <Vista_Rol> RetrieveAllRolesByVistaId(Vista_Rol vistaRol)
 {
     return(crudManager.RetrieveAllById <Vista_Rol>(vistaRol));
 }
 public Vista_RolController(int id_vista_rol_new, int fk_id_vista_new, int fk_master_new, int fk_id_rol_new)
 {
     vista_rol = new Vista_Rol(id_vista_rol_new, fk_id_vista_new, fk_master_new, fk_id_rol_new);
 }