コード例 #1
0
        public List <GameDailyLogHistory> GetGameDailyLogHistoryList(ref DataPage dp, GameDailyLogHistory searchGameDailyLogHistory)
        {
            Expression <Func <GameDailyLogHistory, bool> > exp = CreateDydaminWhereAndExpression <GameDailyLogHistory>(searchGameDailyLogHistory);
            List <GameDailyLogHistory> resultlist = GetEntityQueryList(ref dp, exp, p => p.HistoryId);

            return(resultlist);
        }
コード例 #2
0
        /// <summary>
        ///  列表
        /// </summary>
        /// <param name="searchSort">用来搜索的实例</param>
        /// <returns></returns>
        public ActionResult GameDailyLogHistoriesList(DataPage dp, DateTime?RecordDate, GameDailyLogHistory model)
        {
            if (RecordDate == null)
            {
                model.RecordDate = DateTime.Now.AddDays(-1);
            }
            model.CreateTime = defaultDate;
            List <GameDailyLogHistory> lists = new List <GameDailyLogHistory>();

            if (Request["btnExportExcel"] == null)//导出Excel
            {
                lists = CampEventsBll.GetGameDailyLogHistoryList(ref dp, model);
                GetDataPage(dp);
            }
            else
            {
                dp.PageSize = 0;
                lists       = CampEventsBll.GetGameDailyLogHistoryList(ref dp, model);
                string fileName = "nothing";
                if (lists.Count() > 0)
                {
                    fileName = "GameDailyLogHistoriesList" + lists.Count() + "_Item";
                }
                Dictionary <string, Func <GameDailyLogHistory, string> > showFields = new Dictionary <string, Func <GameDailyLogHistory, string> >();
                showFields.Add("HistoryId", z => "'" + z.HistoryId.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());
                showFields.Add("FromId", z => "'" + z.FromId.ToString());
                ObjectUtil.Common.ExcelHelper2 <GameDailyLogHistory> elh = new ObjectUtil.Common.ExcelHelper2 <GameDailyLogHistory>(lists, null, showFields);
                elh.FileWebSaveAs(Response, fileName);
            }
            //记录日志
            Log(string.Format("查看[GameDailyLogHistories]列表页面 搜索数据:{0}", model.ToString()));

            return(View(lists));
        }
コード例 #3
0
 public List <GameDailyLogHistory> GetGameDailyLogHistoryList(ref DataPage dp, GameDailyLogHistory searchGameDailyLogHistory)
 {
     return(_dal.GetGameDailyLogHistoryList(ref dp, searchGameDailyLogHistory));
 }
コード例 #4
0
        public List <GameDailyLogHistory> GetGameDailyLogHistoryList(ref DataPage dp, GameDailyLogHistory searchGameDailyLogHistory)
        {
            _admin = new CampEventsAdminService.CampEventsAdminServiceClient();
            List <GameDailyLogHistory> lists = new List <GameDailyLogHistory>();

            try
            {
                lists = _admin.GetGameDailyLogHistoryList(ref dp, searchGameDailyLogHistory);
                _admin.Close();
                return(lists);
            }
            catch (Exception ex)
            {
                _admin.CloseCatch(ex, "GetGameDailyLogHistoryList failed");
                return(lists);
            }
        }