예제 #1
0
        public ExpertApplyLogEntity GetModel(ExpertApplyLogQuery query)
        {
            IExpertApplyService  service = ServiceContainer.Instance.Container.Resolve <IExpertApplyService>();
            ExpertApplyLogEntity model   = service.GetExpertApplyInfo(query);

            return(model);
        }
예제 #2
0
        public ExecResult SubmitApply(ExpertApplyLogEntity expertApplyEntity)
        {
            ExecResult execResult = new ExecResult();

            try
            {
                IExpertApplyService expertApplyService = ServiceContainer.Instance.Container.Resolve <IExpertApplyService>();

                ExpertApplyLogQuery queryExpertApply = new ExpertApplyLogQuery();
                queryExpertApply.LoginName = expertApplyEntity.LoginName;
                queryExpertApply.JournalID = expertApplyEntity.JournalID;

                //验证是否提交过申请
                IList <ExpertApplyLogEntity> list = expertApplyService.GetExpertApplyInfoList(queryExpertApply);
                if (list != null && list.Count > 0)
                {
                    execResult.result = EnumJsonResult.failure.ToString();
                    execResult.msg    = "此邮箱提交过申请!请更换其他邮箱提交申请或联系编辑部。";
                }
                else//提交申请
                {
                    expertApplyService.SubmitApply(expertApplyEntity);
                    execResult.result = EnumJsonResult.success.ToString();
                    execResult.msg    = "申请提交成功,请等待编辑部审核。\r\n审核结果将会以邮件形式发送到您的邮箱。";
                }
            }
            catch (Exception ex)
            {
                execResult.result = EnumJsonResult.error.ToString();
                execResult.msg    = "提交申请失败:" + ex.Message;
                LogProvider.Instance.Error("提交申请出现异常:" + ex.Message);
            }
            return(execResult);
        }
예제 #3
0
        /// <summary>
        /// 更新申请信息
        /// </summary>
        /// <param name="expertApplyLogEntity"></param>
        /// <returns></returns>
        public ExecResult UpdateApply(ExpertApplyLogEntity expertApplyLogEntity)
        {
            HttpClientHelper clientHelper = new HttpClientHelper();
            ExecResult       execResult   = clientHelper.PostAuth <ExecResult, ExpertApplyLogEntity>(GetAPIUrl(APIConstant.EXPERTAPPLY_UPDATEAPPLY), expertApplyLogEntity);

            return(execResult);
        }
예제 #4
0
        /// <summary>
        /// 更新申请信息
        /// </summary>
        /// <param name="expertApplyEntity"></param>
        /// <returns></returns>
        public ExecResult UpdateApply(ExpertApplyLogEntity expertApplyEntity)
        {
            ExecResult result = new ExecResult();

            try
            {
                IExpertApplyService service = ServiceContainer.Instance.Container.Resolve <IExpertApplyService>();
                bool flag = service.UpdateApply(expertApplyEntity);
                if (flag)
                {
                    result.result = EnumJsonResult.success.ToString();
                    result.msg    = "成功";
                }
                else
                {
                    result.result = EnumJsonResult.failure.ToString();
                    result.msg    = "审核失败";
                }
            }
            catch (Exception ex)
            {
                result.result = EnumJsonResult.error.ToString();
                result.msg    = "审核专家申请时出现异常:" + ex.Message;
            }
            return(result);
        }
예제 #5
0
        /// <summary>
        /// 获取专家申请信息实体
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public ExpertApplyLogEntity GetExpertApplyInfo(ExpertApplyLogQuery query)
        {
            HttpClientHelper     clientHelper      = new HttpClientHelper();
            ExpertApplyLogEntity expertApplyEntity = clientHelper.PostAuth <ExpertApplyLogEntity, ExpertApplyLogQuery>(GetAPIUrl(APIConstant.EXPERTAPPLY_GETMODEL), query);

            return(expertApplyEntity);
        }
예제 #6
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="expertApplyLogEntity"></param>
 /// <returns></returns>
 public bool UpdateApply(ExpertApplyLogEntity expertApplyLogEntity)
 {
     return(ExpertApplyDataAccess.Instance.UpdateApply(expertApplyLogEntity));
 }
예제 #7
0
 /// <summary>
 /// 持久化一个新对象
 /// </summary>
 /// <param name="expertApplyLogEntity"></param>
 /// <returns></returns>
 public bool SubmitApply(ExpertApplyLogEntity expertApplyLogEntity)
 {
     return(ExpertApplyDataAccess.Instance.SubmitApply(expertApplyLogEntity));
 }
예제 #8
0
 /// <summary>
 /// 更新申请信息
 /// </summary>
 /// <param name="expertApplyLogEntity"></param>
 /// <returns></returns>
 public bool UpdateApply(ExpertApplyLogEntity expertApplyLogEntity)
 {
     return(ExpertApplyBusProvider.UpdateApply(expertApplyLogEntity));
 }
예제 #9
0
 /// <summary>
 /// 提交申请
 /// </summary>
 /// <param name="expertApplyLogEntity"></param>
 /// <returns></returns>
 public bool SubmitApply(ExpertApplyLogEntity expertApplyLogEntity)
 {
     return(ExpertApplyBusProvider.SubmitApply(expertApplyLogEntity));
 }