public IssueSubscribeEntity GetIssueSubscribeModel(IssueSubscribeQuery query)
 {
     IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>();
     IssueSubscribeEntity model = service.GetIssueSubscribe(query.subscribeID);
     return model;
 }
Beispiel #2
0
 /// <summary>
 /// 获取期刊订阅查询条件
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 private string GetIssueSubscribeFilter(IssueSubscribeQuery query)
 {
     StringBuilder strFilter = new StringBuilder(" JournalID=" + query.JournalID);
     return strFilter.ToString();
 }
 public IList<IssueSubscribeEntity> GetIssueSubscribeList(IssueSubscribeQuery query)
 {
     IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>();
     IList<IssueSubscribeEntity> list = service.GetIssueSubscribeList(query);
     return list;
 }
Beispiel #4
0
 /// <summary>
 /// 获取期刊订阅数据
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public IList<IssueSubscribeEntity> GetIssueSubscribeList(IssueSubscribeQuery query)
 {
     if (string.IsNullOrWhiteSpace(query.OrderStr))
         query.OrderStr = " SubscribeID DESC";
     string strSql = "SELECT * FROM dbo.IssueSubscribe with(nolock)";
     string whereSQL = GetIssueSubscribeFilter(query);
     if (!string.IsNullOrWhiteSpace(whereSQL))
     {
         strSql += " WHERE " + whereSQL;
     }
     strSql += " ORDER BY " + query.OrderStr;
     return db.GetList<IssueSubscribeEntity>(strSql, MakeIssueSubscribeList);
 }
Beispiel #5
0
 /// <summary>
 /// 获取期刊订阅分页数据
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public Pager<IssueSubscribeEntity> GetIssueSubscribePageList(IssueSubscribeQuery query)
 {
     if (string.IsNullOrWhiteSpace(query.OrderStr))
         query.OrderStr = " SubscribeID DESC";
     string strSql = "SELECT *,ROW_NUMBER() OVER(ORDER BY " + query.OrderStr + ") AS ROW_ID FROM dbo.IssueSubscribe with(nolock)"
         , sumStr = "SELECT RecordCount=COUNT(1) FROM dbo.IssueSubscribe with(nolock)";
     string whereSQL = GetIssueSubscribeFilter(query);
     if (!string.IsNullOrWhiteSpace(whereSQL))
     {
         strSql += " WHERE " + whereSQL;
         sumStr += " WHERE " + whereSQL;
     }
     return db.GetPageList<IssueSubscribeEntity>(string.Format(SQL_Page_Select, strSql, query.StartIndex, query.EndIndex)
         , sumStr
         , query.CurrentPage, query.PageSize
         , (dr, pager) =>
         {
             pager.TotalRecords = TypeParse.ToLong(dr["RecordCount"]);
         }
         , MakeIssueSubscribeList);
 }
 /// <summary>
 /// 获取期刊订阅列表
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>       
 public IList<IssueSubscribeEntity> GetIssueSubscribeList(IssueSubscribeQuery query)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     IList<IssueSubscribeEntity> list = clientHelper.Post<IList<IssueSubscribeEntity>, IssueSubscribeQuery>(GetAPIUrl(APIConstant.ISSUESUBSCRIBE_GETLIST), query);
     return list;
 }
Beispiel #7
0
 /// <summary>
 /// 获取期刊订阅分页数据
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public Pager<IssueSubscribeEntity> GetIssueSubscribePageList(IssueSubscribeQuery query)
 {
     return IssueDataAccess.Instance.GetIssueSubscribePageList(query);
 }
Beispiel #8
0
 public ActionResult IssueSubscribeToExcel(IssueSubscribeQuery query, string strDict)
 {
     try
     {
         strDict = Server.UrlDecode(strDict);
         JavaScriptSerializer s = new JavaScriptSerializer();
         Dictionary<string, object> JsonData = (Dictionary<string, object>)s.DeserializeObject(strDict);
         IDictionary<string, string> dict = ((object[])JsonData["dict"]).Select(p => (Dictionary<string, object>)p).ToDictionary(p => p["key"].ToString(), q => q["value"].ToString());
         IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>();
         query.JournalID = CurAuthor.JournalID;
         IList<IssueSubscribeEntity> list = service.GetIssueSubscribeList(query);
         if (list == null || list.Count <= 0)
         {
             return Content("没有数据不能导出,请先进行查询!");
         }
         RenderToExcel.ExportListToExcel<IssueSubscribeEntity>(list, dict
             , null
             , "期刊订阅信息_导出" + DateTime.Now.ToString("yyyy-MM-dd"), false, "xls");
         return Content("导出成功!");
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("导出期刊订阅信息出现异常:" + ex.Message);
         return Content("导出期刊订阅信息异常!");
     }
 }
