public List<EpaperLogQuery> GetEpaperLogList(EpaperLogQuery query, out int totalCount)
 {
     try
     {
         return _IEpaperContentDao.GetEpaperLogList(query, out totalCount);
     }
     catch (Exception ex)
     {
         
         throw new Exception("EpaperContentMgr-->GetEpaperLogList-->"+ex.Message,ex);
     }
 }
        public HttpResponseBase GetEpaperLogList()
        {
            string json = string.Empty;
            List<EpaperLogQuery> store = new List<EpaperLogQuery>();
            EpaperLogQuery query = new EpaperLogQuery();
            try
            {
                if (!string.IsNullOrEmpty(Request.Params["epaperId"]))
                {
                    query.Start = Convert.ToInt32(Request.Params["start"] ?? "0");
                    query.Limit = Convert.ToInt32(Request.Params["limit"] ?? "25");
                    query.epaper_id = Convert.ToUInt32(Request.Params["epaperId"]);
                    _IEpaperContentMgr = new EpaperContentMgr(mySqlConnectionString);
                    int totalCount = 0;
                    store = _IEpaperContentMgr.GetEpaperLogList(query, out  totalCount);
                    foreach (var item in store)
                    {
                        item.LogCreateDate = CommonFunction.GetNetTime(item.log_createdate);
                    }
                    IsoDateTimeConverter timeConverter = new IsoDateTimeConverter();
                    timeConverter.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
                    json = "{success:true,totalCount:" + totalCount + ",data:" + JsonConvert.SerializeObject(store, Formatting.Indented, timeConverter) + "}";
                }
                else
                {
                    json = "{success:false,totalCount:0,data:[]}";
                }

            }
            catch (Exception ex)
            {
                Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
                logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
                logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
                log.Error(logMessage);
                json = "{success:false,totalCount:0,data:[]}";
            }
            this.Response.Clear();
            this.Response.Write(json);
            this.Response.End();
            return this.Response;
        }
        public List<EpaperLogQuery> GetEpaperLogList(EpaperLogQuery query, out int totalCount)
        {
            StringBuilder strSql = new StringBuilder();
            StringBuilder sqlCount = new StringBuilder();
            StringBuilder strWhere = new StringBuilder();
            try
            {
                strSql.AppendFormat("select el.*,mu.user_username as user_name from epaper_log el left join manage_user mu on el.user_id=mu.user_id  ");
                sqlCount.AppendFormat("select count( *) as  totalCount from epaper_log el left join manage_user mu on el.user_id=mu.user_id ");
                strWhere.AppendFormat(" where 1=1 and  el.epaper_id={0}", query.epaper_id);
                totalCount = 0;
                if (query.IsPage)
                {
                    DataTable _dt = _accessMySql.getDataTable(sqlCount.ToString() + strWhere.ToString());
                    if (_dt != null && _dt.Rows.Count > 0)
                    {
                        totalCount = Convert.ToInt32(_dt.Rows[0]["totalCount"]);
                    }
                }
                strSql.AppendFormat(strWhere.ToString());
                strSql.AppendFormat(" limit {0},{1};", query.Start, query.Limit);
                return _accessMySql.getDataTableForObj<EpaperLogQuery>(strSql.ToString());
            }
            catch (Exception ex)
            {

                throw new Exception("EpaperContentDao-->GetEpaperLogList-->" + ex.Message, ex);
            }
        }