/// <summary> /// 编辑硬广 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void editmenu_Click(object sender, RoutedEventArgs e) { MediaEdit.AddHardWindow ahw = new AddHardWindow(); ahw.vm_HardAdEditWindow.HardAdModel = HardAdLbox.Items[HardAdLbox.SelectedIndex] as AMS.Model.AMS_HardAd; ahw.vm_HardAdEditWindow.IsEdit = true; ahw.vm_HardAdEditWindow.ToListXML(); ahw.ShowDialog(); DataBinging(); }
/// <summary> /// 添加硬广 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_Click(object sender, RoutedEventArgs e) { try { AddHardWindow ah = new AddHardWindow(); ah.vm_HardAdEditWindow.IsEdit = false; ah.ShowDialog(); DataBinging(); } catch (Exception ex) { vm_AdHardList.ErrorMessage = ex.Message; } }