Esempio n. 1
0
 public bool DeleteAdminInfo(int memberId)
 {
     AdminInfo memberInfo = new AdminInfo();
     memberInfo = this.IAdminManage.GetById<AdminInfo, int>(memberId);
     memberInfo.Valid = false;
     return this.IAdminManage.UpdateTableInfo<AdminInfo>(memberInfo);
 }
Esempio n. 2
0
 public object SaveAdminInfo(AdminInfo adminInfo, List<RegionInfo> RegionList, List<RegionInfo> manageRegionList)
 {
     bool baseResult = false;
     string resultMessage = "";
     MemberManageBLL memberBLL = new MemberManageBLL();
     if (!this.IsExsit(adminInfo.AdminPassport))
     {
         adminInfo.AdminPassword = MD5Enry.SHA1HashString("1111111");
         adminInfo.Valid = true;
         adminInfo.LastUpdateDate = DateTime.Now;
         adminInfo.RegionList = memberBLL.ConverListToSet<RegionInfo>(RegionList);
         adminInfo.ManageRegionList = memberBLL.ConverListToSet<RegionInfo>(manageRegionList);
         baseResult = this.IAdminManage.UpdateTableInfo<AdminInfo>(adminInfo);
         resultMessage = "添加成功!登录账号是:" + adminInfo.AdminPassport + "   密码是:1111111";
     }
     else
     {
         resultMessage = "对不起 ,你的账号已经存在,请输入其它内容!";
     }
     return new { state = baseResult, message = resultMessage };
 }
Esempio n. 3
0
 public AdminInfo GetAdminById(int adminId)
 {
     AdminInfo adminInfo = new AdminInfo();
     return this.IAdminManage.GetById<AdminInfo, int>(adminId);
 }
Esempio n. 4
0
 public object UpdateAdminInfo(AdminInfo adminInfo, List<RegionInfo> RegionList, List<RegionInfo> manageRegionList)
 {
     bool baseResult = false;
     string resultMessage = "";
     MemberManageBLL memberBLL = new MemberManageBLL();
     adminInfo.LastUpdateDate = DateTime.Now;
     adminInfo.RegionList = memberBLL.ConverListToSet<RegionInfo>(RegionList);
     adminInfo.ManageRegionList = memberBLL.ConverListToSet<RegionInfo>(manageRegionList);
     baseResult = this.IAdminManage.UpdateTableInfo<AdminInfo>(adminInfo);
     resultMessage = "修改成功!";
     return new { state = baseResult, message = resultMessage };
 }