コード例 #1
0
        public RoleCommandModel(RoleCommandView rc)
            : base(rc)
        {
            if (rc != null)
            {
                Command_Id = rc.Command_Id;
                IsManagerCommand = rc.IsManagerCommand;
                SourceRole_Id = rc.SourceRole_Id;
                TargetRole_Id = rc.TargetRole_Id;
                Application_Id = rc.Application_Id;
                Command_Name = rc.Command_Name;
                CommandType = rc.CommandType;
                Money = rc.Money;
				Command_Application_Id = rc.Command_Application_Id;
                ActionName = rc.ActionName;
            }
        }
コード例 #2
0
 public RoleCommandViewModel(RoleCommandView roleCommandView)
     : base(roleCommandView)
 {
 }
コード例 #3
0
 public JsonResult NewBackendRoleCommand()
 {
     try
     {
         RoleCommand rCmd = AddEntity<RoleCommand>(new RoleCommand { SourceRole_Id = BuiltIns.DefaultRole.Id, TargetRole_Id = BuiltIns.AllRole.Id, Command_Id = BuiltIns.DefaultBackendCommand.Id, IsManagerCommand = false, IsBuiltIn = false });
         RoleCommandView view = new RoleCommandView(rCmd, BuiltIns.DefaultBackendCommand);
         return Json(new { Success = true, Model = new RoleCommandModel(view), Message = string.Empty }, JsonRequestBehavior.AllowGet);
     }
     catch (DatabaseException exception)
     {
         return Json(new { Success = true,  Message = exception.Message }, JsonRequestBehavior.AllowGet);
     }
 }
コード例 #4
0
ファイル: DataService.cs プロジェクト: wangws556/duoduo-chat
        public RoleCommandView GetRoleCommandView(int appid, int userId, string token, int id)
        {
            try
            {
                CheckToken(appid, userId, token);
                RoleCommandView view = new RoleCommandView { Id = id };
                modelAccesser.Get<RoleCommandView>(view);
                return view.Loaded ? view : null;
            }
            catch (Exception)
            {
                throw new DatabaseException();
            }

        }