Esempio n. 1
0
 public MResultModel AdminLogin(LoginInModel model)
 {
     try
     {
         if (VerificationImageCode(model.ValidateCode))
         {
             LoginOutModel resM = _bll.Login(model.UserName, model.Password);
             if (resM != null)
             {
                 return(MResultModel <LoginOutModel> .GetSuccessResultM(resM, "登录成功"));
             }
             else
             {
                 return(MResultModel.GetFailResultM("登录失败,用户名或者密码错误"));
             }
         }
         else
         {
             return(MResultModel.GetFailResultM("登录失败,验证码错误"));
         }
     }
     catch (ApplicationException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 2
0
        public MResultModel GetPaperInfoByID(Guid ID)
        {
            MResultModel resM;
            V_Paper      listM = _paperBLL.GetPaperViewInfoByID(ID);

            resM = MResultModel <V_Paper> .GetSuccessResultM(listM, "查询成功");

            return(resM);
        }
Esempio n. 3
0
        public MResultModel GetAllEnablePaperInfo()
        {
            MResultModel   resM;
            List <V_Paper> listM = _paperBLL.GetAllEnablePaperInfo();

            resM = MResultModel <List <V_Paper> > .GetSuccessResultM(listM, "查询成功");

            return(resM);
        }
Esempio n. 4
0
        public MResultModel GetClassInfoByID(Guid ID)
        {
            MResultModel resM;
            V_Class      listM = _classListBLL.GetClassViewInfoByID(ID);

            resM = MResultModel <V_Class> .GetSuccessResultM(listM, "查询成功");

            return(resM);
        }
Esempio n. 5
0
        public MResultModel GetAllClassInfo()
        {
            MResultModel   resM;
            List <V_Class> listM = _classListBLL.GetAllClassViewInfo();

            resM = MResultModel <List <V_Class> > .GetSuccessResultM(listM, "查询成功");

            return(resM);
        }
Esempio n. 6
0
        public MResultModel GetProblemInfoByPaperID(Guid PaperID)
        {
            MResultModel        resM;
            List <ProblemModel> listM = _problemBLL.GetProblemInfoByPaperID(PaperID);

            resM = MResultModel <List <ProblemModel> > .GetSuccessResultM(listM, "查询成功");

            return(resM);
        }
Esempio n. 7
0
        public MResultModel GetProblemInfoByID(Guid ID)
        {
            MResultModel resM;
            ProblemModel listM = _problemBLL.GetProblemViewInfoByID(ID);

            resM = MResultModel <ProblemModel> .GetSuccessResultM(listM, "查询成功");

            return(resM);
        }
Esempio n. 8
0
        public MResultModel GetExamInfoByPaperID(Guid PaperID)
        {
            MResultModel resM;
            PaperModel   listM = _paperBLL.GetExamInfoByPaperID(PaperID);

            resM = MResultModel <PaperModel> .GetSuccessResultM(listM, "查询成功");

            return(resM);
        }
 public MResultModel SavePermissions(SavePermissionsInModel model)
 {
     try
     {
         _bll.SavePermissions(model.UserGroupID, model.PermissionsIDs);
         return(MResultModel.GetSuccessResultM("保存成功"));
     }
     catch (ArgumentException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 10
0
 public MResultModel ChangeRank(ChangeRankInModel model)
 {
     try
     {
         _bll.ChangeRank(model.ID, model.TargetID);
         return(MResultModel.GetSuccessResultM("更改成功"));
     }
     catch (ArgumentException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 11
0
 public MResultModel AddUser(EditUserInModel model)
 {
     try
     {
         _bll.Add(model);
         return(MResultModel.GetSuccessResultM("添加成功"));
     }
     catch (ArgumentException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 12
0
 public MResultModel EditPermissions(EditPermissionsInModel model)
 {
     try
     {
         _bll.Update(model);
         return(MResultModel.GetSuccessResultM("修改成功"));
     }
     catch (ArgumentException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 13
0
 public MResultModel GetEnablePermissionsInfoByUserGroupID(Guid UserGroupID)
 {
     try
     {
         List <PermissionsGroupModel> resM = _bll.GetEnablePermissionsInfoByUserGroupID(UserGroupID);
         return(MResultModel <List <PermissionsGroupModel> > .GetSuccessResultM(resM, "查询成功"));
     }
     catch (ArgumentException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 14
0
 public MResultModel DeleteUser(DeleteInModel model)
 {
     try
     {
         _bll.Delete(model.ID);
         return(MResultModel.GetSuccessResultM("删除成功"));
     }
     catch (ArgumentException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 15
0
        public MResultModel Login(LoginModel inputM)
        {
            MResultModel resM;
            V_User       model = _userBLL.Login(inputM);

            if (model != null)
            {
                resM = MResultModel <V_User> .GetSuccessResultM(model, "登录成功");
            }
            else
            {
                resM = MResultModel.GetFailResultM("登录失败,用户名或者密码错误");
            }
            return(resM);
        }
Esempio n. 16
0
        public MResultModel GetAnswerSheetResultInfoByID(Guid ID)
        {
            MResultModel resM;

            try
            {
                AnswerSheetResultModel asrM = _answerSheetBLL.GetAnswerSheetResultInfoByID(ID);
                resM = MResultModel <AnswerSheetResultModel> .GetSuccessResultM(asrM, "查询成功");
            }
            catch (ArgumentException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            return(resM);
        }
Esempio n. 17
0
        public MResultModel DeleteClassInfo(DeleteModel inputM)
        {
            MResultModel resM;

            try
            {
                _classListBLL.DeleteClassInfo(inputM.ID);
                resM = MResultModel.GetSuccessResultM("删除成功");
            }
            catch (ArgumentNullException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            return(resM);
        }
Esempio n. 18
0
 public MResultModel EditMyPassword(EditPasswordInModel model)
 {
     try
     {
         _bll.EditMyPassword(model.ID, model.OldPassword, model.NewPassword, model.LoginUserID);
         return(MResultModel.GetSuccessResultM("修改成功"));
     }
     catch (ArgumentException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
     catch (ApplicationException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 19
0
 public MResultModel RemoveUserGroup(EditUserGroupUserInModel model)
 {
     try
     {
         _bll.RemoveUserGroup(model.UserID, model.UserGroupID);
         return(MResultModel.GetSuccessResultM("移除成功"));
     }
     catch (ArgumentException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
     catch (ApplicationException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 20
0
 public MResultModel UpdateMyInfo(EditUserInModel model)
 {
     try
     {
         _bll.UpdateMyInfo(model, model.LoginUserID);
         return(MResultModel.GetSuccessResultM("修改成功"));
     }
     catch (ArgumentException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
     catch (ApplicationException ex)
     {
         return(MResultModel.GetFailResultM(ex.Message));
     }
 }
Esempio n. 21
0
        public MResultModel AddPaperInfo(EditPaperModel inputM)
        {
            MResultModel resM;

            try
            {
                _paperBLL.AddPaperInfo(inputM);
                resM = MResultModel.GetSuccessResultM("添加成功");
            }
            catch (ArgumentNullException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            catch (ArgumentException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            return(resM);
        }
Esempio n. 22
0
        public MResultModel EditClassInfo(EditClassModel inputM)
        {
            MResultModel resM;

            try
            {
                _classListBLL.EditClassInfo(inputM);
                resM = MResultModel.GetSuccessResultM("修改成功");
            }
            catch (ArgumentNullException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            catch (ArgumentException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            return(resM);
        }
Esempio n. 23
0
        public MResultModel AddProblemInfo(EditProblemModel inputM)
        {
            MResultModel resM;

            try
            {
                _problemBLL.AddProblemInfo(inputM, inputM.Answers);
                resM = MResultModel.GetSuccessResultM("添加成功");
            }
            catch (ArgumentNullException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            catch (ArgumentException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            return(resM);
        }
Esempio n. 24
0
        public MResultModel ChangeClassRank(ChangeClassRankModel inputM)
        {
            MResultModel resM;

            try
            {
                _classListBLL.ChangeClassRank(inputM.ClassID, inputM.TargetClassID);
                resM = MResultModel.GetSuccessResultM("调换成功");
            }
            catch (ArgumentNullException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            catch (ArgumentException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            return(resM);
        }
Esempio n. 25
0
        public MResultModel SubmitAnswerSheet(AnswerSheetSubmitModel inputM)
        {
            MResultModel resM;

            try
            {
                inputM.StudentName = HttpUtility.UrlDecode(inputM.StudentName);
                Guid ID = _answerSheetBLL.SubmitAnswerSheet(inputM);
                resM = MResultModel <Guid> .GetSuccessResultM(ID, "提交成功");
            }
            catch (ArgumentNullException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            catch (ArgumentException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            return(resM);
        }
Esempio n. 26
0
        public MResultModel ChangePassword(EditPasswordModel inputM)
        {
            MResultModel resM;

            try
            {
                _userBLL.ChangePassword(inputM.ID, inputM.OldPassword, inputM.NewPassword);
                resM = MResultModel.GetSuccessResultM("修改成功");
            }
            catch (ApplicationException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            catch (ArgumentNullException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            catch (ArgumentException ex)
            {
                resM = MResultModel.GetFailResultM(ex.Message);
            }
            return(resM);
        }
Esempio n. 27
0
        public MResultModel GetUserViewInfoByID(Guid ID)
        {
            V_User userM = _bll.GetDBModelViewInfoByID(ID);

            return(MResultModel <V_User> .GetSuccessResultM(userM, "查询成功"));
        }
Esempio n. 28
0
        public MResultModel GetAllPermissionsType()
        {
            List <EnumModel> listM = EnumManager.GetAllEnum(typeof(PermissionsTypesEnum));

            return(MResultModel <List <EnumModel> > .GetSuccessResultM(listM, "查询成功"));
        }
Esempio n. 29
0
        public MResultModel GetPermissionsInfoByType(PermissionsTypesEnum Type)
        {
            List <PermissionsModel> listM = _bll.GetPermissionsInfoByType(Type);

            return(MResultModel <List <PermissionsModel> > .GetSuccessResultM(listM, "查询成功"));
        }
Esempio n. 30
0
        public MResultModel GetPermissionsInfoByID(Guid ID)
        {
            V_Permissions resM = _bll.GetDBModelViewInfoByID(ID);

            return(MResultModel <V_Permissions> .GetSuccessResultM(resM, "查询成功"));
        }