Beispiel #1
0
        void cbRmaPolicy_RmaSelectChange(object sender, EventArgs e)
        {
            RmaPolicyVM rma = cbRmaPolicy.SelectRmaPolicy;

            if (rma != null)
            {
                VM.ChangeDate     = rma.ChangeDate;
                VM.ReturnDate     = rma.ReturnDate;
                VM.IsRequest      = rma.IsRequest;
                VM.RmaPolicySysNo = rma.SysNo;
            }
        }
Beispiel #2
0
        /// <summary>
        ///更新
        /// </summary>
        /// <param name="vm"></param>
        /// <param name="callback"></param>
        public void UpdateRmaPolicy(RmaPolicyVM vm, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            RmaPolicyInfo info = vm.ConvertVM <RmaPolicyVM, RmaPolicyInfo>();

            info.Status          = RmaPolicyStatus.Active;
            info.IsOnlineRequest = vm.IsRequest ? IsOnlineRequst.YES : IsOnlineRequst.NO;
            info.CompanyCode     = CPApplication.Current.CompanyCode;
            info.LanguageCode    = CPApplication.Current.LanguageCode;
            info.User            = new BizEntity.Common.UserInfo()
            {
                SysNo           = CPApplication.Current.LoginUser.UserSysNo,
                UserDisplayName = CPApplication.Current.LoginUser.DisplayName
            };
            string relativeUrl = "/IMService/RmaPolicy/UpdateRmaPolicy";

            restClient.Update(relativeUrl, info, callback);
        }
 private void BindPage()
 {
     if (Action == RmaAction.Create)
     {
         VM = new RmaPolicyVM();
         this.DataContext = VM;
     }
     if (Action == RmaAction.Edit || Action == RmaAction.Details)
     {
         facade.QueryRmaPolicyBySysNo(Sysno, (obj, arg) =>
         {
             if (arg.FaultsHandle())
             {
                 return;
             }
             if (arg.Result == null)
             {
                 CPApplication.Current.CurrentPage.Context.Window.MessageBox.Show("该退换货信息不存在!", MessageBoxType.Error);
                 return;
             }
             VM = new RmaPolicyVM()
             {
                 ChangeDate        = arg.Result.ChangeDate.ToString(),
                 ECDisplayDesc     = arg.Result.ECDisplayDesc,
                 ECDisplayMoreDesc = arg.Result.ECDisplayMoreDesc,
                 ECDisplayName     = arg.Result.ECDisplayName,
                 Priority          = arg.Result.Priority.ToString(),
                 ReturnDate        = arg.Result.ReturnDate.ToString(),
                 RMAPolicyName     = arg.Result.RMAPolicyName,
                 RmaType           = arg.Result.RmaType,
                 IsRequest         = arg.Result.IsOnlineRequest == IsOnlineRequst.YES?true:false
             };
             this.DataContext = VM;
         });
         if (Action == RmaAction.Details)
         {
             this.IsEnabled      = false;
             spAction.Visibility = Visibility.Collapsed;
         }
     }
 }