protected void DeleteSQL_Click(object sender, EventArgs e) { SQL_Request req = new SQL_Request().OpenConnection(); try { //request all assets req.GetAllAssets(false); if (req.Tag != null) { var cloud = req.Tag as List <Asset>; foreach (var asset in cloud) { try { req.DeleteAsset(asset.AssetNumber, false); } catch { //PopNotify("Error", "Error Deleting SQL Library"); } } req.CloseConnection(); Global.Library.Assets = new List <Asset>(); } } catch { //PopNotify("Error", "Error Deleting SQL Library"); } finally { req.CloseConnection(); //PopNotify("Complete", "SQL Library Deleted"); } }