private void cmdAdd_Click(object sender, RoutedEventArgs e) { if (!CHelper.VerifyAccessRight("HR_EMPLOYEE_ADD")) { return; } WinAddEditEmployeeInfo w = new WinAddEditEmployeeInfo(); String caption = CLanguage.getValue("employee"); w.Caption = (String)(sender as Button).Content + " " + caption; w.Mode = "A"; w.ParentItemSource = itemSources; w.ShowDialog(); }
private void showEditWindow() { if (!CHelper.VerifyAccessRight("HR_EMPLOYEE_VIEW")) { return; } WinAddEditEmployeeInfo c = new WinAddEditEmployeeInfo(); c.ViewData = currentObj; String caption = CLanguage.getValue("employee"); c.Caption = CLanguage.getValue("edit") + " " + caption; c.Mode = "E"; c.ParentItemSource = itemSources; c.ShowDialog(); }