本文整理汇总了C#中Bussiness.PlayerBussiness.SendMailAndItemByUserName方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerBussiness.SendMailAndItemByUserName方法的具体用法?C# PlayerBussiness.SendMailAndItemByUserName怎么用?C# PlayerBussiness.SendMailAndItemByUserName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bussiness.PlayerBussiness
的用法示例。
在下文中一共展示了PlayerBussiness.SendMailAndItemByUserName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessRequest
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
try
{
//param格式://int templateID, int count, int validDate, int StrengthenLevel, int AttackCompose, int DefendCompose, int AgilityCompose, int LuckCompose, bool isBinds
//result:0:成功 1:失败 2:没有该账号 3:ip无效 4:param不合法 5:key错误 6:content内参数列不正确 7:超时
int result=1;
//判断IP是否合法
if (ValidSentRewardIP(context.Request.UserHostAddress))
{
string content = HttpUtility.UrlDecode(context.Request["content"]);
string key = GetSentRewardKey;
BaseInterface inter = BaseInterface.CreateInterface();
string[] str_param = inter.UnEncryptSentReward(content, ref result, key);
if (str_param.Length == 8 && result != 5 && result != 6 && result != 7)
{
string mailTitle = str_param[0];
string mailContent = str_param[1];
string username = str_param[2];
int gold = Int32.Parse(str_param[3]);
int money = Int32.Parse(str_param[4]);
string param = str_param[5];
//判断para是否合法,并将不合法的数值设为默认合法值
if (checkParam(ref param))
{
PlayerBussiness pb = new PlayerBussiness();
result = pb.SendMailAndItemByUserName(mailTitle, mailContent, username, gold, money, param);
}
else
{
result = 4;
}
}
}
else
{
result = 3;
}
context.Response.Write(result);
}
catch(Exception ex)
{
log.Error("SentReward", ex);
}
}