Пример #1
0
        private void hlAdvertisingEdit_Click(object sender, RoutedEventArgs e)
        {
            dynamic       d  = this.dgAdvertisingQueryResult.SelectedItem as dynamic;
            AdvertisingVM vm = new AdvertisingVM()
            {
                Type   = d.Type,
                Status = d.Status,
                ProductLineCategorySysNo = d.ProductLineCategorySysNo,
                ProductLineSysNo         = d.ProductLineSysNo,
                SharedText  = d.SharedText,
                Text        = d.Text,
                EventCode   = d.EventCode,
                AdCode      = d.AdCode,
                Url         = d.Url,
                ImageUrl    = d.ImageUrl,
                ImageHeight = d.ImageHeight,
                ImageWidth  = d.ImageWidth,
                SysNo       = d.SysNo
            };
            AdvertisingMaintain item = new AdvertisingMaintain();

            item.IsEdit = true;
            item.Data   = vm;
            item.Dialog = Window.ShowDialog("编辑", item, (s, args) =>
            {
                if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK)
                {
                    this.dgAdvertisingQueryResult.Bind();
                }
            }, new Size(500, 600));
        }
Пример #2
0
        private void btnAdvertisingNew_Click(object sender, RoutedEventArgs e)
        {
            AdvertisingMaintain item = new AdvertisingMaintain();

            item.IsEdit = false;
            item.Dialog = Window.ShowDialog("添加", item, (s, args) =>
            {
                if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK)
                {
                    this.dgAdvertisingQueryResult.Bind();
                }
            }, new Size(500, 600));
        }