Пример #1
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            //Window.Navigate("/ECCentral.Portal.UI.MKT/GiftCardProductMaintain", null, true);
            UCGiftCardProductMaintain ucMaintain = new UCGiftCardProductMaintain();

            ucMaintain.giftCardProductVM = new GiftCardProductVM();

            //this.Window.ShowDialog("礼品卡商品维护", ucMaintain);
            ucMaintain.Dialog = Window.ShowDialog("礼品卡商品新增", ucMaintain, (obj, args) =>
            {
                if (args != null)
                {
                    if (args.DialogResult == DialogResultType.OK)
                    {
                        giftVoucherProductdg.Bind();
                    }
                }
            });
        }
Пример #2
0
        private void hlEdit_Click(object sender, RoutedEventArgs e)
        {
            var selected = this.giftVoucherProductdg.SelectedItem as dynamic;
            //Window.Navigate(string.Format("/ECCentral.Portal.UI.MKT/GiftCardProductMaintain/{0}", selected.SysNo), null, true);
            UCGiftCardProductMaintain ucMaintain = new UCGiftCardProductMaintain();
            GiftCardProductVM         item       = ECCentral.Portal.Basic.Utilities.DynamicConverter <GiftCardProductVM> .ConvertToVM(selected);

            item.Price = decimal.Parse(item.Price).ToString("f2");
            ucMaintain.giftCardProductVM = item;

            //礼品卡商品维护
            ucMaintain.Dialog = Window.ShowDialog("礼品卡商品维护", ucMaintain, (obj, args) =>
            {
                if (args != null)
                {
                    if (args.DialogResult == DialogResultType.OK)
                    {
                        giftVoucherProductdg.Bind();
                    }
                }
            });
        }