Example #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);
        }
Example #2
0
        public List <ActionModel> ActionsAll()
        {
            ActionRepository _repo = new ActionRepository();

            return(_repo.Actions());
        }
Example #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)));
        }
Example #4
0
        public void Delete()
        {
            ActionRepository _repo = new ActionRepository();

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

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

            return(_repo.ActionsUser(UserId));
        }