/// <summary> /// 更新返还信息 /// </summary> /// <param name="register"></param> /// <returns></returns> public virtual RMARegisterInfo UpdateResponseInfo(RMARegisterInfo register) { if (register == null) { throw new ArgumentNullException("register"); } CommonCheck.VerifyNotNull("SysNo", register.ResponseInfo.SysNo); RMARegisterInfo origin = LoadBySysNo(register.ResponseInfo.SysNo.Value); if (origin.BasicInfo.Status == RMARequestStatus.Complete || origin.BasicInfo.Status == RMARequestStatus.Abandon) { string msg = ResouceManager.GetMessageString("RMA.Request", "CannotEditWhenClosedOrAbandon"); throw new BizException(msg); } CommonCheck.VerifyNotNull("ResponseProductNo", register.ResponseInfo.ResponseProductNo); string userName = ExternalDomainBroker.GetUserInfo(ServiceContext.Current.UserSysNo).UserDisplayName; register.ResponseInfo.ResponseDesc = string.Format( "{0}\r\n{1} {2}", register.ResponseInfo.ResponseDesc, userName, DateTime.Now.ToString("yyyy-MM-dd") ); register.VerifyFieldsLength(); registerDA.UpdateResponseInfo(register); ExternalDomainBroker.CreateOperationLog("RMA_Register_ResponseInfo", BizLogType.RMA_Register_ResponseInfo, register.SysNo.Value, origin.CompanyCode); return(LoadForEditBySysNo(register.ResponseInfo.SysNo.Value)); }
private MessageHeader GenerateMessageHeader(string companyCode) { UserInfo userInfo = ExternalDomainBroker.GetUserInfo(ServiceContext.Current.UserSysNo); return(new MessageHeader() { Language = Thread.CurrentThread.CurrentCulture.Name, Sender = "CN.ServiceManagement.Inbound.IPP01", CompanyCode = companyCode, StoreCompanyCode = companyCode, OperationUser = new OperationUser() { FullName = userInfo.UserDisplayName, LogUserName = userInfo.UserID, SourceDirectoryKey = RMAConst.AutoRMASourceDirectoryKey, CompanyCode = companyCode } }); }