Esempio n. 1
0
 void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     templateID = new ObservableCollection <string>();
     if (DaGr.SelectedItems.Count > 0)
     {
         for (int i = 0; i < DaGr.SelectedItems.Count; i++)
         {
             templateID.Add((DaGr.SelectedItems[i] as V_ContractTemplate).contractTemplate.CONTRACTTEMPLATEID);
         }
         string        Result = "";
         ComfirmWindow com    = new ComfirmWindow();
         com.OnSelectionBoxClosed += (obj, result) =>
         {
             ContractManagement.DeleteContraTemplateAsync(templateID);
             LoadData();
         };
         com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
     }
     else
     {
         ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
     }
 }