本文整理汇总了C#中Bussiness.PlayerBussiness.RenameConsortiaName方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerBussiness.RenameConsortiaName方法的具体用法?C# PlayerBussiness.RenameConsortiaName怎么用?C# PlayerBussiness.RenameConsortiaName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bussiness.PlayerBussiness
的用法示例。
在下文中一共展示了PlayerBussiness.RenameConsortiaName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessRequest
public void ProcessRequest(HttpContext context)
{
bool value = false;
string message = LanguageMgr.GetTranslation("Tank.Request.RenameConsortiaName.Fail1");// "Login Fail!";
XElement result = new XElement("Result");
try
{
BaseInterface inter = BaseInterface.CreateInterface();
string p = context.Request["p"];
string site = context.Request["site"] == null ? "" : HttpUtility.UrlDecode(context.Request["site"]);
//string nickname = context.Request["nickname"] == null ? "" : HttpUtility.UrlDecode(context.Request["nickname"]);
//string newNickname = context.Request["consortiaName"] == null ? "" : HttpUtility.UrlDecode(context.Request["consortiaName"]);
string IP = context.Request.UserHostAddress;
if (!string.IsNullOrEmpty(p))
{
//解密
byte[] src = CryptoHelper.RsaDecryt2(StaticFunction.RsaCryptor, p);
string[] strList = Encoding.UTF8.GetString(src, 7, src.Length - 7).Split(',');
if (strList.Length == 5)
{
string name = strList[0];
string pwd = strList[1];
string newPwd = strList[2];
string nickname = strList[3];
string consortiaName = strList[4];
if (PlayerManager.Login(name, pwd))
{
using (PlayerBussiness db = new PlayerBussiness())
{
if (db.RenameConsortiaName(name, nickname, consortiaName, ref message))
{
PlayerManager.Update(name, newPwd);
value = true;
message = LanguageMgr.GetTranslation("Tank.Request.RenameConsortiaName.Success");
}
}
}
}
}
}
catch (Exception ex)
{
log.Error("RenameConsortiaName", ex);
value = false;
message = LanguageMgr.GetTranslation("Tank.Request.RenameConsortiaName.Fail2");
}
result.Add(new XAttribute("value", value));
result.Add(new XAttribute("message", message));
context.Response.ContentType = "text/plain";
context.Response.Write(result.ToString(false));
}