/// <summary> /// Saves the attachments. /// </summary> /// <param name="fileId">The file id.</param> /// <param name="extension">The extension.</param> /// <param name="formId">The form id.</param> /// <param name="keyId">The key id.</param> /// <param name="fileTypeId">The file type id.</param> /// <param name="source">The source.</param> /// <param name="primary">The primary.</param> /// <param name="description">The description.</param> /// <param name="eventDate">The event date.</param> /// <param name="userId">The user id.</param> /// <param name="publicValue">The public value.</param> /// <param name="isroll">The isroll.</param> /// <param name="linktype">The linktype.</param> /// <param name="aurl">The aurl.</param> /// <param name="pfileid">The pfileid.</param> /// <param name="sourceConfig">Source Config from tts_cfg</param> /// <returns>File Path data</returns> public static AttachmentsData SaveAttachments(int?fileId, string extension, int formId, int keyId, int fileTypeId, string source, int primary, string description, string eventDate, int userId, int publicValue, int isroll, int linktype, string aurl, int pfileid, string sourceConfig) { AttachmentsData attachmentsData = new AttachmentsData(); Hashtable ht = new Hashtable(); if (fileId != null) { ht.Add("@FileID", fileId); } else { ht.Add("@FileID", DBNull.Value); } ht.Add("@Extension", extension); ht.Add("@Form", formId); ht.Add("@KeyID", keyId); ht.Add("@FileTypeID", fileTypeId); ht.Add("@Source", source); ht.Add("@Primary", primary); ht.Add("@Description", description); ht.Add("@EventDate", eventDate); ht.Add("@UserID", userId); ht.Add("@IsPublic", publicValue); ht.Add("@IsRoll", isroll); ht.Add("@LinkType", linktype); ht.Add("@AURL", aurl); ht.Add("@PFileID", pfileid); ht.Add("@SourceConfig", sourceConfig); Utility.LoadDataSet(attachmentsData.SaveFilePath, "f9005_pcins_Attachment", ht); return(attachmentsData); }
/// <summary> /// Get the attachment function name. /// </summary> /// <param name="formId"> The form id of the form being used.</param> /// <returns> The typed dataset containing the attachment function name.</returns> public static AttachmentsData GetAttachementFunctionName(int formId) { AttachmentsData attachmentsData = new AttachmentsData(); Hashtable ht = new Hashtable(); ht.Add("@Form", formId); Utility.LoadDataSet(attachmentsData.GetAttachementFunctionName, "f9005_pcget_AttachmentFunctionName", ht); return(attachmentsData); ////return DataProxy.FetchDataSet("f9005_pcget_AttachmentFunctionName", ht); }
/// <summary> /// GetProgramId /// </summary> /// <param name="fileTypeId">The integer name of the file type.</param> /// <returns> /// The typed dataset containing the attachment file type. /// </returns> public static AttachmentsData GetProgramId(int fileTypeId) { AttachmentsData attachmentsData = new AttachmentsData(); Hashtable ht = new Hashtable(); ht.Add("@FileTypeID", fileTypeId); Utility.LoadDataSet(attachmentsData.GetProgramId, "f9005_pcget_AttachmentFileType", ht); return(attachmentsData); ////return DataProxy.FetchDataSet("f9005_pcget_AttachmentFileType", ht); }
/// <summary> /// Gets the attachment items. /// </summary> /// <param name="formId">The form id.</param> /// <param name="keyId">The key id.</param> /// <param name="userId">The user id.</param> /// <returns>The typed dataset containing the attachment items.</returns> public static AttachmentsData GetAttachmentItems(int formId, int keyId, int userId) { AttachmentsData attachmentsData = new AttachmentsData(); Hashtable ht = new Hashtable(); ht.Add("@Form", formId); ht.Add("@KeyID", keyId); //// ht.Add("@UserID", userId); Utility.LoadDataSet(attachmentsData.GetAttachmentItems, "f9005_pclst_Attachment", ht); return(attachmentsData); ////return DataProxy.FetchDataSet("f9005_pcget_Attachment", ht); }
/// <summary> /// Gets the files path /// </summary> /// <param name="source"> The source path of the file.</param> /// <param name="formId"> The form id of the form being used.</param> /// <param name="keyId"> Reciept or statement information in xml format.</param> /// <param name="extension"> The file extension.</param> /// <param name="userId">userId</param> /// <returns> The typed dataset containing the path of the file.</returns> public static AttachmentsData GetFilePath(string source, int formId, int keyId, string extension, int userId) { AttachmentsData attachmentsData = new AttachmentsData(); Hashtable ht = new Hashtable(); ht.Add("@Source", source); ht.Add("@Form", formId); ht.Add("@KeyID", keyId); ht.Add("@Extension", extension); ht.Add("@UserID", userId); Utility.LoadDataSet(attachmentsData.GetFilePath, "f9005_pcget_AttachmentFilePath", ht); return(attachmentsData); }