// 开始统计 public override OpRes doStat(object param, GMUser user) { ParamStatPlayer p = (ParamStatPlayer)param; DateTime mint = DateTime.Now, maxt = mint; bool res = Tool.splitTimeStr(p.m_time, ref mint, ref maxt); if (!res) { return(OpRes.op_res_time_format_error); } m_result.reset(); string cmd = ""; statData fun = null; switch (p.m_statType) { case (int)StatSellerType.stat_seller_type_day: { // 售货亭对下级管理员的存款及提款 cmd = string.Format(CMD_STAT_PLAYER, "%Y-%m-%d", TableName.PLAYER_GAME_SCORE, TableName.PLAYER_ACCOUNT_XIANXIA, mint, maxt, p.m_moneyType); fun = doStatTypeDay; } break; case (int)StatSellerType.stat_seller_type_month: { cmd = string.Format(CMD_STAT_PLAYER, "%Y-%m", TableName.PLAYER_GAME_SCORE, TableName.PLAYER_ACCOUNT_XIANXIA, mint, maxt, p.m_moneyType); fun = doStatTypeDay; } break; } List <Dictionary <string, object> > dataList = user.sqlDb.queryList(cmd, user.getMySqlServerID(), MySqlDbName.DB_XIANXIA); if (fun != null) { fun(dataList); } return(OpRes.opres_success); }
protected void onStat(object sender, EventArgs e) { ParamStatPlayer param = new ParamStatPlayer(); param.m_time = m_time.Text; param.m_statType = Convert.ToInt32(m_way.SelectedValue); param.m_moneyType = m_moneyType.SelectedIndex; GMUser user = (GMUser)Session["user"]; OpRes res = user.doStat(param, StatType.statTypePlayer); genTableByDay(m_result, res, user); }