private void hyperlinkStop_Click(object sender, RoutedEventArgs e)
        {
            CPApplication.Current.CurrentPage.Context.Window.Confirm(ECCentral.Portal.UI.IM.Resources.ResProductChannelPeriodPriceInfo.Dialog_Stop, (obj, args) =>
            {
                if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK)
                {
                    dynamic item = this.dgProductChannelPeriodPriceQueryResult.SelectedItem as dynamic;
                    if (item == null)
                    {
                        return;
                    }

                    var vm = new ProductChannelPeriodPriceVM();

                    vm.Operate = ProductChannelPeriodPriceOperate.Stop;
                    vm.SysNo   = Convert.ToInt32(item.SysNo);

                    _facade.UpdateProductChannelPeriodPrice(vm, (obju, argsu) =>
                    {
                        if (argsu.FaultsHandle())
                        {
                            return;
                        }

                        CPApplication.Current.CurrentPage.Context.Window.Alert(ResBrandMaintain.Info_SaveSuccessfully);

                        dgProductChannelPeriodPriceQueryResult.Bind();
                    });
                }
            });
        }
        private void OperateData(ProductChannelPeriodPriceOperate operate)
        {
            var vm = DataContext as ProductChannelPeriodPriceVM;

            if (vm == null)
            {
                return;
            }

            if (!ValidationManager.Validate(this))
            {
                return;
            }
            _facade    = new ProductChannelInfoFacade();
            vm.SysNo   = _sysNo;
            vm.Operate = operate;

            if (!(vm.BeginDate.HasValue && vm.EndDate.HasValue))
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert("改价时间不能为空.");
                return;
            }

            if (vm.Operate == ProductChannelPeriodPriceOperate.Submit && vm.Note.Equals(string.Empty))
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert("活动说明不能为空.");
                return;
            }

            if (_sysNo == 0)
            {
                _facade.CreateProductChannelPeriodPrice(vm, (obj, args) =>
                {
                    if (args.FaultsHandle())
                    {
                        return;
                    }
                    CPApplication.Current.CurrentPage.Context.Window.Alert(ResBrandMaintain.Info_SaveSuccessfully);

                    CloseDialog(DialogResultType.OK);
                });
            }
            else
            {
                _facade.UpdateProductChannelPeriodPrice(vm, (obj, args) =>
                {
                    if (args.FaultsHandle())
                    {
                        return;
                    }
                    CPApplication.Current.CurrentPage.Context.Window.Alert(ResBrandMaintain.Info_SaveSuccessfully);

                    CloseDialog(DialogResultType.OK);
                });
            }
        }