private void cmdAdd_Click(object sender, RoutedEventArgs e) { if (!CHelper.VerifyAccessRight("GENERAL_CYCLE_ADD")) { return; } WinAddEditCycle w = new WinAddEditCycle("A", null, itemSources); w.Title = (String)(sender as Button).Content + " " + CLanguage.getValue("cycle"); w.ShowDialog(); }
private void showEditWindow() { if (!CHelper.VerifyAccessRight("GENERAL_CYCLE_VIEW")) { return; } MCycle v = (MCycle)currentObj; WinAddEditCycle w = new WinAddEditCycle("E", v, null); w.Title = CLanguage.getValue("edit") + " " + CLanguage.getValue("cycle"); w.ShowDialog(); }
private void mnuCycleAdd_Click(object sender, RoutedEventArgs e) { if (!CHelper.VerifyAccessRight("GENERAL_CYCLE_ADD")) { return; } ObservableCollection <MBaseModel> arr = new ObservableCollection <MBaseModel>(); WinAddEditCycle w = new WinAddEditCycle("A", null, arr); w.Title = (String)(sender as MenuItem).Header + " " + CLanguage.getValue("cycle"); w.ShowDialog(); if (w.DialogOK.Equals(true)) { CMasterReference.LoadCycle(true, new ArrayList()); } }