using SSWMS.Common; using System; using System.Deployment.Application; using System.Windows; using System.Windows.Controls; namespace SSWMS.Client { public partial class WAREHOUSE_AREA_MANAGE : AvalonDock.DocumentContent { public WAREHOUSE_AREA_MANAGE() { InitializeComponent(); } private void ButtonBase_Click(object sender, RoutedEventArgs e) { if (ApplicationDeployment.IsNetworkDeployed) { MessageDialog.ShowException("权限错误"); return; } Button b = e.OriginalSource as Button; if (b != null) { if (MessageDialog.ShowDialog(string.Format("确认执行{0}操作", b.Content.ToString()))) { bool bResult = true; String sResult = String.Empty; try { switch (b.Name) { case "bInitCell": bResult = WCFChannel._I_CellService.InitCell(out sResult); break; } MessageDialog.ShowResult(bResult, sResult); } catch (Exception ex) { MessageDialog.ShowException(ex); } } } } } }