public List <GameDailyLog> GetGameDailyLogList(ref DataPage dp, GameDailyLog searchGameDailyLog) { Expression <Func <GameDailyLog, bool> > exp = CreateDydaminWhereAndExpression <GameDailyLog>(searchGameDailyLog); List <GameDailyLog> resultlist = GetEntityQueryList(ref dp, exp, p => p.RecordId); return(resultlist); }
/// <summary> /// 增加 /// </summary> /// <returns></returns> public ActionResult AddGameDailyLog() { GameDailyLog gameDailyLog = new GameDailyLog(); //记录日志 Log(string.Format("查看[GameDailyLog]新增页面")); return(View(gameDailyLog)); }
public ActionResult AddGameDailyLog(GameDailyLog gameDailyLog) { gameDailyLog.GUID = Guid.NewGuid(); int rs = PetFeedEventsBll.InsertGameDailyLog(gameDailyLog); //记录日志 Log(string.Format("新增GameDailyLog 数据:{0}", gameDailyLog.ToString())); return(EditResult(rs, "操作失败", "GameDailyLogList")); }
public int InsertGameDailyLog(GameDailyLog gamedailylog) { int rs = 0; TaskConfig config = ptx.TaskConfig.Where(p => p.TaskConfigId == gamedailylog.TaskConfigId).Single(); DynamicPacketQueue packetqueue = new DynamicPacketQueue() { UserId = gamedailylog.UserId, AvatarId = gamedailylog.AvatarId, Sex = gamedailylog.Sex, GUID = gamedailylog.GUID, Site = gamedailylog.AreaId, Source = gamedailylog.Source, PacketId = config.PacketId, ItemCode = config.ItemCode, PacketItemTime = config.ItemTimePerTask, PacketItemCount = config.ItemCountPerTask * gamedailylog.ActualNum, Gold = config.GoldPerTask, BindCash = config.BindCashPerTask }; ptx.GameDailyLog.Add(gamedailylog); ptx.DynamicPacketQueue.Add(packetqueue); rs = ptx.SaveChanges(); return(rs); }
public int InsertGameDailyLog(GameDailyLog gamedailylog) { _admin = new PetFeedEventsAdminService.PetFeedEventsAdminServiceClient(); int rs = 0; try { rs = _admin.InsertGameDailyLog(gamedailylog); _admin.Close(); return(rs); } catch (Exception ex) { _admin.CloseCatch(ex, "InsertGameDailyLog Failed"); return(0); } }
public List <GameDailyLog> GetGameDailyLogList(ref DataPage dp, GameDailyLog searchGameDailyLog) { _admin = new PetFeedEventsAdminService.PetFeedEventsAdminServiceClient(); List <GameDailyLog> lists = new List <GameDailyLog>(); try { lists = _admin.GetGameDailyLogList(ref dp, searchGameDailyLog); _admin.Close(); return(lists); } catch (Exception ex) { _admin.CloseCatch(ex, "GetGameDailyLogList Failed"); return(lists); } }
public ActionResult GameDailyLogList(DataPage dp, DateTime?RecordDate, GameDailyLog model) { model.GUID = Guid.Empty; model.RecordDate = RecordDate ?? DateTime.Now.AddDays(-1); model.CreateTime = defaultDate; List <GameDailyLog> lists = new List <GameDailyLog>(); if (Request["btnExportExcel"] == null)//导出Excel { lists = PetFeedEventsBll.GetGameDailyLogList(ref dp, model); GetDataPage(dp); } else { dp.PageSize = 0; lists = PetFeedEventsBll.GetGameDailyLogList(ref dp, model); string fileName = "nothing"; if (lists.Count() > 0) { fileName = "GameDailyLogList" + lists.Count() + "_Item"; } Dictionary <string, Func <GameDailyLog, string> > showFields = new Dictionary <string, Func <GameDailyLog, string> >(); showFields.Add("RecordId", z => "'" + z.RecordId.ToString()); showFields.Add("UserId", z => "'" + z.UserId.ToString()); showFields.Add("AreaId", z => "'" + z.AreaId.ToString()); showFields.Add("AvatarId", z => "'" + z.AvatarId.ToString()); showFields.Add("AvatarName", z => "'" + z.AvatarName.ToString()); showFields.Add("Sex", z => "'" + z.Sex.ToString()); showFields.Add("RecordDate", z => "'" + z.RecordDate.ToString()); showFields.Add("TaskConfigId", z => "'" + z.TaskConfigId.ToString()); showFields.Add("ActualNum", z => "'" + z.ActualNum.ToString()); showFields.Add("FinalGetNum", z => "'" + z.FinalGetNum.ToString()); showFields.Add("CreateTime", z => "'" + z.CreateTime.ToString()); showFields.Add("GUID", z => "'" + z.GUID.ToString()); showFields.Add("Source", z => "'" + z.Source.ToString()); ExcelHelper2 <GameDailyLog> elh = new ExcelHelper2 <GameDailyLog>(lists, null, showFields); elh.FileWebSaveAs(Response, fileName); } return(View(lists)); }
/// <summary> /// 列表 /// </summary> /// <param name="searchSort">用来搜索的实例</param> /// <returns></returns> public ActionResult GameDailyLogsList(DataPage dp, GameDailyLog model) { model.CreateTime = defaultDate; List <GameDailyLog> lists = new List <GameDailyLog>(); if (Request["btnExportExcel"] == null)//导出Excel { lists = CampEventsBll.GetGameDailyLogList(ref dp, model); GetDataPage(dp); } else { dp.PageSize = 0; lists = CampEventsBll.GetGameDailyLogList(ref dp, model); string fileName = "nothing"; if (lists.Count() > 0) { fileName = "GameDailyLogsList" + lists.Count() + "_Item"; } Dictionary <string, Func <GameDailyLog, string> > showFields = new Dictionary <string, Func <GameDailyLog, string> >(); showFields.Add("RecordId", z => "'" + z.RecordId.ToString()); showFields.Add("UserId", z => "'" + z.UserId.ToString()); showFields.Add("AreaId", z => "'" + z.AreaId.ToString()); showFields.Add("AvatarId", z => "'" + z.AvatarId.ToString()); showFields.Add("AvatarName", z => "'" + z.AvatarName.ToString()); showFields.Add("RecordDate", z => "'" + z.RecordDate.ToString()); showFields.Add("TaskConfigId", z => "'" + z.TaskConfigId.ToString()); showFields.Add("FinalNumber", z => "'" + z.FinalNumber.ToString()); showFields.Add("TaskGetPoints", z => "'" + z.TaskGetPoints.ToString()); showFields.Add("CreateTime", z => "'" + z.CreateTime.ToString()); ObjectUtil.Common.ExcelHelper2 <GameDailyLog> elh = new ObjectUtil.Common.ExcelHelper2 <GameDailyLog>(lists, null, showFields); elh.FileWebSaveAs(Response, fileName); } //记录日志 Log(string.Format("查看[GameDailyLogs]列表页面 搜索数据:{0}", model.ToString())); return(View(lists)); }
public int InsertGameDailyLog(GameDailyLog gamedailylog) { return(_dal.InsertGameDailyLog(gamedailylog)); }
public List <GameDailyLog> GetGameDailyLogList(ref DataPage dp, GameDailyLog searchGameDailyLog) { return(_dal.GetGameDailyLogList(ref dp, searchGameDailyLog)); }