Ejemplo n.º 1
0
        public ActionResult UserGroupEdit(UserGroupVM form)
        {
            Sys_UserGroup model = this._userGroupService.GetUserGroup(form);

            ViewBag.form     = model;
            ViewData["type"] = "edit";

            return(View("UserGroupInsert"));
        }
Ejemplo n.º 2
0
        public int Insert(UserGroupVM form)
        {
            Sys_UserGroup model = new Sys_UserGroup();

            Ext.CopyFrom(model, form);
            model.UpdateDate = DateTime.Now;

            return(this._userGroupRepository.Insert(ContextDB.managerDBContext, model));
        }
Ejemplo n.º 3
0
        public ActionResult UserGroupInsert()
        {
            Sys_UserGroup model = new Sys_UserGroup
            {
                Enabled = true
            };

            ViewBag.form = model;

            return(View());
        }
Ejemplo n.º 4
0
        public int Update(UserGroupVM form)
        {
            Sys_UserGroup model = this._userGroupRepository.Entity(ContextDB.managerDBContext, t => t.Id == form.Id);

            if (model != null)
            {
                model.UpdateDate  = DateTime.Now;
                model.GroupName   = form.GroupName;
                model.Description = form.Description;
                model.OrderSort   = form.OrderSort;
                model.Enabled     = form.Enabled;
            }

            return(this._userGroupRepository.Update(ContextDB.managerDBContext, model));
        }