Esempio n. 1
0
        public ActionModel FindByID(int ID)
        {
            ActionRepository   _repo      = new ActionRepository();
            List <ActionModel> theActions = _repo.Actions(null, ID);

            this.ID          = theActions[0].ID;
            this.Name        = theActions[0].Name;
            this.Description = theActions[0].Description;
            return(this);
        }
Esempio n. 2
0
        public List <ActionModel> ActionsAll()
        {
            ActionRepository _repo = new ActionRepository();

            return(_repo.Actions());
        }
Esempio n. 3
0
        /*public RoleModel()
         * {
         *  this.User = new UserModel();
         *  this.User.FindByID(UserModel.CurrentUserId);
         * }*/

        public List <ActionModel> Actions()
        {
            ActionRepository _repo = new ActionRepository();

            return(_repo.Actions(Convert.ToInt32(this.ID)));
        }
Esempio n. 4
0
        public void Delete()
        {
            ActionRepository _repo = new ActionRepository();

            _repo.Delete(this);
        }
Esempio n. 5
0
        public void Create()
        {
            ActionRepository _repo = new ActionRepository();

            _repo.Create(this);
        }
Esempio n. 6
0
        public List <ActionModel> UserActions(int UserId)
        {
            ActionRepository _repo = new ActionRepository();

            return(_repo.ActionsUser(UserId));
        }