示例#1
0
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     if (DaGr.SelectedItems.Count > 0)
     {
         string Result = "";
         DelInfosList = new ObservableCollection <string>();
         ComfirmWindow com = new ComfirmWindow();
         com.OnSelectionBoxClosed += (obj, result) =>
         {
             for (int i = 0; i < DaGr.SelectedItems.Count; i++)
             {
                 string PriorityID = "";
                 PriorityID = (DaGr.SelectedItems[i] as T_OA_PRIORITIES).PRIORITIESID;
                 if (!(DelInfosList.IndexOf(PriorityID) > -1))
                 {
                     DelInfosList.Add(PriorityID);
                 }
             }
             BumfClient.DocPriorityBatchDelAsync(DelInfosList);
         };
         com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
     }
     else
     {
         ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
     }
 }