public ActionResult Draft(RetractionsBillsEntity model, bool isAutoHandle)
 {
     IAuthorPlatformFacadeService service = ServiceContainer.Instance.Container.Resolve<IAuthorPlatformFacadeService>();
     model.JournalID = CurAuthor.JournalID;
     model.AuthorID = CurAuthor.AuthorID;
     ExecResult result = service.DraftContributionInfo(model);
     if (isAutoHandle == true)
     {
         ContributionInfoQuery cQueryEntity = new ContributionInfoQuery();
         cQueryEntity.JournalID = CurAuthor.JournalID;
         cQueryEntity.CID = model.CID;
         IContributionFacadeService cservice = ServiceContainer.Instance.Container.Resolve<IContributionFacadeService>();
         cservice.DealWithdrawal(cQueryEntity);
     }
     return Json(new { result = result.result, msg = result.msg });
 }
        /// <summary>
        /// 添加撤稿信息
        /// </summary>
        /// <param name="retractionsBillsEntity"></param>
        /// <returns></returns>
        public bool AddRetractionsBills(RetractionsBillsEntity retractionsBillsEntity,DbTransaction trans=null)
        {
            StringBuilder sqlCommandText = new StringBuilder();
            sqlCommandText.Append(" @JournalID");
            sqlCommandText.Append(", @CID");
            sqlCommandText.Append(", @AuthorID");
            sqlCommandText.Append(", @Reason");
            sqlCommandText.Append(", @Handler");
            sqlCommandText.Append(", @HandAdvice");
            sqlCommandText.Append(", @Status");

            DbCommand cmd = db.GetSqlStringCommand(String.Format("INSERT INTO dbo.RetractionsBills ({0}) VALUES ({1})", sqlCommandText.ToString().Replace("@", ""), sqlCommandText.ToString()));

            db.AddInParameter(cmd, "@JournalID", DbType.Int64, retractionsBillsEntity.JournalID);
            db.AddInParameter(cmd, "@CID", DbType.Int64, retractionsBillsEntity.CID);
            db.AddInParameter(cmd, "@AuthorID", DbType.Int64, retractionsBillsEntity.AuthorID);
            db.AddInParameter(cmd, "@Reason", DbType.AnsiString, TextHelper.SubStr(retractionsBillsEntity.Reason.TextFilter(),1000));
            db.AddInParameter(cmd, "@Handler", DbType.Int64, retractionsBillsEntity.Handler);
            db.AddInParameter(cmd, "@HandAdvice", DbType.AnsiString, TextHelper.SubStr(retractionsBillsEntity.HandAdvice.TextFilter(),1000));
            db.AddInParameter(cmd, "@Status", DbType.Byte, retractionsBillsEntity.Status);
            try
            {
                bool result = false;
                if (trans == null)
                    result = db.ExecuteNonQuery(cmd) > 0;
                else
                    result = db.ExecuteNonQuery(cmd, trans) > 0;
                if (!result)
                    throw new Exception("新增撤稿信息失败!");
                return result;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 /// <summary>
 /// 撤稿
 /// </summary>
 /// <param name="retractionsBillsEntity"></param>
 /// <returns></returns>
 public bool DraftContribution(RetractionsBillsEntity model)
 {
     return ContributionInfoDataAccess.Instance.DraftContribution(model);
 }
 /// <summary>
 /// 添加撤稿信息
 /// </summary>
 /// <param name="retractionsBillsEntity"></param>
 /// <returns></returns>
 public bool AddRetractionsBills(RetractionsBillsEntity model)
 {
     return ContributionInfoDataAccess.Instance.AddRetractionsBills(model);
 }
 /// <summary>
 /// 撤稿
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ExecResult DraftContributionInfo(RetractionsBillsEntity model)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     ExecResult result = clientHelper.Post<ExecResult, RetractionsBillsEntity>(GetAPIUrl(APIConstant.DRAFT_DRAFT), model);
     return result;
 }
Пример #6
0
 /// <summary>
 /// 查看撤稿申请
 /// </summary>
 /// <param name="CID"></param>
 /// <returns></returns>
 public ActionResult ViewRetraction(long CID)
 {
     IAuthorPlatformFacadeService service = ServiceContainer.Instance.Container.Resolve<IAuthorPlatformFacadeService>();
     RetractionsBillsQuery rQuery = new RetractionsBillsQuery();
     rQuery.CID = CID;
     rQuery.JournalID = JournalID;
     RetractionsBillsEntity rEntity = service.GetRetractionsBillsModel(rQuery);
     if (rEntity == null)
     {
         rEntity = new RetractionsBillsEntity();
     }
     return View(rEntity);
 }
 /// <summary>
 /// 编辑撤稿表信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateRetractionsBills(RetractionsBillsEntity model)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     bool result = clientHelper.Post<bool, RetractionsBillsEntity>(GetAPIUrl(APIConstant.DRAFT_UPDATE), model);
     return result;
 }
 public bool AddRetractionsBills(RetractionsBillsEntity model)
 {
     IContributionInfoService service = ServiceContainer.Instance.Container.Resolve<IContributionInfoService>();
     bool result = service.AddRetractionsBills(model);
     return result;
 }
 public ExecResult Draft(RetractionsBillsEntity model)
 {
     IContributionInfoService service = ServiceContainer.Instance.Container.Resolve<IContributionInfoService>();
     ExecResult result = service.DraftContribution(model);
     return result;
 }
Пример #10
0
 /// <summary>
 /// 编辑撤稿信息
 /// </summary>
 /// <param name="retractionsBillsEntity"></param>
 /// <param name="trans"></param>
 /// <returns></returns>
 public bool UpdateRetractionsBills(RetractionsBillsEntity model)
 {
     return ContributionInfoBusProvider.UpdateRetractionsBills(model);
 }
Пример #11
0
 /// <summary>
 /// 撤稿
 /// </summary>
 /// <param name="retractionsBillsEntity"></param>
 /// <returns></returns>
 public ExecResult DraftContribution(RetractionsBillsEntity model)
 {
     ExecResult execResult = new ExecResult();
     bool result = false;
     if (model.PKID == 0)
         result = ContributionInfoBusProvider.DraftContribution(model);
     else
         result = UpdateRetractionsBills(model);
     if (result)
     {
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "撤稿成功!";
     }
     else
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "撤稿失败!";
     }
     return execResult;
 }