本文整理汇总了C#中Bussiness.PlayerBussiness.GetUserSingleByUserName方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerBussiness.GetUserSingleByUserName方法的具体用法?C# PlayerBussiness.GetUserSingleByUserName怎么用?C# PlayerBussiness.GetUserSingleByUserName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bussiness.PlayerBussiness
的用法示例。
在下文中一共展示了PlayerBussiness.GetUserSingleByUserName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
int result = 1;
try
{
string username = HttpUtility.UrlDecode(Request["username"]);
string site = Request["site"] == null ? "" : HttpUtility.UrlDecode(Request["site"]);
if (!string.IsNullOrEmpty(username))
{
username = BaseInterface.GetNameBySite(username, site);
using (PlayerBussiness db = new PlayerBussiness())
{
PlayerInfo info = db.GetUserSingleByUserName(username);
if (info != null)
{
result = 0;
}
else
{
result = 2;
}
}
}
}
catch (Exception ex)
{
log.Error("UserNameCheck:", ex);
}
Response.Write(result);
}
示例2: KitoffUserByUserName
public int KitoffUserByUserName(string name,string msg)
{
int result = 1;
using (PlayerBussiness db = new PlayerBussiness())
{
PlayerInfo player = db.GetUserSingleByUserName(name);
if (player == null)
return 2;
result = KitoffUser(player.ID, msg);
}
return result;
}