コード例 #1
0
ファイル: SOAudit.cs プロジェクト: sanlonezhang/ql
        protected virtual void SaveAudit(SOStatus nextStatus)
        {
            if (nextStatus == CurrentSO.BaseInfo.Status)
            {
                BizExceptionHelper.Throw("SO_Audit_SOIncomeIsNull");
                return;
            }
            SOStatusChangeInfo statusChangeInfo = new SOStatusChangeInfo
            {
                SOSysNo              = SOSysNo,
                ChangeTime           = DateTime.Now,
                IsSendMailToCustomer = true,
                OldStatus            = CurrentSO.BaseInfo.Status,
                OperatorSysNo        = ECCentral.Service.Utility.ServiceContext.Current.UserSysNo,
                OperatorType         = SOOperatorType.User,
                Status = nextStatus
            };
            //更新审核状态到DB
            bool isUpdateSuccess = SODA.UpdateSOStatusForAudit(statusChangeInfo);

            if (isUpdateSuccess)
            {
                CurrentSO.BaseInfo.Status = statusChangeInfo.Status;
            }
            else
            {
                BizExceptionHelper.Throw("SO_Audit_SOStatusIsError");
            }
        }