/// <summary>
 /// 获取稿件备注实体
 /// </summary>
 /// <param name="CID"></param>
 /// <param name="AuthorID"></param>       
 /// <returns></returns>
 private CRemarkEntity GetCRemarkModel(Int64 CID, Int64 AuthorID)
 {
     CRemarkEntity model = null;
     if (CID > 0)
     {
         CRemarkQuery query = new CRemarkQuery();
         query.JournalID = CurAuthor.JournalID;
         query.CID = CID;
         query.AuthorID = AuthorID;
         IAuthorPlatformFacadeService service = ServiceContainer.Instance.Container.Resolve<IAuthorPlatformFacadeService>();
         model = service.GetCRemarkModel(query);
     }
     if (model == null)
         model = new CRemarkEntity();
     return model;
 }
        /// <summary>
        /// 新增稿件备注
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool AddCRemark(CRemarkEntity model)
        {
            StringBuilder sqlCommandText = new StringBuilder();
            sqlCommandText.Append(" @CID");
            sqlCommandText.Append(", @JournalID");
            sqlCommandText.Append(", @AuthorID");
            sqlCommandText.Append(", @Remark");

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

            db.AddInParameter(cmd, "@CID", DbType.Int64, model.CID);
            db.AddInParameter(cmd, "@JournalID", DbType.Int64, model.JournalID);
            db.AddInParameter(cmd, "@AuthorID", DbType.Int64, model.AuthorID);
            db.AddInParameter(cmd, "@Remark", DbType.AnsiString, model.Remark.TextFilter());

            return db.ExecuteNonQuery(cmd) > 0;
        }
 public ActionResult SaveCRemark(CRemarkEntity model)
 {
     IAuthorPlatformFacadeService service = ServiceContainer.Instance.Container.Resolve<IAuthorPlatformFacadeService>();
     model.JournalID = CurAuthor.JournalID;
     model.AuthorID = CurAuthor.AuthorID;
     ExecResult result = service.SaveCRemark(model);
     return Json(new { result = result.result, msg = result.msg });
 }
 public ActionResult SaveCRemark(CRemarkEntity model)
 {
     IAuthorPlatformFacadeService service = ServiceContainer.Instance.Container.Resolve<IAuthorPlatformFacadeService>();
     model.JournalID = TypeParse.ToLong(ConfigurationManager.AppSettings["JournalID"]);
     model.AuthorID = CurAuthor.AuthorID;
     ExecResult result = service.SaveCRemark(model);
     return Json(new { result = result.result, msg = result.msg });
 }
 /// <summary>
 /// 新增稿件备注
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool AddCRemark(CRemarkEntity model)
 {
     return ContributionInfoDataAccess.Instance.AddCRemark(model);
 }
 /// <summary>
 /// 保存稿件备注
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ExecResult SaveCRemark(CRemarkEntity model)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     ExecResult result = clientHelper.Post<ExecResult, CRemarkEntity>(GetAPIUrl(APIConstant.CREMARK_SAVE), model);
     return result;
 }
 public ExecResult SaveCRemark(CRemarkEntity model)
 {
     IContributionInfoService service = ServiceContainer.Instance.Container.Resolve<IContributionInfoService>();
     ExecResult result = service.SaveCRemark(model);
     return result;
 }
 /// <summary>
 /// 编辑稿件备注
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateCRemark(CRemarkEntity model)
 {
     return ContributionInfoBusProvider.UpdateCRemark(model);
 }
 /// <summary>
 /// 保存稿件备注
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ExecResult SaveCRemark(CRemarkEntity model)
 {
     ExecResult execResult = new ExecResult();
     bool result = false;
     if (model.RemarkID == 0)
         result = AddCRemark(model);
     else
         result = UpdateCRemark(model);
     if (result)
     {
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "添加备注成功!";
     }
     else
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "添加备注失败!";
     }
     return execResult;
 }
 /// <summary>
 /// 新增稿件备注
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool AddCRemark(CRemarkEntity model)
 {
     return ContributionInfoBusProvider.AddCRemark(model);
 }