Beispiel #9
0
 private IssueSubscribeEntity GetIssueSubscribeModel(Int64 subscribeID)
 {
     IssueSubscribeEntity model = null;
     if (subscribeID > 0)
     {
         IssueSubscribeQuery query = new IssueSubscribeQuery();
         query.JournalID = CurAuthor.JournalID;
         query.subscribeID = subscribeID;
         IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>();
         model = service.GetIssueSubscribeModel(query);
     }
     if (model == null)
         model = new IssueSubscribeEntity();
     return model;
 }
Beispiel #10
0
 public ActionResult GetIssueSubscribeList(IssueSubscribeQuery query)
 {
     IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>();
     query.JournalID = CurAuthor.JournalID;
     IList<IssueSubscribeEntity> list = service.GetIssueSubscribeList(query);
     return Json(new { list });
 }
Beispiel #11
0
 public ActionResult GetIssueSubscribePageList(IssueSubscribeQuery query)
 {
     IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>();
     query.JournalID = CurAuthor.JournalID;
     query.CurrentPage = Convert.ToInt32(Request.Params["page"]);
     query.PageSize = Convert.ToInt32(Request.Params["pagesize"]);
     Pager<IssueSubscribeEntity> pager = service.GetIssueSubscribePageList(query);
     return Json(new { Rows = pager.ItemList, Total = pager.TotalRecords });
 }
 /// <summary>
 /// 删除期刊订阅
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>      
 public ExecResult DelIssueSubscribe(IssueSubscribeQuery query)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     ExecResult result = clientHelper.Post<ExecResult, IssueSubscribeQuery>(GetAPIUrl(APIConstant.ISSUESUBSCRIBE_DEL), query);
     return result;
 }
 /// <summary>
 /// 获取期刊订阅分页数据
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>     
 public Pager<IssueSubscribeEntity> GetIssueSubscribePageList(IssueSubscribeQuery query)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     Pager<IssueSubscribeEntity> pager = clientHelper.Post<Pager<IssueSubscribeEntity>, IssueSubscribeQuery>(GetAPIUrl(APIConstant.ISSUESUBSCRIBE_GETPAGELIST), query);
     return pager;
 }
 /// <summary>
 /// 获取期刊订阅实体
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>       
 public IssueSubscribeEntity GetIssueSubscribeModel(IssueSubscribeQuery query)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     IssueSubscribeEntity model = clientHelper.Post<IssueSubscribeEntity, IssueSubscribeQuery>(GetAPIUrl(APIConstant.ISSUESUBSCRIBE_GETMODEL), query);
     return model;
 }
 public Pager<IssueSubscribeEntity> GetIssueSubscribePageList(IssueSubscribeQuery query)
 {
     IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>();
     Pager<IssueSubscribeEntity> pager = service.GetIssueSubscribePageList(query);
     return pager;
 }
Beispiel #16
0
 public ActionResult DelIssueSubscribe(Int64[] SubscribeIDs)
 {
     IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>();
     IssueSubscribeQuery query = new IssueSubscribeQuery();
     query.JournalID = CurAuthor.JournalID;
     query.subscribeIDs = SubscribeIDs;
     ExecResult result = service.DelIssueSubscribe(query);
     return Json(new { result = result.result, msg = result.msg });
 }
 public ExecResult DelIssueSubscribe(IssueSubscribeQuery query)
 {
     IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>();
     return service.DelIssueSubscribe(query.subscribeIDs);
 }
Beispiel #18
0
 /// <summary>
 /// 获取期刊订阅分页数据
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public Pager<IssueSubscribeEntity> GetIssueSubscribePageList(IssueSubscribeQuery query)
 {
     return IssueBusProvider.GetIssueSubscribePageList(query);
 }