/// <summary> /// Delete a attachment from the list and Attachment session /// when user remove attachment from process work screen /// </summary> /// <param name="slno"></param> /// <returns></returns> public ActionResult DeletePWAttchments(long attachmentId, long genRef) { long? TimeZone = currentUser.ADM_UserPreference.TimezoneLkup != null ? currentUser.ADM_UserPreference.TimezoneLkup : (long)DefaultTimeZone.CentralStandardTime; string returnMessage = "Error occoured while deleting."; ExceptionTypes result = new ExceptionTypes(); List <DOGEN_Attachments> lstDOGEN_Attachments = new List <DOGEN_Attachments>(); DOGEN_Attachments objDOGEN_Attachments = new DOGEN_Attachments(); long loggedInUserId = 0; try { loggedInUserId = currentUser.ADM_UserMasterId; objDOGEN_Attachments.GEN_AttachmentsId = attachmentId; objDOGEN_Attachments.GEN_QueueRef = genRef; result = objBLCommon.ManagePWAttachments(TimeZone, objDOGEN_Attachments, loggedInUserId, out lstDOGEN_Attachments, out errorMessage); if (result != (long)ExceptionTypes.Success) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.OSTProcessWorkflow, (long)ExceptionTypes.Uncategorized, errorMessage, errorMessage); return(Json(new { ID = result, Message = returnMessage })); } returnMessage = "Attachment deleted successfully."; return(PartialView("_Attachment", lstDOGEN_Attachments)); } catch (Exception ex) { BLCommon.LogError(currentUser.ADM_UserMasterId, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.Attachments, (long)ExceptionTypes.Uncategorized, string.Empty, ex.ToString()); return(PartialView("")); } }