/// <summary> /// 保存期设置 /// </summary> /// <param name="model"></param> /// <returns></returns> public ExecResult SaveIssueSet(IssueSetEntity model) { ExecResult execResult = new ExecResult(); if (IssueSetIsExists(model)) { execResult.result = EnumJsonResult.failure.ToString(); execResult.msg = "该期设置已经存在!"; return(execResult); } bool result = false; if (model.IssueSetID == 0) { result = AddIssueSet(model); } else { result = UpdateIssueSet(model); } if (result) { execResult.result = EnumJsonResult.success.ToString(); execResult.msg = "保存期设置成功!"; } else { execResult.result = EnumJsonResult.failure.ToString(); execResult.msg = "保存期设置失败!"; } return(execResult); }
public IssueSetEntity GetIssueSetModel(IssueSetQuery query) { IIssueService service = ServiceContainer.Instance.Container.Resolve <IIssueService>(); IssueSetEntity model = null; if (query.IssueSetID == 0) { model = service.GetMaxIssueSet(query.JournalID); } else { model = service.GetIssueSet(query.IssueSetID); } if (model != null) { Pager <IssueSetEntity> currentEntity = service.GetIssueSetPageList(query); if (currentEntity != null && currentEntity.ItemList != null && currentEntity.ItemList.Count > 0) { IList <IssueSetEntity> list = currentEntity.ItemList; IssueSetEntity single = list.Where(o => o.Issue == model.Issue).SingleOrDefault(); model.PrintExpenses = single.PrintExpenses; } } return(model); }
/// <summary> /// 保存期设置 /// </summary> /// <param name="query"></param> /// <returns></returns> public ExecResult SaveIssueSet(IssueSetEntity model) { HttpClientHelper clientHelper = new HttpClientHelper(); ExecResult result = clientHelper.Post <ExecResult, IssueSetEntity>(GetAPIUrl(APIConstant.ISSUESET_SAVE), model); return(result); }
/// <summary> /// 获取期设置实体 /// </summary> /// <param name="query"></param> /// <returns></returns> public IssueSetEntity GetIssueSetModel(IssueSetQuery query) { HttpClientHelper clientHelper = new HttpClientHelper(); IssueSetEntity model = clientHelper.Post <IssueSetEntity, IssueSetQuery>(GetAPIUrl(APIConstant.ISSUESET_GETMODEL), query); return(model); }
public ActionResult SaveIssueSet(IssueSetEntity model) { IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve <IIssueFacadeService>(); model.JournalID = CurAuthor.JournalID; ExecResult result = service.SaveIssueSet(model); return(Json(new { result = result.result, msg = result.msg })); }
public ActionResult CreateIssueSet(Int64 IssueSetID = 0, int year = 0) { IssueSetEntity model = GetIssueSetModel(IssueSetID, year); if (IssueSetID == 0) { model.Status = 1; } ViewBag.year = year; return(View(model)); }
private IssueSetEntity GetIssueSetModel(Int64 IssueSetID, int year) { IssueSetQuery query = new IssueSetQuery(); query.JournalID = CurAuthor.JournalID; query.IssueSetID = IssueSetID; query.Year = year; IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve <IIssueFacadeService>(); IssueSetEntity model = service.GetIssueSetModel(query); if (model == null) { model = new IssueSetEntity(); } return(model); }
public ExecResult SaveIssueSet(IssueSetEntity model) { IIssueService service = ServiceContainer.Instance.Container.Resolve <IIssueService>(); return(service.SaveIssueSet(model)); }
/// <summary> /// 期设置是否存在 /// </summary> /// <param name="issueSetEntity"></param> /// <returns></returns> public bool IssueSetIsExists(IssueSetEntity issueSetEntity) { return(IssueBusProvider.IssueSetIsExists(issueSetEntity)); }
/// <summary> /// 编辑期设置 /// </summary> /// <param name="issueSetEntity"></param> /// <returns></returns> public bool UpdateIssueSet(IssueSetEntity issueSetEntity) { return(IssueBusProvider.UpdateIssueSet(issueSetEntity)); }
/// <summary> /// 新增期设置 /// </summary> /// <param name="issueSetEntity"></param> /// <returns></returns> public bool AddIssueSet(IssueSetEntity issueSetEntity) { return(IssueBusProvider.AddIssueSet(issueSetEntity)); }
/// <summary> /// 期设置是否存在 /// </summary> /// <param name="issueSetEntity"></param> /// <returns></returns> public bool IssueSetIsExists(IssueSetEntity issueSetEntity) { return(IssueDataAccess.Instance.IssueSetIsExists(issueSetEntity)); }
/// <summary> /// 编辑期设置 /// </summary> /// <param name="issueSetEntity"></param> /// <returns></returns> public bool UpdateIssueSet(IssueSetEntity issueSetEntity) { return(IssueDataAccess.Instance.UpdateIssueSet(issueSetEntity)); }
/// <summary> /// 新增期设置 /// </summary> /// <param name="issueSetEntity"></param> /// <returns></returns> public bool AddIssueSet(IssueSetEntity issueSetEntity) { return(IssueDataAccess.Instance.AddIssueSet(issueSetEntity)); }