分类
支撑和阻力位交易策略

如何在 Binarium 中验证帐户

小熊科技视.

如何在 Binarium 中验证帐户

WEB页面代码裡

myus为null

public Users adminLogin(Users users)

using (DataClassesDataContext dataCC = new DataClassesDataContext())

Users myus = new Users(); //myus.LoginId和myus.LoginPwd这边应该是空字符串
var result = from u in dataCC.Users where myus.LoginId == users.LoginId && myus.LoginPwd == users.LoginPwd select u;
Users returnUser = null;
foreach (Users item in result)

myus.UserRoles = new UserRoles();
myus.UserRoles.Id = Convert.ToInt32(item.UserRoleId);
returnUser = myus;
break;
>
return returnUser;
>
>

  • 답변으로 제안됨 Jackie-Sun Moderator 2011년 9월 1일 목요일 오전 6:41
  • 답변으로 표시됨 冯瑞涛 Moderator 2011년 9월 24일 토요일 오전 1:48

모든 응답

授权是你的业务逻辑,怎么放在DAL了? The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP

授权是你的业务逻辑,怎么放在DAL了? The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP


有可能我描述不太正确,下面是DAL层中UserService.cs 的一个ADO.NET登录方法,我的意思是,怎么用LINQ写这样的一个方法

public User adminLogin(User user)
如何在 Binarium 中验证帐户 string sql = "select UserRoleId from dbo.Users where [email protected] and [email protected]";
using (SqlConnection conn = new SqlConnection(MyBook))
SqlCommand com = new SqlCommand(sql, conn);
com.Parameters.Add("@LoginId", SqlDbType.NVarChar).Value = user.LoginId;
com.Parameters.Add("@LoginPwd", SqlDbType.NVarChar).Value = user.LoginPwd;
conn.Open();
using (SqlDataReader dr = com.ExecuteReader())
if (dr.Read())
User u = new User();
u.userRole = new UserRole();
u.userRole.Id = Convert.ToInt32(dr["UserRoleId"]);
return u;
>
else
return null;
>
>

1-855-274-6899

Get a ready to go customer relationship management (CRM) system that is used by over 100,000 businesses across the world.

Experience 如何在 Binarium 中验证帐户 what more than 3 million + users are utilizing to operate their small and medium sized businesses. Get this enterprise resource planning (ERP) system to tackle sales, operations and productivity.

Manage your people and HR needs in a single spot whether it time & attendance, on-boarding, 如何在 Binarium 中验证帐户 recruitment, training employee information and much more!

WIN10如何添加WINDOWS凭据

小熊科技视.

T小豆儿

小熊科技视.

太平洋电脑.

脑栋大开

小熊科技视.

王海娇Aijo.

T小豆儿

阿难科技游.

小熊科技视.

Insert Link

👍 1 reacted with thumbs up emoji 👎 1 reacted with thumbs down emoji 😄 1 reacted with laugh emoji 🎉 1 reacted with hooray emoji 😕 1 reacted with confused emoji ❤️ 1 reacted with heart emoji 🚀 1 reacted with rocket emoji 如何在 Binarium 中验证帐户 👀 1 reacted with eyes emoji