local nSel = ListBoxEx.GetSelectedItem("StaffList"); if nSel ~= 0 then local sItemType = ListBoxEx.GetItemToolTipText("StaffList", nSel, true); if sItemType == "Staff" then if ListBoxEx.GetItemCheck("StaffList", nSel) == true then if SelectedPlace ~= "" then-- See "On Select" Tab in ListBoxEx object and "Gobal Functions" to find "SelectedPlace" variable. local nPlaceXMLID = GetPlaceXMLID(SelectedPlace); if nPlaceXMLID == nil then Dialog.Message("Error", "Place not Found.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); else local nXMLID = GetStaffXMLID(SelectedStaff, nPlaceXMLID); -- See "On Select" Tab in ListBoxEx object and "Gobal Functions" to find "SelectedStaff" variable. if nXMLID == nil then Dialog.Message("Error", "Staff not Found.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); else --XML.RemoveElement("Root/Place:"..nPlaceXMLID.."/Staff:"..nXMLID-1); --XML.Save(sXML); --ReadXML(sXML, sObjectName); ListBoxEx.AddItem("Plugin1", nXMLID, "", "", "", 0, LBXITEM_HTML, 0, nil, nil, nil); end end end end end end |