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)); } }
public MResultModel GetPaperInfoByID(Guid ID) { MResultModel resM; V_Paper listM = _paperBLL.GetPaperViewInfoByID(ID); resM = MResultModel <V_Paper> .GetSuccessResultM(listM, "查询成功"); return(resM); }
public MResultModel GetAllEnablePaperInfo() { MResultModel resM; List <V_Paper> listM = _paperBLL.GetAllEnablePaperInfo(); resM = MResultModel <List <V_Paper> > .GetSuccessResultM(listM, "查询成功"); return(resM); }
public MResultModel GetClassInfoByID(Guid ID) { MResultModel resM; V_Class listM = _classListBLL.GetClassViewInfoByID(ID); resM = MResultModel <V_Class> .GetSuccessResultM(listM, "查询成功"); return(resM); }
public MResultModel GetAllClassInfo() { MResultModel resM; List <V_Class> listM = _classListBLL.GetAllClassViewInfo(); resM = MResultModel <List <V_Class> > .GetSuccessResultM(listM, "查询成功"); return(resM); }
public MResultModel GetProblemInfoByPaperID(Guid PaperID) { MResultModel resM; List <ProblemModel> listM = _problemBLL.GetProblemInfoByPaperID(PaperID); resM = MResultModel <List <ProblemModel> > .GetSuccessResultM(listM, "查询成功"); return(resM); }
public MResultModel GetProblemInfoByID(Guid ID) { MResultModel resM; ProblemModel listM = _problemBLL.GetProblemViewInfoByID(ID); resM = MResultModel <ProblemModel> .GetSuccessResultM(listM, "查询成功"); return(resM); }
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)); } }
public MResultModel ChangeRank(ChangeRankInModel model) { try { _bll.ChangeRank(model.ID, model.TargetID); return(MResultModel.GetSuccessResultM("更改成功")); } catch (ArgumentException ex) { return(MResultModel.GetFailResultM(ex.Message)); } }
public MResultModel AddUser(EditUserInModel model) { try { _bll.Add(model); return(MResultModel.GetSuccessResultM("添加成功")); } catch (ArgumentException ex) { return(MResultModel.GetFailResultM(ex.Message)); } }
public MResultModel EditPermissions(EditPermissionsInModel model) { try { _bll.Update(model); return(MResultModel.GetSuccessResultM("修改成功")); } catch (ArgumentException ex) { return(MResultModel.GetFailResultM(ex.Message)); } }
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)); } }
public MResultModel DeleteUser(DeleteInModel model) { try { _bll.Delete(model.ID); return(MResultModel.GetSuccessResultM("删除成功")); } catch (ArgumentException ex) { return(MResultModel.GetFailResultM(ex.Message)); } }
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); }
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); }
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); }
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)); } }
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)); } }
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)); } }
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); }
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); }
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); }
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); }
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); }
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); }
public MResultModel GetUserViewInfoByID(Guid ID) { V_User userM = _bll.GetDBModelViewInfoByID(ID); return(MResultModel <V_User> .GetSuccessResultM(userM, "查询成功")); }
public MResultModel GetAllPermissionsType() { List <EnumModel> listM = EnumManager.GetAllEnum(typeof(PermissionsTypesEnum)); return(MResultModel <List <EnumModel> > .GetSuccessResultM(listM, "查询成功")); }
public MResultModel GetPermissionsInfoByType(PermissionsTypesEnum Type) { List <PermissionsModel> listM = _bll.GetPermissionsInfoByType(Type); return(MResultModel <List <PermissionsModel> > .GetSuccessResultM(listM, "查询成功")); }
public MResultModel GetPermissionsInfoByID(Guid ID) { V_Permissions resM = _bll.GetDBModelViewInfoByID(ID); return(MResultModel <V_Permissions> .GetSuccessResultM(resM, "查询成功")); }