void btnDelete_Click(object sender, RoutedEventArgs e) { string Result = ""; string strMsg = ""; if (SelectDepartment != null) { if (SelectDepartment.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString()) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("Msg_NoDeleteOrder"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } //if (!SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(SelectDepartment, "T_HR_DEPARTMENT", SMT.SaaS.FrameworkUI.OperationType.Delete, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID)) //{ // ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NODELETEPERMISSION", SelectDepartment.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME), // Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); // return; //} ComfirmWindow com = new ComfirmWindow(); com.OnSelectionBoxClosed += (obj, result) => { client.DepartmentDeleteAsync(SelectDepartment.DEPARTMENTID, strMsg); }; com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result); } else { //Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }