/// <summary> /// Returns a DataSet containing the Forwarding History of the particular File /// </summary> /// <param name="FileId">Id of the file for which the history will be returned</param> /// <returns>DataSet containing all the Forwarding details of this File till now</returns> public static FileForwardTable GetFileForwardingHistory(Guid FileId) { FileForwardTable dtFileForward = new FileForwardTable(); try { dtFileForward = IgrssAdapters.FileForwardingAdapter.GetFileForwardDetails(FileId); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } } return(dtFileForward); }
public static bool ReturnFile(Guid FileId) { string curUser = Thread.CurrentPrincipal.Identity.Name; string message = "File has been returned to you"; int fileForwardLevel = Convert.ToInt32(IgrssAdapters.FileForwardingAdapter.GetFileForwardLevel(FileId)); try { FileForwardTable ForwardDetail = IgrssAdapters.FileForwardingAdapter.GetFileForwardDetailsByLevel(FileId, fileForwardLevel); if (ForwardDetail.Rows.Count > 0) { FileForwardsRow row = ForwardDetail[0]; IgrssAlert Alert = WorkflowSupport.GetAlertById(row.FordwardedAlertId); if (fileForwardLevel > 1) { Guid GroupId = Guid.NewGuid(); WorkflowSupport.SendAlert(curUser, Alert.SentBy, Alert.Link, message, Alert.SessionData, GroupId); } else if (fileForwardLevel == 1) { WorkflowSupport.EnableAlert(Alert.AlertId); } WorkflowSupport.DeleteAlert(Alert.AlertId); IgrssAdapters.FileForwardingAdapter.SetFileReturned(FileId, fileForwardLevel); } return(true); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } } return(false); }
/// <summary> /// Returns a DataSet containing the Forwarding History of the particular File /// </summary> /// <param name="FileId">Id of the file for which the history will be returned</param> /// <returns>DataSet containing all the Forwarding details of this File till now</returns> public static FileForwardTable GetFileForwardingHistory(Guid FileId) { FileForwardTable dtFileForward = new FileForwardTable(); try { dtFileForward = IgrssAdapters.FileForwardingAdapter.GetFileForwardDetails(FileId); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) throw; } return dtFileForward; }