public ActionResult GameOutputDetail2(Dictionary <string, string> queryvalues) { int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); groupby _Groupby = (groupby)(queryvalues.ContainsKey("groupby") ? Convert.ToInt32(queryvalues["groupby"]) : 1); int MasterID = User.Identity.GetUserId <int>(); if (AgentUserBLL.CheckUser(_Channels, MasterID)) { _Channels = MasterID; } string _UserList = AgentUserBLL.GetUserListString(_Channels); string _MasterList = AgentUserBLL.GetUserListString(MasterID); BaseDataView vbd = new BaseDataView { UserList = _UserList, StartDate = _StartDate, Groupby = _Groupby, Channels = _Channels }; vbd.BaseDataList = BaseDataBLL.GetGameOutputDetail2(vbd); if (Request.IsAjaxRequest()) { return(PartialView("GameOutputDetail2", vbd)); } return(View(vbd)); }
public ActionResult SaveBaseData(BaseData entity) { ResponseEntity <int> response; if (entity.Id == 0) { entity.IsDelete = 0; entity.CreateBy = ""; entity.CreateTime = DateTime.Now; entity.UpdateBy = ""; entity.UpdateTime = DateTime.Now; var result = new BaseDataBLL().InsertBaseData(entity); response = new ResponseEntity <int>(result.Success, result.Message, result.Data); } else { entity.UpdateBy = ""; entity.UpdateTime = DateTime.Now; var result = new BaseDataBLL().UpdateBaseData(entity); response = new ResponseEntity <int>(result.Success, result.Message, result.Data); } return(Json(response, JsonRequestBehavior.AllowGet)); }
public ActionResult GetDetailsDataForUser(Dictionary <string, string> queryvalues) //无效 { string userID = queryvalues.ContainsKey("Value") ? queryvalues["Value"] : ""; //用户ID BaseDataView vbd = new BaseDataView { StartDate = DateTime.Now.AddDays(-1).Date.ToString(), //计算今天的 ExpirationDate = DateTime.Now.AddDays(1).Date.ToString(), //Channels = _Channels, SearchExt = userID }; UserRecord model = new UserRecord(); IEnumerable <BaseDataInfo> ibd = BaseDataBLL.GetGameProfit(vbd); foreach (BaseDataInfo m in ibd) { model.TexasLost = m.ProfitDel1; model.TexasWin = m.ProfitAdd2; model.ScaleLost = m.ProfitDel2; model.ScaleWin = m.ProfitAdd2; model.ZodiacLost = m.ProfitDel3; model.ZodiacWin = m.ProfitAdd3; model.CarLost = m.ProfitDel5; model.CarWin = m.ProfitAdd5; model.HundredLost = m.ProfitDel6; model.HundredWin = m.ProfitAdd6; } model.TexasZyk = 0; model.ScaleZyk = MemberCenterBLL.GetScaleForZyinkui(int.Parse(userID)) * -1; model.ZodiacZyk = MemberCenterBLL.GetListForZodiacyinkui(int.Parse(userID)); //这个不用*-1 因为直接算的是庄家输赢 而不是玩家输赢的总和 model.CarZyk = MemberCenterBLL.GetListForCaryinkui(int.Parse(userID)); //这个不用*-1 因为直接算的是庄家输赢 而不是玩家输赢的总和 model.HundredZyk = MemberCenterBLL.GetListForHundredyinkui(int.Parse(userID)); return(View(model)); }
public ActionResult DeleteBaseData(int Id) { var result = new BaseDataBLL().DeleteDataById(Id); var response = new ResponseEntity <int>(result.Success, result.Message, result.Data); return(Json(response, JsonRequestBehavior.AllowGet)); }
public static MvcHtmlString GetAllPhoneBoardList(this HtmlHelper htmlHelper, string name, string selectedValue) { IEnumerable <CommonIDName> group = BaseDataBLL.GetPhoneBoard(); string option = ""; string alloptgroup = ""; foreach (CommonIDName item in group) { if (selectedValue == item.Name) { option += " <option selected='selected' value = '" + item.Name + "' > " + item.Name + " </option >"; } else { option += " <option value = '" + item.Name + "' > " + item.Name + " </option >"; } } alloptgroup += option; alloptgroup = "<select style = 'width: 100 %;' class='select2' id=" + name + " name=" + name + ">" + "<option value='all_brand'> 所有品牌</option>" + alloptgroup + "</select>"; return(new MvcHtmlString(alloptgroup)); }
public ActionResult GameOutput2(Dictionary <string, string> queryvalues) { int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); groupby _Groupby = (groupby)(queryvalues.ContainsKey("groupby") ? Convert.ToInt32(queryvalues["groupby"]) : 1); int MasterID = User.Identity.GetUserId <int>(); if (AgentUserBLL.CheckUser(_Channels, MasterID)) { _Channels = MasterID; } string _UserList = AgentUserBLL.GetUserListString(_Channels); string _MasterList = AgentUserBLL.GetUserListString(MasterID); BaseDataView vbd = new BaseDataView { UserList = _UserList, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Groupby = _Groupby, Channels = _Channels }; ViewData["groupby"] = vbd.Groupby.ToSelectListItemForSelect(); ViewData["Channels"] = AgentUserBLL.GetUserList(_MasterList).Select(x => new SelectListItem { Text = x.AgentName, Value = x.Id.ToString(), Selected = x.Id == _Channels }); vbd.BaseDataList = BaseDataBLL.GetGameOutput2(vbd); return(View(vbd)); }
/// <summary> /// 订单汇总信息 /// </summary> /// <param name="norMalShoppingCart">购物车列表</param> /// <param name="channelId">区域ID</param> /// <param name="userId">用户id</param> /// <param name="payId">支付id</param> /// <param name="logisticsId">配送id</param> /// <param name="cityId">城市id</param> /// <returns></returns> public static OrderSumaryEntity SummaryOrderInfo(List <ShoppingCartEntity> norMalShoppingCart, int channelId, int userId, int payId, int logisticsId, int cityId) { var result = new OrderSumaryEntity(); try { result.TotalScore = norMalShoppingCart.Sum(c => c.intScore * c.intBuyCount); result.TotalGoodsFee = norMalShoppingCart.Sum(c => c.intBuyCount * c.numSalePrice); result.TotalWeight = norMalShoppingCart.Sum(c => c.intBuyCount * c.intWeight ?? 0); result.TotalOriginal = norMalShoppingCart.Sum(c => c.intBuyCount * c.numOrgPrice); result.TotalFreight = BaseDataBLL.GetLogisticsInfo( channelId, userId, MCvHelper.To <int>(cityId, 0), payId, logisticsId, result.TotalWeight, result.TotalGoodsFee).info; result.TotalDiscountFee = result.TotalGoodsFee - result.TotalOriginal; result.TotalOrderFee = result.TotalFreight + result.TotalGoodsFee - result.TotalDiscountFee; } catch (Exception ex) { MLogManager.Error(MLogGroup.Order.订单汇总信息, null, "", ex); } return(result); }
public ActionResult RouletteShopGet(Dictionary <string, string> queryvalues) { int _id = queryvalues.ContainsKey("ID") ? string.IsNullOrWhiteSpace(queryvalues["ID"]) ? 0 : Convert.ToInt32(queryvalues["ID"]) : 0; int res = BaseDataBLL.GetRouletteShop(_id); if (res > 0) { return(Json(new { result = 0 })); } return(Json(new { result = 1 })); }
public ActionResult GetBaseDataList() { try { var queryParams = new NameValueCollection(); if (!ParamHelper.CheckParaQ(ref queryParams)) { return(Json(new ResponseEntity <int>(RegularFunction.RegularSqlRegexText), JsonRequestBehavior.AllowGet)); } var query = new BaseDataQuery(queryParams); var sqlCondition = new StringBuilder(); sqlCondition.Append("ISNULL(IsDelete,0)!=1"); if (!string.IsNullOrEmpty(query.GroupType)) { sqlCondition.Append($" and GroupType = {query.GroupType}"); } PageRequest preq = new PageRequest { TableName = " [BaseData] ", Where = sqlCondition.ToString(), Order = " Id DESC ", IsSelect = true, IsReturnRecord = true, PageSize = query.PageSize, PageIndex = query.PageIndex, FieldStr = "*" }; var result = new BaseDataBLL().GetDataByPage(preq); var response = new ResponseEntity <object>(true, string.Empty, new DataGridResultEntity <BaseData> { TotalRecords = preq.Out_AllRecordCount, DisplayRecords = preq.Out_PageCount, ResultData = result }); return(Json(response, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new ResponseEntity <object>(-999, string.Empty, ""), JsonRequestBehavior.AllowGet)); } }
public ActionResult GetBaseDataById(int Id) { var result = new BaseDataBLL().GetDataById(Id); if (result != null) { var response = new ResponseEntity <BaseData>(true, ConstantDefine.TipQuerySuccess, result); return(Json(response, JsonRequestBehavior.AllowGet)); } else { var response = new ResponseEntity <BaseData>(ConstantDefine.TipQueryFail); return(Json(response, JsonRequestBehavior.AllowGet)); } }
public ActionResult QQZoneRechargeDetail(Dictionary <string, string> queryvalues) { int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; //渠道id string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); //时间 //select * from 515game.Role where CreateTime between '2016-1-5' and '2016-1-6' and Agent=if(a=0,Agent,a) ; string type = queryvalues.ContainsKey("type") ? queryvalues["type"] : ""; //AllCount string _allCount = queryvalues.ContainsKey("AllCount") ? queryvalues["AllCount"] : ""; var arr = _StartDate.Split('-'); DateTime dts = new DateTime(Convert.ToInt32(arr[0]), Convert.ToInt32(arr[1]), Convert.ToInt32(_StartDate.Substring(8, 2)), 0, 0, 0); DateTime dte = dts.AddDays(1); BaseDataView vbd = new BaseDataView { StartDate = _StartDate, ExpirationDate = dte.ToString("yyyy-MM-dd 00:00:00"), Channels = _Channels }; IEnumerable <QQZoneRechargeCountDetail> detail = new List <QQZoneRechargeCountDetail>(); switch (type) { case "1": detail = BaseDataBLL.GetQQZoneRechargeFirstChargeDetail(vbd); ViewData["AllCount"] = "首次充值人数[" + _allCount + "]"; break; case "2": detail = BaseDataBLL.GetQQZoneRechargeReChargeDetail(vbd); ViewData["AllCount"] = "再次付费人数[" + _allCount + "]"; break; case "3": detail = BaseDataBLL.GetQQZoneRechargeCurReChaDetail(vbd); ViewData["AllCount"] = "当日注册且充值玩家[" + _allCount + "]"; break; case "4": detail = BaseDataBLL.GetQQZoneRechargeAllReChaDetail(vbd); ViewData["AllCount"] = "总充值人数[" + _allCount + "]"; break; default: break; } return(View(detail)); }
public MResultList <ItemRegion> GetRegionList(string sid, string token, string guid, string user_id, string uid, string parentid) { var result = new MResultList <ItemRegion>(); try { var parentId = MCvHelper.To <int>(parentid); result = BaseDataBLL.GetRegionList(parentId); } catch (Exception) { result.status = MResultStatus.ExceptionError; result.msg = "处理数据出错!"; } return(result); }
public ActionResult NumberOfRegisteredUsersDetail(Dictionary <string, string> queryvalues) { //oper string oper = queryvalues.ContainsKey("oper") ? queryvalues["oper"] : ""; int _page = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1; int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); var arr = _StartDate.Split('-'); DateTime dts = new DateTime(Convert.ToInt32(arr[0]), Convert.ToInt32(arr[1]), Convert.ToInt32(_StartDate.Substring(8, 2)), 0, 0, 0); DateTime dte = dts.AddDays(1); string _ExpirationDate = dts.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); groupby _Groupby = (groupby)(queryvalues.ContainsKey("groupby") ? Convert.ToInt32(queryvalues["groupby"]) : 1); int MasterID = User.Identity.GetUserId <int>(); if (AgentUserBLL.CheckUser(_Channels, MasterID)) { _Channels = MasterID; } string _UserList = AgentUserBLL.GetUserListString(_Channels); BaseDataView vbd = new BaseDataView { UserList = _UserList, Channels = _Channels, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Groupby = _Groupby, SearchExt = oper }; vbd.BaseDataList = new List <BaseDataInfo>(BaseDataBLL.GetRegisteredUsersOnHour(vbd)); //通过时间查询role列表 BaseDataView vbd2 = new BaseDataView { UserList = _UserList, Channels = _Channels, StartDate = dts.ToString("yyyy-MM-dd 00:00:00"), ExpirationDate = dte.ToString("yyyy-MM-dd 00:00:00"), Groupby = _Groupby, SearchExt = oper }; //通过渠道查询注册信息 string target = queryvalues.ContainsKey("target") ? queryvalues["target"] : ""; return(View(vbd)); }
public MResultList <ItemPay> GetPayList(string sid, string token, string guid, string user_id, string uid, string paygroupid) { var result = new MResultList <ItemPay>(); try { var paygroupId = MCvHelper.To <int>(paygroupid); result = BaseDataBLL.GetPayList(SystemType, paygroupId); } catch (Exception ex) { result.status = MResultStatus.ExceptionError; result.msg = "处理数据出错!"; } return(result); }
public MResultList <ItemPay> GetPayMentList(string sid, string token, string guid, string user_id, string uid, string regionid) { var result = new MResultList <ItemPay>(); try { var regionId = MCvHelper.To <int>(regionid); result = MCacheManager.UseCached <MResultList <ItemPay> >( string.Format("GetPayList_{0}_{1}", sid, regionid), MCaching.CacheGroup.BaseData, () => BaseDataBLL.GetPaymentList((int)SystemType, regionId)); } catch (Exception ex) { result.status = MResultStatus.ExceptionError; result.msg = "处理数据出错!"; } return(result); }
public ActionResult OnlinePlay(Dictionary <string, string> queryvalues) { int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); groupby _Groupby = (groupby)(queryvalues.ContainsKey("groupby") ? Convert.ToInt32(queryvalues["groupby"]) : 1); int MasterID = User.Identity.GetUserId <int>(); if (AgentUserBLL.CheckUser(_Channels, MasterID)) { _Channels = MasterID; } string _UserList = AgentUserBLL.GetUserListString(_Channels); string _MasterList = AgentUserBLL.GetUserListString(MasterID); BaseDataView vbd = new BaseDataView { UserList = _UserList, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Groupby = _Groupby, Channels = _Channels }; ViewData["groupby"] = vbd.Groupby.ToSelectListItemForSelect(); var cha = AgentUserBLL.GetUserList(_MasterList).Select(x => new SelectListItem { Text = x.AgentName.AddBlank((int)x.AgentLv), Value = x.Id.ToString(), Selected = x.Id == _Channels }); if (cha.Count() <= 1) { ViewData["cCount"] = 1; } else { ViewData["cCount"] = 2; } ViewData["Channels"] = cha; vbd.BaseDataList = new List <BaseDataInfoForOnlinePlay>(BaseDataBLL.GetOnlinePlay(vbd)); return(View(vbd)); }
public ActionResult RouletteShop(Dictionary <string, string> queryvalues) { int _id = queryvalues.ContainsKey("ID") ? Convert.ToInt32(queryvalues["ID"]) : 0; int _userID = queryvalues.ContainsKey("UserID") ? Convert.ToInt32(queryvalues["UserID"]) : 0; string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); int _page = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1; int _pageGroup = queryvalues.ContainsKey("pageGroup") ? Convert.ToInt32(queryvalues["pageGroup"]) : 1; BaseDataView vbd = new BaseDataView { StartDate = _StartDate, ExpirationDate = _ExpirationDate, UserID = _userID, Page = _page }; PagedList <Roulette> pa = new PagedList <Roulette>(BaseDataBLL.GetRouletteShop(vbd), _pageGroup, 10); vbd.BaseDataList = pa; ViewData["dataGroup"] = vbd.BaseDataList; return(View(vbd)); }
public ActionResult RouletteData(Dictionary <string, string> queryvalues) { int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; int _page = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1; string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); string _target = queryvalues.ContainsKey("target") ? queryvalues["target"] : ""; int _pageGroup = queryvalues.ContainsKey("pageGroup") ? Convert.ToInt32(queryvalues["pageGroup"]) : 1; BaseDataView vbd = new BaseDataView { StartDate = _StartDate, ExpirationDate = _ExpirationDate, Channels = _Channels, Page = _page }; PagedList <Roulette> pa = new PagedList <Roulette>(BaseDataBLL.GetRouletteData(vbd), _pageGroup, 10); vbd.BaseDataList = pa; ViewData["dataGroup"] = vbd.BaseDataList; return(View(vbd)); }
public ActionResult SignDrawSumData(Dictionary <string, string> queryvalues) { string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; string _UserList = AgentUserBLL.GetUserListString(0); //new string _MasterList = AgentUserBLL.GetUserListString(0); //new if (_Channels != 0) { _UserList = _Channels.ToString(); } BaseDataView vbd = new BaseDataView { UserList = _UserList, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Channels = _Channels }; vbd.BaseDataList = BaseDataBLL.GetSignDraw(vbd); List <SelectListItem> ieList = AgentUserBLL.GetUserList(_MasterList).Select( x => new SelectListItem { Text = x.AgentName, Value = x.Id.ToString(), Selected = x.Id == _Channels } ).ToList(); ieList.Insert(0, new SelectListItem { Text = "所有渠道", Value = "0", Selected = 0 == _Channels }); ViewData["Channels"] = ieList; //SignDraw return(View(vbd)); }
public MResult <List <ItemRegion>[]> GetAllRegionList(string sid, string token, string guid, string user_id, string uid) { var result = new MResult <List <ItemRegion>[]>(); try { /* * result = * MCacheManager.UseCached<MResult<List<ItemRegion>[]>>( * string.Format("GetAllRegionList_{0}", sid), * MCaching.CacheGroup.BaseData, * BaseDataBLL.GetAllRegionList); */ result = BaseDataBLL.GetAllRegionList(); } catch (Exception) { result.status = MResultStatus.ExceptionError; result.msg = "处理数据出错!"; } return(result); }
public ActionResult DailyOutput(Dictionary <string, string> queryvalues) { int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; terminals _Terminals = (terminals)(queryvalues.ContainsKey("Terminals") ? Convert.ToInt32(queryvalues["Terminals"]) : 0); string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); groupby _Groupby = (groupby)(queryvalues.ContainsKey("groupby") ? Convert.ToInt32(queryvalues["groupby"]) : 1); BaseDataView vbd = new BaseDataView { Terminals = _Terminals, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Groupby = _Groupby }; ViewData["groupby"] = vbd.Groupby.ToSelectListItemForSelect(); ViewData["Terminals"] = vbd.Terminals.ToSelectListItemForSelect(); vbd.BaseDataList = new List <BaseDataInfoForDailyOutput>(BaseDataBLL.GetDailyOutput(vbd)); return(View(vbd)); }
public ActionResult UserProfit(Dictionary <string, string> queryvalues) { int _page = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1; int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; string _SearchExt = queryvalues.ContainsKey("Value") ? queryvalues["Value"].ToString() : ""; // string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); // string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); string _StartDate = DateTime.Now.AddDays(-2).Date.ToString(); string _ExpirationDate = DateTime.Now.AddDays(1).Date.ToString(); GameRecordView grv = new GameRecordView { SearchExt = _SearchExt, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Page = _page }; BaseDataView vbd = new BaseDataView { StartDate = _StartDate, ExpirationDate = _ExpirationDate, Channels = _Channels, SearchExt = _SearchExt }; ViewData["SearchExt"] = _SearchExt; //if (_SearchExt != "") //{ // //ViewData["DetailProfit"] = BaseDataBLL.GetGameOutputDetailUser(vbd); // ViewData["GameProfit"] = BaseDataBLL.GetGameProfit(vbd); //} //else //{ // ViewData["GameProfit"] = ""; //} //if (Request.IsAjaxRequest()) //{ // return PartialView("UserProfit_PageList", BaseDataBLL.GetUsreProfit(_page, vbd)); //} //vbd.BaseDataList = BaseDataBLL.GetUsreProfit(_page, vbd); return(View(BaseDataBLL.GetUsreProfit(_page, vbd))); }
public ActionResult VIPDistributionRatio(Dictionary <string, string> queryvalues) { int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0; int MasterID = User.Identity.GetUserId <int>(); if (AgentUserBLL.CheckUser(_Channels, MasterID)) { _Channels = MasterID; } string _UserList = AgentUserBLL.GetUserListString(_Channels); string _MasterList = AgentUserBLL.GetUserListString(MasterID); BaseDataView vbd = new BaseDataView { UserList = _UserList, Channels = _Channels }; ViewData["Channels"] = AgentUserBLL.GetUserList(_MasterList).Select(x => new SelectListItem { Text = x.AgentName, Value = x.Id.ToString(), Selected = x.Id == _Channels }); BaseDataInfoForVIPDistributionRatio model = BaseDataBLL.GetVIPDistributionRatio(vbd); return(View(model)); }
public ActionResult MemberManagementForDetails(Dictionary <string, string> queryvalues) { string _Value = queryvalues.ContainsKey("Value") ? queryvalues["Value"] : "0"; // string _SearchExt = queryvalues.ContainsKey("SearchExt") ? queryvalues["SearchExt"].ToString() : ""; ViewData["Value"] = _Value; Role model = new Role(); long a = 0; if (long.TryParse(_Value, out a) == false) { return(View(model)); } model = RoleBLL.GetVRoleByString(new Role() { ID = long.Parse(_Value) }); if (model == null) { return(View(model)); } else { Role role = RoleBLL.GetGiftByString(new Role { ID = long.Parse(_Value) }); model.Gift = role.Gift; model.GiftExpire = role.GiftExpire; if (model.ExtInfo == null) { return(View(model)); } else { //SystemType if (SystemType == "2") { ////////////////////////////////底层修改/////////////////////////////////// BExtInfo BExtInfo = BExtInfo.ParseFrom(model.ExtInfo); model.VipGrade = BExtInfo.VipInfo.Grade; //VIP等级 model.VipPoint = BExtInfo.VipInfo.Current; //VIP点数 model.LevelGrade = BExtInfo.LevelInfo.Level; //玩家等级 model.ItemCount = BExtInfo.ToolsInfo.ListToolsList.Count(); //道具 //IList<GameInfo> gameInfoList = BExtInfo.UserExData.ListInfoList; //德州扑克 //GameInfo game15 = gameInfoList.Where(m => m.GameID == 15).FirstOrDefault(); //gameinfo g15 = new gameinfo(); //if (game15 != null) //{ // g15.dwWin = Convert.ToInt32(game15.DwWin); // g15.dwTotal = Convert.ToInt32(game15.DwTotal); // g15.maxWinChip = game15.MaxWinChip; //} //else //{ // g15.dwWin = 0; // g15.dwTotal = 0; // g15.maxWinChip = 0; //} //model.GameInfo15 = g15; ////中发白 //GameInfo game13 = gameInfoList.Where(m => m.GameID == 15).FirstOrDefault(); //gameinfo g13 = new gameinfo(); //if (game13 != null) //{ // g13.dwWin = Convert.ToInt32(game13.DwWin); // g13.dwTotal = Convert.ToInt32(game13.DwTotal); // g13.maxWinChip = game13.MaxWinChip; //} //else //{ // g13.dwWin = 0; // g13.dwTotal = 0; // g13.maxWinChip = 0; //} //model.GameInfo13 = g13; //十二生肖 //GameInfo game14 = gameInfoList.Where(m => m.GameID == 15).FirstOrDefault(); //gameinfo g14 = new gameinfo(); //if (game14 != null) //{ // g14.dwWin = Convert.ToInt32(game14.DwWin); // g14.dwTotal = Convert.ToInt32(game14.DwTotal); // g14.maxWinChip = game14.MaxWinChip; //} //else //{ // g14.dwWin = 0; // g14.dwTotal = 0; // g14.maxWinChip = 0; //} //model.GameInfo14 = g14; model.Friend = (short)BExtInfo.UserExData.WMaxFriend; uint lastLoginTime = BExtInfo.UserExData.LastLoginTime; DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); long lTime = long.Parse(lastLoginTime + "0000000"); TimeSpan toNow = new TimeSpan(lTime); dtStart = dtStart.Add(toNow); model.LastLoginTime = dtStart; model.lastMoney = BExtInfo.UserExData.LastMoney; } else if (SystemType == "1") { int indexData = 4; byte[] numData = new byte[4]; Array.Copy(model.ExtInfo, indexData, numData, 0, 4); int num = System.BitConverter.ToInt32(numData, 0); indexData = indexData + 4; byte[] DataInfo = new byte[num]; Array.Copy(model.ExtInfo, 0, DataInfo, 0, num); while (indexData < num) { //类型ID int typeid = System.BitConverter.ToInt32(DataInfo, indexData); indexData = indexData + 4; int datanum = System.BitConverter.ToInt32(DataInfo, indexData); indexData = indexData + 4; //VIP等级 if (typeid == 1) { model.VipGrade = System.BitConverter.ToInt32(DataInfo, indexData); model.VipPoint = System.BitConverter.ToInt32(DataInfo, indexData + 4); indexData = indexData + datanum; } //玩家等级 else if (typeid == 2) { model.LevelGrade = System.BitConverter.ToInt32(DataInfo, indexData); indexData = indexData + datanum; } //道具 else if (typeid == 4) { model.ItemCount = datanum / 24; indexData = indexData + datanum; } //牌局 else if (typeid == 9) { int flag = indexData + datanum; model.Friend = System.BitConverter.ToInt16(DataInfo, indexData); uint lastLoginTime = System.BitConverter.ToUInt32(DataInfo, indexData + 4); DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); long lTime = long.Parse(lastLoginTime + "0000000"); TimeSpan toNow = new TimeSpan(lTime); dtStart = dtStart.Add(toNow); model.LastLoginTime = dtStart; //long lastMoney = System.BitConverter.ToInt32(DataInfo, indexData + 16); //model.lastMoney = lastMoney; indexData = indexData + 32; while (indexData < flag) { short gameid = System.BitConverter.ToInt16(DataInfo, indexData); indexData = indexData + 4; switch (gameid) { case 15: //德州 gameinfo gameinfo15 = new gameinfo(); gameinfo15.dwWin = System.BitConverter.ToInt32(DataInfo, indexData); gameinfo15.dwTotal = System.BitConverter.ToInt32(DataInfo, indexData + 4); gameinfo15.maxWinChip = System.BitConverter.ToInt32(DataInfo, indexData + 8); model.GameInfo15 = gameinfo15; indexData = indexData + 12; break; case 13: //中发白 gameinfo gameinfo13 = new gameinfo(); gameinfo13.dwWin = System.BitConverter.ToInt32(DataInfo, indexData); gameinfo13.dwTotal = System.BitConverter.ToInt32(DataInfo, indexData + 4); gameinfo13.maxWinChip = System.BitConverter.ToInt32(DataInfo, indexData + 8); model.GameInfo13 = gameinfo13; indexData = indexData + 12; break; case 14: //十二生肖 gameinfo gameinfo14 = new gameinfo(); gameinfo14.dwWin = System.BitConverter.ToInt32(DataInfo, indexData); gameinfo14.dwTotal = System.BitConverter.ToInt32(DataInfo, indexData + 4); gameinfo14.maxWinChip = System.BitConverter.ToInt32(DataInfo, indexData + 8); model.GameInfo14 = gameinfo14; indexData = indexData + 12; break; default: indexData = flag; break; } } } else { indexData = indexData + datanum; } } } else { } } // 计算在线状态 UserStateReq UserStateReq; // model.Minu 传一个时间长短给服务器 UserStateReq = UserStateReq.CreateBuilder() .SetUserId(Convert.ToInt32(model.ID)) .Build(); Bind tbind = Cmd.runClient(new Bind(ServiceCmd.SC_USER_STATE, UserStateReq.ToByteArray())); switch ((CenterCmd)tbind.header.CommandID) { case CenterCmd.CS_USER_STATE: UserStateRes UserStateRes = UserStateRes.ParseFrom(tbind.body.ToBytes()); int state = UserStateRes.State; int roomId = UserStateRes.RoomId; int roomtype = UserStateRes.RoomType; model.IsOnLine = state > 0 ? IsOnLine.在线 : IsOnLine.离线; model.RoomID = roomId; model.RoomType = (gameID)roomtype; break; case CenterCmd.CS_CONNECT_ERROR: break; } BaseDataView vbd = new BaseDataView { StartDate = DateTime.Now.AddDays(-10).Date.ToString(), ExpirationDate = DateTime.Now.AddDays(1).Date.ToString(), //Channels = _Channels, SearchExt = _Value }; IEnumerable <BaseDataInfo> ibd = BaseDataBLL.GetGameProfit(vbd); foreach (BaseDataInfo m in ibd) { model.tenDayYinkui = m.ProfitAdd1 + m.ProfitDel1 + m.ProfitAdd2 + m.ProfitDel2 + m.ProfitAdd3 + m.ProfitDel3 + m.ProfitAdd4 + m.ProfitDel4 + m.ProfitAdd5 + m.ProfitDel5 + m.ProfitAdd6 + m.ProfitDel6 + m.ProfitAdd7 + m.ProfitDel7 + m.ProfitAdd8 + m.ProfitDel8 + m.ProfitAdd9 + m.ProfitDel9 + m.ProfitAdd10 + m.ProfitDel10; } foreach (BaseDataInfo m in ibd) { model.tenDayChanchu = m.ProfitAdd1 + m.ProfitAdd2 + m.ProfitAdd3 + m.ProfitAdd4 + m.ProfitAdd5 + m.ProfitAdd6 + m.ProfitAdd7 + m.ProfitAdd8 + m.ProfitAdd9 + m.ProfitAdd10; } foreach (BaseDataInfo m in ibd) { model.tenDayXiaohao = m.ProfitDel1 + m.ProfitDel2 + m.ProfitDel3 + m.ProfitDel4 + m.ProfitDel5 + m.ProfitDel6 + m.ProfitDel7 + m.ProfitDel8 + m.ProfitDel9 + m.ProfitDel10; } model.RemarksName = MemberCenterBLL.GetRemarksNameByID(_Value); } BaseDataView vbd2 = new BaseDataView { StartDate = DateTime.Now.Date.ToString(), ExpirationDate = DateTime.Now.AddDays(1).Date.ToString(), //Channels = _Channels, SearchExt = _Value }; if (_Value != "") { //ViewData["DetailProfit"] = BaseDataBLL.GetGameOutputDetailUser(vbd); ViewData["GameProfit"] = BaseDataBLL.GetGameProfit(vbd2); } else { ViewData["GameProfit"] = ""; } Role rl = RoleBLL.GetModelByID(new Role { ID = Convert.ToInt64(_Value) }); if (rl != null) { string nikeName = rl.NickName; } model.SendEmailCount = MemberCenterBLL.GetSendEmailCount(_Value); int fishCount = 0; GameRecordView grv = new GameRecordView { SearchExt = _Value, StartDate = DateTime.Now.AddDays(-1).Date.ToString(), ExpirationDate = DateTime.Now.AddDays(1).Date.ToString() }; IEnumerable <UserFishInfo> Fishmodel = FishInfoBLL.GetUserInfo(grv); foreach (GL.Data.Model.UserFishInfo m in Fishmodel) { fishCount = fishCount + m.Fish1 * 200000; fishCount = fishCount + m.Fish2 * 1000000; fishCount = fishCount + m.Fish3 * 2000000; fishCount = fishCount + m.Fish4 * 5000000; fishCount = fishCount + m.Fish5 * 100000; fishCount = fishCount + m.Fish6 * 50000; } return(View(model)); }
public ActionResult QQZoneRechargeCount(Dictionary <string, string> queryvalues) { int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : -1; int _page = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1; int _pageGroup = queryvalues.ContainsKey("pageGroup") ? Convert.ToInt32(queryvalues["pageGroup"]) : 1; string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"); groupby _Groupby = (groupby)(queryvalues.ContainsKey("groupby") ? Convert.ToInt32(queryvalues["groupby"]) : 1); string _target = queryvalues.ContainsKey("target") ? queryvalues["target"] : ""; int MasterID = User.Identity.GetUserId <int>(); if (AgentUserBLL.CheckUser(_Channels, MasterID)) { _Channels = MasterID; } string _MasterList = AgentUserBLL.GetUserListString(MasterID); if (_MasterList == MasterID.ToString()) { _Channels = MasterID; } string _UserList = AgentUserBLL.GetUserListString(_Channels); BaseDataView vbd = new BaseDataView { UserList = _UserList, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Groupby = _Groupby, Channels = _Channels, Page = _page }; ViewData["groupby"] = vbd.Groupby.ToSelectListItemForSelect(); List <SelectListItem> ieList = AgentUserBLL.GetUserList(_MasterList).Select( x => new SelectListItem { Text = x.AgentName, Value = x.Id.ToString(), Selected = x.Id == _Channels } ).ToList(); ieList.Insert(0, new SelectListItem { Text = "所有渠道", Value = "0", Selected = 0 == _Channels }); var cha = AgentUserBLL.GetUserList(_MasterList).Select(x => new SelectListItem { Text = x.AgentName, Value = x.Id.ToString(), Selected = x.Id == _Channels }); if (cha.Count() <= 1) { ViewData["cCount"] = 1; } else { ViewData["cCount"] = 2; } ViewData["Channels"] = cha; ViewData["SumRecharge"] = QQZoneRechargeBLL.GetSumRecharge(vbd); if (_target == "box") { vbd.Page = _page; ViewData["data"] = QQZoneRechargeBLL.GetListByPage(_page, vbd); return(PartialView("QQZoneRechargeCount_PageList", ViewData["data"])); } else if (_target == "boxGroup") { vbd.Page = _pageGroup; Webdiyer.WebControls.Mvc.PagedList <GL.Data.Model.QQZoneRechargeCount> pa = new Webdiyer.WebControls.Mvc.PagedList <GL.Data.Model.QQZoneRechargeCount>(BaseDataBLL.GetQQZoneRechargeCount(vbd), _pageGroup, 10); vbd.BaseDataList = pa; ViewData["dataGroup"] = vbd.BaseDataList; return(PartialView("QQZoneRechargeCountGroup_PageList", ViewData["dataGroup"])); } else { ViewData["data"] = QQZoneRechargeBLL.GetListByPage(_page, vbd); Webdiyer.WebControls.Mvc.PagedList <GL.Data.Model.QQZoneRechargeCount> pa = new Webdiyer.WebControls.Mvc.PagedList <GL.Data.Model.QQZoneRechargeCount>(BaseDataBLL.GetQQZoneRechargeCount(vbd), _page, 10); vbd.BaseDataList = pa; ViewData["dataGroup"] = vbd.BaseDataList; } return(View(vbd)); }