public static void Process(IHttpRequest Request, IHttpResponse Response) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { int id = int.Parse(Request.Uri.QueryString["ID"]); if (id != 0) { using (PlayerBussiness db = new PlayerBussiness()) { MailInfo[] sInfos = db.GetMailBySenderID(id); MailInfo[] array = sInfos; for (int i = 0; i < array.Length; i++) { MailInfo info = array[i]; result.Add(FlashUtils.CreateMailInfo(info, "Item")); } } value = true; message = "Success!"; } } catch (Exception ex) { //MailSenderList.log.Error("MailSenderList", ex); } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); Response.Write(csFunction.Compress(result.ToString(false))); }
public static string Bulid(HttpContext context) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { using (ProduceBussiness db = new ProduceBussiness()) { XElement template = new XElement("ItemTemplate"); ItemTemplateInfo[] items = db.GetAllGoods(); foreach (ItemTemplateInfo g in items) { template.Add(FlashUtils.CreateItemInfo(g)); } result.Add(template); value = true; message = "Success!"; } } catch (Exception ex) { log.Error("TemplateAlllist", ex); } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); //csFunction.CreateCompressXml(context, result, "TemplateAlllist1", false); return(csFunction.CreateCompressXml(context, result, "TemplateAlllist", true)); }
public void ProcessRequest(HttpContext context) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { int userID = int.Parse(context.Request["ID"]); using (PlayerBussiness db = new PlayerBussiness()) { QuestDataInfo[] quests = db.GetUserQuest(userID); foreach (QuestDataInfo quest in quests) { result.Add(FlashUtils.CreateQuestDataInfo(quest)); } value = true; message = "Success!"; } } catch (Exception ex) { log.Error("UserQuestList", ex); } result.Add(new XAttribute("vaule", value)); result.Add(new XAttribute("message", message)); context.Response.ContentType = "text/plain"; context.Response.Write(result.ToString(false)); //context.Response.BinaryWrite(StaticFunction.Compress(result.ToString(false))); }
public void ProcessRequest(HttpContext context) { bool value = false; string message = "获取失败!"; XElement result = new XElement("Result"); try { using (MapBussiness db = new MapBussiness()) { MapWeekInfo[] infos = db.GetAllMapWeek(); foreach (MapWeekInfo info in infos) { result.Add(FlashUtils.CreateMapWeek(info)); } value = true; message = "获取成功!"; } } catch (Exception ex) { log.Error("加载地图周期失败", ex); } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); context.Response.ContentType = "text/plain"; context.Response.Write(result.ToString(false)); }
public static string Bulid(HttpContext context) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { using (ActiveBussiness db = new ActiveBussiness()) { ActiveInfo[] infos = db.GetAllActives(); foreach (ActiveInfo info in infos) { result.Add(FlashUtils.CreateActiveInfo(info)); } value = true; message = "Success!"; } } catch (Exception ex) { log.Error("Load Active is fail!", ex); } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); return(csFunction.CreateCompressXml(context, result, "ActiveList", true)); }
public static string Bulid(HttpContext context) { bool value = false; string message = "Fail"; XElement result = new XElement("Result"); try { using (MapBussiness db = new MapBussiness()) { ServerMapInfo[] infos = db.GetAllServerMap(); foreach (ServerMapInfo info in infos) { result.Add(FlashUtils.CreateMapServer(info)); } } value = true; message = "Success!"; } catch (Exception ex) { log.Error("MapServerList", ex); } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); //return result.ToString(false); return(csFunction.CreateCompressXml(context, result, "MapServerList", true)); }
public static void Process(IHttpRequest Request, IHttpResponse Response) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { string username = HttpUtility.UrlDecode(Request.Uri.QueryString["username"]); using (PlayerBussiness db = new PlayerBussiness()) { PlayerInfo[] infos = db.GetUserLoginList(username); bool isEmpty = infos.Length > 1; PlayerInfo[] array = infos; for (int i = 0; i < array.Length; i++) { PlayerInfo info = array[i]; if (!string.IsNullOrEmpty(info.NickName)) { result.Add(FlashUtils.CreateUserLoginList(info)); } } } value = true; message = "Success!"; } catch (Exception ex) { } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); Response.Write(result.ToString(false)); }
//Create as a MainNode or not. public virtual void resetByTimeLineInfo(FlashUtils.MCTimeLineInfo mcTimeLineInfo_, MovieClip mainMovieClip_) { mcTimeLineInfo = mcTimeLineInfo_; movieClipClassName = mcTimeLineInfo.className; _childrenNeverRemoveFromStage = mcTimeLineInfo.childrenNeverRemoveFromStage; _allChildrenSprite = mcTimeLineInfo.allChildrenSprite; _frameIntToFrameActionCache = FlashUtils.getFrameIntToFrameActionCache(mcTimeLineInfo); _codeControlFrameAction = new CodeControlFrameAction(FlashUtils.FrameNameType.none); if (mainMovieClip_ == null) { _isMainMovieClip = true; gameObject.name = mcTimeLineInfo.className; spriteFromAltas = true; setMainMovieClip(this); FlashManager.getInstance().mainMovieClipList.Add(this); } else { _isMainMovieClip = false; setMainMovieClip(mainMovieClip_); } if (_isMainMovieClip) { resetParsWhenOnOrOffStage(true); } if (_childrenNeverRemoveFromStage) //Add all child to stage. { putAllChildOnStage(); //Because there is no remove. } frameUpdate(); //Must do once frameUpdate.To move to frame 1 right now. }
private void gotoAndPlayAction(string frameName_) { int _targetFrameInt = FlashUtils.getFrameIntByFrameName(mcTimeLineInfo, frameName_); autoPlay = true; gotoFrame(_targetFrameInt); }
public static string Build() { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { using (PlayerBussiness db = new PlayerBussiness()) { BestEquipInfo[] infos = db.GetCelebByDayBestEquip(); foreach (BestEquipInfo info in infos) { result.Add(FlashUtils.CreateBestEquipInfo(info)); } value = true; message = "Success!"; } } catch (Exception ex) { log.Error("Load CelebByDayBestEquip is fail!", ex); } result.Add(new XAttribute("vaule", value)); result.Add(new XAttribute("message", message)); return(csFunction.CreateCompressXml(result, "CelebForBestEquip", false)); }
public void ProcessRequest(HttpContext context) { string user = context.Request.QueryString["user"]; string pass = context.Request.QueryString["pass"]; SysUsers player = DbCenter.QueryDb.SysUsers.SingleOrDefault(c => c.UserName == user && c.PassWord == pass); if (player != null) { var list = from g in DbCenter.QueryDb.GameUsersGoods join m in DbCenter.QueryDb.GameSysgoodsmodels on g.GoodsModelId equals m.ID where g.UserId == player.ID && g.State == 0 select new Goods { Good = g, Model = m }; XElement node = new XElement("list"); foreach (var t in list) { node.Add(FlashUtils.CreateGoods(t)); } context.Response.ContentType = "text/plain"; context.Response.Write(node.ToString(false)); } else { context.Response.Write(string.Format("用户不存在:{0}", user)); } }
public static string Bulid(HttpContext context) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { using (ProduceBussiness db = new ProduceBussiness()) { XElement Store = new XElement("Store"); ShopItemInfo[] shop = db.GetALllShop(); foreach (ShopItemInfo s in shop) { Store.Add(FlashUtils.CreateShopInfo(s)); } result.Add(Store); value = true; message = "Success!"; } } catch { } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); return(csFunction.CreateCompressXml(context, result, "ShopItemList", true)); }
public static string Bulid(HttpContext context) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { using (ProduceBussiness db = new ProduceBussiness()) { XElement Store = new XElement("Store"); ShopGoodsShowListInfo[] items = db.GetAllShopGoodsShowList(); foreach (ShopGoodsShowListInfo g in items) { Store.Add(FlashUtils.CreateShopGoodsShowListInfo(g)); } result.Add(Store); value = true; message = "Success!"; } } catch (Exception ex) { log.Error("ShopGoodsShowList", ex); } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); return(csFunction.CreateCompressXml(context, result, "ShopGoodsShowList", true)); }
public void putAllChildOnStage() { FlashUtils.ChildInfo[] _childrenInfos = mcTimeLineInfo.childrenInfos; var _length = _childrenInfos.Length; FlashUtils.ChildInfo _childInfo; DisplayObject _displayObject = null; MovieClip _movieClip; Sprite _sprite; for (int _idx = 0; _idx < _length; _idx++) { _childInfo = _childrenInfos[_idx]; if (_childInfo.superClassName == 2 /*(int) FlashUtils.ClassType.MovieClip */) //No cache { _movieClip = FlashUtils.getMovieClipByChildInfoAndAddTo(_childInfo, _mainMovieClip, this); _displayObject = _movieClip; } else if (_childInfo.superClassName == 3 /*(int) FlashUtils.ClassType.Sprite */) { _sprite = FlashUtils.getPicNodeAndAddTo(_mainMovieClip, selfTrans); //SpriteRenderer _sprite.initByChildInfo(_childInfo, this); _displayObject = _sprite; } _displayObject.resetParsWhenOnOrOffStage(true); //Reset parameters.Use it as new one. _disOnStage[_childInfo] = _displayObject; //cache it as on stage _displayObject.selfTrans.parent = selfTrans; _displayObject.selfTrans.SetSiblingIndex(_childInfo.childIndex); } }
public void Freeze(float duration) { isFrozen = true; freezeDuration = duration; StartCoroutine(FlashUtils.BlinkSmooth(GetComponent <SpriteRenderer>(), 10, duration, BlinkColor)); ai.Pause(); }
public static void Process(IHttpRequest Request, IHttpResponse Response) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); int total = 0; try { int page = int.Parse(Request.Uri.QueryString["page"]); int size = int.Parse(Request.Uri.QueryString["size"]); int order = int.Parse(Request.Uri.QueryString["order"]); int userID = int.Parse(Request.Uri.QueryString["userID"]); int inviteID = int.Parse(Request.Uri.QueryString["inviteID"]); using (ConsortiaBussiness db = new ConsortiaBussiness()) { ConsortiaInviteUserInfo[] infos = db.GetConsortiaInviteUserPage(page, size, ref total, order, userID, inviteID); ConsortiaInviteUserInfo[] array = infos; for (int i = 0; i < array.Length; i++) { ConsortiaInviteUserInfo info = array[i]; result.Add(FlashUtils.CreateConsortiaInviteUserInfo(info)); } value = true; message = "Success!"; } } catch (Exception ex) { } result.Add(new XAttribute("total", total)); result.Add(new XAttribute("vaule", value)); result.Add(new XAttribute("message", message)); Response.Write(result.ToString(false)); }
public static string BuildCelebConsortia(string file, int order, string fileNotCompress) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); int total = 0; try { int page = 1; int size = 50; //int order = 10; int consortiaID = -1; string name = ""; int level = -1; using (ConsortiaBussiness db = new ConsortiaBussiness()) { ConsortiaInfo[] infos = db.GetConsortiaPage(page, size, ref total, order, name, consortiaID, level, -1); foreach (ConsortiaInfo info in infos) { XElement node = FlashUtils.CreateConsortiaInfo(info); if (info.ChairmanID != 0) { using (PlayerBussiness pb = new PlayerBussiness()) { PlayerInfo player = pb.GetUserSingleByUserID(info.ChairmanID); if (player != null) { node.Add(FlashUtils.CreateCelebInfo(player)); } } } result.Add(node); } value = true; message = "Success!"; } } catch (Exception ex) { log.Error(file + " is fail!", ex); } result.Add(new XAttribute("total", total)); result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); result.Add(new XAttribute("date", System.DateTime.Today.ToString("yyyy-MM-dd"))); if (!string.IsNullOrEmpty(fileNotCompress)) { csFunction.CreateCompressXml(result, fileNotCompress, false); } return(csFunction.CreateCompressXml(result, file, true)); }
public void Heal(int amount) { var model = GetComponent <EnemyModel>(); model.CurrentHP += amount; model.CurrentHP = Mathf.Min(model.CurrentHP, model.MaxHP); StartCoroutine(FlashUtils.BlinkSmooth(GetComponent <SpriteRenderer>(), 10, 2, BlinkColor)); }
public static string Bulid(HttpContext context) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { using (ProduceBussiness db = new ProduceBussiness()) { QuestInfo[] quests = db.GetALlQuest(); QuestAwardInfo[] questgoods = db.GetAllQuestGoods(); QuestConditionInfo[] questcondiction = db.GetAllQuestCondiction(); QuestRateInfo[] questrate = db.GetAllQuestRate(); foreach (QuestInfo quest in quests) { //添加任务模板 XElement temp_xml = FlashUtils.CreateQuestInfo(quest); //添加任何条件 IEnumerable temp_questcondiction = questcondiction.Where(s => s.QuestID == quest.ID); foreach (QuestConditionInfo item1 in temp_questcondiction) { temp_xml.Add(FlashUtils.CreateQuestCondiction(item1)); } //添加任务奖励 IEnumerable temp_questgoods = questgoods.Where(s => s.QuestID == quest.ID); foreach (QuestAwardInfo item2 in temp_questgoods) { temp_xml.Add(FlashUtils.CreateQuestGoods(item2)); } //<Rate BindMoneyRate="1|1|1|1" ExpRate="1.5|2|2.5|3" GoldRate="1.5|2|2.5|3" ExploitRate="1.5|2|2.5|3" CanOneKeyFinishTime="3" /> result.Add(temp_xml); } foreach (QuestRateInfo quest in questrate) { XElement temp_xml1 = FlashUtils.CreateQuestRate(quest); result.Add(temp_xml1); } value = true; message = "Success!"; } } catch (Exception ex) { log.Error("QuestList", ex); } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); //return result.ToString(false); return(csFunction.CreateCompressXml(context, result, "QuestList", true)); }
public void ProcessRequest(HttpContext context) { bool value = false; string message = "Fail!"; int total = 0; XElement result = new XElement("Result"); try { int page = int.Parse(context.Request["page"]); string name = csFunction.ConvertSql(HttpUtility.UrlDecode(context.Request["name"])); int type = int.Parse(context.Request["type"]); int pay = int.Parse(context.Request["pay"]); int userID = int.Parse(context.Request["userID"]); int buyID = int.Parse(context.Request["buyID"]); int order = int.Parse(context.Request["order"]); bool sort = bool.Parse(context.Request["sort"]); string AuctionIDs = csFunction.ConvertSql(HttpUtility.UrlDecode(context.Request["Auctions"])); AuctionIDs = string.IsNullOrEmpty(AuctionIDs) ? "0" : AuctionIDs; int size = 50;//int.Parse(context.Request["size"]); using (PlayerBussiness db = new PlayerBussiness()) { AuctionInfo[] infos = db.GetAuctionPage(page, name, type, pay, ref total, userID, buyID, order, sort, size, AuctionIDs); foreach (AuctionInfo info in infos) { XElement temp = FlashUtils.CreateAuctionInfo(info); using (PlayerBussiness pb = new PlayerBussiness()) { ItemInfo item = pb.GetUserItemSingle(info.ItemID); if (item != null) { temp.Add(Road.Flash.FlashUtils.CreateGoodsInfo(item)); } result.Add(temp); } } value = true; message = "Success!"; } } catch (Exception ex) { log.Error("AuctionPageList", ex); } result.Add(new XAttribute("total", total)); result.Add(new XAttribute("vaule", value)); result.Add(new XAttribute("message", message)); context.Response.ContentType = "text/plain"; context.Response.Write(result.ToString(false)); //context.Response.BinaryWrite(StaticFunction.Compress(result.ToString())); }
public static void Process(IHttpRequest Request, IHttpResponse Response) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); int userid = int.Parse(Request.Uri.QueryString["ID"]); using (PlayerBussiness pb = new PlayerBussiness()) { PlayerInfo info = pb.GetUserSingleByUserID(userid); result.Add(new object[] { new XAttribute("Agility", info.Agility), new XAttribute("Attack", info.Attack), new XAttribute("Colors", info.Colors), new XAttribute("Skin", info.Skin), new XAttribute("Defence", info.Defence), new XAttribute("GP", info.GP), new XAttribute("Grade", info.Grade), new XAttribute("Luck", info.Luck), new XAttribute("Hide", info.Hide), new XAttribute("Repute", info.Repute), new XAttribute("Offer", info.Offer), new XAttribute("NickName", info.NickName), new XAttribute("ConsortiaName", info.ConsortiaName), new XAttribute("ConsortiaID", info.ConsortiaID), new XAttribute("ReputeOffer", info.ReputeOffer), new XAttribute("ConsortiaHonor", info.ConsortiaHonor), new XAttribute("ConsortiaLevel", info.ConsortiaLevel), new XAttribute("ConsortiaRepute", info.ConsortiaRepute), new XAttribute("WinCount", info.Win), new XAttribute("TotalCount", info.Total), new XAttribute("EscapeCount", info.Escape), new XAttribute("Sex", info.Sex), new XAttribute("Style", info.Style), new XAttribute("FightPower", info.FightPower), new XAttribute("LastSpaDate", info.LastSpaDate), new XAttribute("IsGM", pb.GetUserType(info.UserName) >= 2?"True":"False"), new XAttribute("VIPLevel", info.VipLevel), }); ItemInfo[] items = pb.GetUserEuqip(userid).ToArray(); ItemInfo[] array = items; for (int i = 0; i < array.Length; i++) { ItemInfo g = array[i]; result.Add(FlashUtils.CreateGoodsInfo(g)); } } value = true; message = "Success!"; result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); Response.Write(result.ToString(false)); }
public void ProcessRequest(HttpContext context) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); int total = 0; try { int page = int.Parse(context.Request["page"]); int size = int.Parse(context.Request["size"]); int order = int.Parse(context.Request["order"]); int consortiaID = int.Parse(context.Request["consortiaID"]); int state = int.Parse(context.Request["state"]); string name = csFunction.ConvertSql(HttpUtility.UrlDecode(context.Request["name"] == null ? "" : context.Request["name"])); //List<int> list = new List<int>(); //if (state == 0 || state == 2) //{ // using (ConsortiaBussiness db = new ConsortiaBussiness()) // { // list.AddRange(db.GetConsortiaByAllyByState(consortiaID, state == 0 ? 1 : 0)); // } //} using (ConsortiaBussiness db = new ConsortiaBussiness()) { ConsortiaAllyInfo[] infos = db.GetConsortiaAllyPage(page, size, ref total, order, consortiaID, state, name); foreach (ConsortiaAllyInfo info in infos) { //if (list.Contains(info.Consortia1ID)) //{ // info.IsApply = true; //} result.Add(FlashUtils.CreateConsortiaAllyInfo(info)); } value = true; message = "Success!"; } } catch (Exception ex) { log.Error("ConsortiaAllyList", ex); } result.Add(new XAttribute("total", total)); result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); context.Response.ContentType = "text/plain"; context.Response.Write(result.ToString(false)); }
public void ProcessRequest(HttpContext context) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); int total = 0; try { //page=1& //level=%2D1& //ConsortiaID=4& //openApply=%2D1& //size=1& //name=& //key=f231292ae606ad5b61fafa816805f47c& //order=%2D1& //selfid=5& //rnd=0%2E6236354559659958 int page = int.Parse(context.Request["page"]); int size = int.Parse(context.Request["size"]); int order = int.Parse(context.Request["order"]); int consortiaID = int.Parse(context.Request["consortiaID"]); string name = csFunction.ConvertSql(HttpUtility.UrlDecode(context.Request["name"])); int level = int.Parse(context.Request["level"]); //-1表示全部,1开启的,0关闭的。 int openApply = int.Parse(context.Request["openApply"]); using (ConsortiaBussiness db = new ConsortiaBussiness()) { ConsortiaInfo[] infos = db.GetConsortiaPage(page, size, ref total, order, name, consortiaID, level, openApply); foreach (ConsortiaInfo info in infos) { result.Add(FlashUtils.CreateConsortiaInfo(info)); } value = true; message = "Success!"; } } catch (Exception ex) { log.Error("ConsortiaList", ex); } result.Add(new XAttribute("total", total)); result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); context.Response.ContentType = "text/plain"; context.Response.BinaryWrite(StaticFunction.Compress(result.ToString(false))); }
public static void AddAnnex(XElement node, string value) { using (PlayerBussiness pb = new PlayerBussiness()) { if (!string.IsNullOrEmpty(value)) { ItemInfo pr = pb.GetUserItemSingle(int.Parse(value)); if (pr != null) { node.Add(FlashUtils.CreateGoodsInfo(pr)); } } } }
void Start() { //Create instances of MovieClip by code. FlashUtils.getMovieClipByClassNameAndAddTo("Game_ShootGameDis", transform).selfTrans.position = new Vector3(0f, -2f, 0f); FlashUtils.getMovieClipByClassNameAndAddTo("Animation_PerformanceTest", transform).selfTrans.position = new Vector3(0f, -3.22f, 0f); MovieClip _upMovieClip = FlashUtils.getMovieClipByClassNameAndAddTo("Animation_PerformanceTest", transform); _upMovieClip.selfTrans.position = new Vector3(0f, 3.22f, 0f); _upMovieClip.selfTrans.rotation = Quaternion.Euler(new Vector3(0f, 0f, 180f)); _upMovieClip.gotoAndStop(_upMovieClip.mcTimeLineInfo.totalFrames);//All frog add to stage at same frame.Then stop as last frame. FlashUtils.getMovieClipByClassNameAndAddTo("Trail_DisTrailBackAndForthGroupCircle", transform).selfTrans.position = new Vector3(4f, 2.5f, 0f); FlashUtils.getMovieClipByClassNameAndAddTo("Trail_DisTrailLineRotate", transform).selfTrans.position = new Vector3(-4f, 2.5f, 0f); }
public static string BuildCelebUsers(string file, int order, string fileNotCompress) { bool value = false; string message = "Fail!"; XElement result = new XElement("Result"); try { int page = 1; int size = 50; //int order = 5; int userID = -1; int total = 0; bool resultValue = false; using (PlayerBussiness db = new PlayerBussiness()) { PlayerInfo[] infos = db.GetPlayerPage(page, size, ref total, order, userID, ref resultValue); if (resultValue) { foreach (PlayerInfo info in infos) { result.Add(FlashUtils.CreateCelebInfo(info)); } value = true; message = "Success!"; } } } catch (Exception ex) { log.Error(file + " is fail!", ex); } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); result.Add(new XAttribute("date", System.DateTime.Today.ToString("yyyy-MM-dd"))); //csFunction.CreateCompressXml(result, "CelebForUsers", false); if (!string.IsNullOrEmpty(fileNotCompress)) { csFunction.CreateCompressXml(result, fileNotCompress, false); } return(csFunction.CreateCompressXml(result, file, true)); }
public static void Process(IHttpRequest Request, IHttpResponse Response) { bool value = false; string message = "Fail!"; int total = 0; XElement result = new XElement("Result"); int page = int.Parse(Request.Uri.QueryString["page"]); string name = csFunction.ConvertSql(HttpUtility.UrlDecode(Request.Uri.QueryString["name"])); int type = int.Parse(Request.Uri.QueryString["type"]); int pay = int.Parse(Request.Uri.QueryString["pay"]); int userID = int.Parse(Request.Uri.QueryString["userID"]); int buyID = int.Parse(Request.Uri.QueryString["buyID"]); int order = int.Parse(Request.Uri.QueryString["order"]); bool sort = bool.Parse(Request.Uri.QueryString["sort"]); string AuctionIDs = csFunction.ConvertSql(HttpUtility.UrlDecode(Request.Uri.QueryString["Auctions"])); AuctionIDs = (string.IsNullOrEmpty(AuctionIDs) ? "0" : AuctionIDs); int size = 100; using (PlayerBussiness db = new PlayerBussiness()) { AuctionInfo[] infos = db.GetAuctionPage(page, name, type, pay, ref total, userID, buyID, order, sort, size, AuctionIDs); AuctionInfo[] array = infos; for (int i = 0; i < array.Length; i++) { AuctionInfo info = array[i]; XElement temp = FlashUtils.CreateAuctionInfo(info); using (PlayerBussiness pb = new PlayerBussiness()) { ItemInfo item = pb.GetUserItemSingle(info.ItemID); if (item != null) { temp.Add(FlashUtils.CreateGoodsInfo(item)); } result.Add(temp); } } value = true; message = "Success!"; } result.Add(new XAttribute("total", total)); result.Add(new XAttribute("vaule", value)); result.Add(new XAttribute("message", message)); Response.Write(result.ToString(false)); }
public void ProcessRequest(HttpContext context) { bool value = false; string message = "Fail!"; int total = 0; XElement result = new XElement("Result"); try { int page = int.Parse(context.Request["page"]); string name = null; if (context.Request["name"] != null) { name = csFunction.ConvertSql(HttpUtility.UrlDecode(context.Request["name"])); } bool sex = bool.Parse(context.Request["sex"]); int size = 12;//int.Parse(context.Request["size"]); using (PlayerBussiness db = new PlayerBussiness()) { MarryInfo[] infos = db.GetMarryInfoPage(page, name, sex, size, ref total); foreach (MarryInfo info in infos) { XElement temp = FlashUtils.CreateMarryInfo(info); result.Add(temp); } value = true; message = "Success!"; } } catch (Exception ex) { log.Error("MarryInfoPageList", ex); } result.Add(new XAttribute("total", total)); result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); context.Response.ContentType = "text/plain"; context.Response.Write(result.ToString(false)); //context.Response.BinaryWrite(StaticFunction.Compress(result.ToString())); }
private XElement SeleteMailAttachment(string id) { if (!string.IsNullOrEmpty(id)) { var item = from g in DbCenter.QueryDb.GameUsersGoods join m in DbCenter.QueryDb.GameSysgoodsmodels on g.GoodsModelId equals m.ID where g.Id == new Guid(id) select new Goods { Good = g, Model = m }; Goods goodes = item.FirstOrDefault(); if (goodes != null) { return(FlashUtils.CreateGoods(goodes)); } } return(null); }
public void ProcessRequest(HttpContext context) { bool value = false; string message = "Fail!"; int total = 0; XElement result = new XElement("Result"); try { int id = int.Parse(context.Request["id"]); using (ConsortiaBussiness db = new ConsortiaBussiness()) { ConsortiaInfo info = db.GetConsortiaSingle(id); if (info != null) { result.Add(new XAttribute("Level", info.Level)); result.Add(new XAttribute("Repute", info.Repute)); } } using (ConsortiaBussiness db = new ConsortiaBussiness()) { ConsortiaUserInfo[] infos = db.GetConsortiaUsersPage(1, 1000, ref total, -1, id, -1, -1); foreach (ConsortiaUserInfo info in infos) { result.Add(FlashUtils.CreateConsortiaIMInfo(info)); } value = true; message = "Success!"; } } catch (Exception ex) { log.Error("ConsortiaIMList", ex); } result.Add(new XAttribute("value", value)); result.Add(new XAttribute("message", message)); context.Response.Write(result.ToString(false)); }