public ActionResult DeleteBlob(string ProjectId) { try { Guid BlobName = new Guid(ProjectId); bool IsDeleted = _metadataBlobCRUD.DeleteBlob(BlobName.ToString("N")); if (!IsDeleted) { return(Json("UnSuccess")); } } catch { return(Json("error")); } return(Json("Success")); }
private void deleteBlob_Click(object sender, EventArgs e) { if (lstBlob.Items.Count > 0) { Guid SelectedBlobName = new Guid(lstBlob.SelectedItem.ToString().Split('|')[2].Trim() != string.Empty ? lstBlob.SelectedItem.ToString().Split('|')[2].Trim().Split(':')[1].Trim() : string.Empty); bool IsDeleted = false; switch (comboEnvironment.SelectedItem.ToString()) { case "CDCDev": MessageBox.Show("You have Selected CDC Dev"); break; case "CDCQA": IsDeleted = _metadataBlobCRUD.DeleteBlob(SelectedBlobName.ToString("N")); GetBlobList(); lstBlob.Refresh(); if (IsDeleted == true) { MessageBox.Show("Blob Sucessfully Deleted"); } else { MessageBox.Show("Blob failed to Delete"); } break; case "Ananth": MessageBox.Show("You have Select Ananth"); break; case "Garry": MessageBox.Show("You have Select Garry"); break; } } else { MessageBox.Show("Blob is not available to Delete"); } }