public Admin Login(string uid, string pwd) { try { using (dbcm = new DBContextManager()) { Admin ad = dbcm.Admins.Single(a => a.Account.Equals(uid)); if (ad != null && ad.Password.Equals(pwd))//非空 && 密码匹配 return ad; else return new Admin { AdminId=-1 }; } } catch { return null; } }
- 2 回答
- 0 关注
- 647 浏览
添加回答
举报
0/150
提交
取消