/// <summary> /// 删除地区分类 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnDelete_Click(object sender, RoutedEventArgs e) { string Result = ""; if (DtGridArea.SelectedItems.Count > 0) { ObservableCollection <string> ids = new ObservableCollection <string>(); foreach (T_HR_AREADIFFERENCE tmp in DtGridArea.SelectedItems) { ids.Add(tmp.AREADIFFERENCEID); } ComfirmWindow com = new ComfirmWindow(); com.OnSelectionBoxClosed += (obj, result) => { client.AreaCategoryDeleteAsync(ids); }; com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result); } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE")); } }