コード例 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            building = buildings[cmbBuilding.SelectedIndex - 1];
            List <Guid> deleteMe = new List <Guid>();

            for (int i = 0; i < fileList.Items.Count; i++)
            {
                if (fileList.GetItemChecked(i))
                {
                    deleteMe.Add((fileList.Items[i] as FileDetail).Id);
                }
            }
            _ClientPortal.DeleteBuildingFiles(deleteMe);

            ListFiles();
        }
コード例 #2
0
        private void DeleteDocument(FileDetail doc)
        {
            if (_SelectedBuilding == null)
            {
                Controller.HandleError("Please select a building", "Validation Error");
                return;
            }

            if (Controller.AskQuestion("Are you sure you want to delete " + doc.File + "?"))
            {
                clientPortal.DeleteBuildingFiles(new List <Guid> {
                    doc.Id
                });

                Controller.ShowMessage("Document deleted");

                LoadSelectedBuilding(_SelectedBuilding);
            }
        }