Esempio n. 1
0
        private void SaveAction()
        {
            switch (this._op)
            {
            case "mgt": break;

            case "new":
                _Facade.Create(_viewModel, (s, args) =>
                {
                    if (args.FaultsHandle())
                    {
                        return;
                    }
                    //Window.Alert("新建团购成功。");
                    Window.Alert(ResGroupBuyingMaintain.Msg_NewSuccess);
                    _viewModel.SysNo  = args.Result.SysNo;
                    _viewModel.Status = GroupBuyingStatus.Init;
                    this._op          = "edt";
                    InitPage(args.Result.ToString());
                    this.Window.Close();
                });
                break;

            case "edt":
                _Facade.Update(_viewModel, (s, args) =>
                {
                    if (args.FaultsHandle())
                    {
                        return;
                    }
                    // Window.Alert("更新团购成功。");
                    Window.Alert(ResGroupBuyingMaintain.Msg_UpdateSuccess);
                    this.Window.Refresh();
                });
                break;
            }
        }