예제 #1
0
        private void InitData()
        {
            postIncomeFacade = new PostIncomeFacade(CurrentPage);
            otherFacade      = new OtherDomainDataFacade(CurrentPage);

            if (currentMode == MaintanMode.Create)
            {
                currentPostIncome = new PostIncomeVM();
            }
            this.BaseInfo.DataContext = currentPostIncome;
        }
예제 #2
0
        /// <summary>
        /// 创建
        /// </summary>
        public void Create(PostIncomeVM vm, Action callback)
        {
            var    data        = vm.ConvertVM <PostIncomeVM, PostIncomeInfo>();
            string relativeUrl = "/InvoiceService/PostIncome/Create";

            data.CompanyCode = CPApplication.Current.CompanyCode;
            restClient.Create <PostIncomeInfo>(relativeUrl, data, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback();
            });
        }
예제 #3
0
        /// <summary>
        /// 修改
        /// </summary>
        public void Update(PostIncomeVM vm, Action callback)
        {
            var req = new UpdatePostIncomeReq()
            {
                PostIncome       = vm.ConvertVM <PostIncomeVM, PostIncomeInfo>(),
                ConfirmedSOSysNo = vm.ConfirmedSOSysNoList
            };
            string relativeUrl = "/InvoiceService/PostIncome/Update";

            restClient.Update(relativeUrl, req, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback();
            });
        }
예제 #4
0
 public UCPostIncomeMaintain(PostIncomeVM postIncomeVM, MaintanMode maintainMode)
     : this()
 {
     this.currentMode       = maintainMode;
     this.currentPostIncome = postIncomeVM;
 }