public static List <FileAttachment> GetListByItem(Guid itemGuid) { using (IDataReader reader = DBFileAttachment.SelectByItem(itemGuid)) { return(LoadListFromReader(reader)); } }
public static List <FileAttachment> GetListByModule(Guid moduleGuid) { using (IDataReader reader = DBFileAttachment.SelectByModule(moduleGuid)) { return(LoadListFromReader(reader)); } }
/// <summary> /// Persists a new instance of FileAttachment. Returns true on success. /// </summary> /// <returns></returns> private bool Create() { this.rowGuid = Guid.NewGuid(); if (this.serverFileName.Length == 0) { this.serverFileName = rowGuid.ToString() + ".config"; } int rowsAffected = DBFileAttachment.Create( this.rowGuid, this.siteGuid, this.moduleGuid, this.itemGuid, this.specialGuid1, this.specialGuid2, this.serverFileName, this.fileName, this.contentTitle, this.contentLength, this.contentType, this.createdUtc, this.createdBy); return(rowsAffected > 0); }
/// <summary> /// Gets an instance of FileAttachment. /// </summary> /// <param name="rowGuid"> rowGuid </param> private void GetFileAttachment(Guid rowGuid) { using (IDataReader reader = DBFileAttachment.GetOne(rowGuid)) { PopulateFromReader(reader); } }
/// <summary> /// Updates this instance of FileAttachment. Returns true on success. /// </summary> /// <returns>bool</returns> private bool Update() { return(DBFileAttachment.Update( this.rowGuid, this.serverFileName, this.fileName)); }
/// <summary> /// Updates this instance of FileAttachment. Returns true on success. /// </summary> /// <returns>bool</returns> private bool Update() { return(DBFileAttachment.Update( this.rowGuid, this.serverFileName, this.fileName, this.contentTitle, this.contentLength, this.contentType)); }
public static IDataReader SelectBySpecial2(Guid specialGuid2) { return(DBFileAttachment.SelectBySpecial2(specialGuid2)); }
public static IDataReader SelectByItem(Guid itemGuid) { return(DBFileAttachment.SelectByItem(itemGuid)); }
/// <summary> /// Gets an IDataReader with row sfrom the mp_FileAttachment table. /// </summary> /// <param name="moduleGuid"> moduleGuid </param> public static IDataReader SelectByModule(Guid moduleGuid) { return(DBFileAttachment.SelectByModule(moduleGuid)); }
/// <summary> /// Deletes rows from the mp_FileAttachment table. Returns true if row deleted. /// </summary> public static bool DeleteByItem(Guid itemGuid) { return(DBFileAttachment.DeleteByItem(itemGuid)); }
/// <summary> /// Deletes rows from the mp_FileAttachment table. Returns true if row deleted. /// </summary> public static bool DeleteByModule(Guid moduleGuid) { return(DBFileAttachment.DeleteByModule(moduleGuid)); }
/// <summary> /// Deletes rows from the mp_FileAttachment table. Returns true if row deleted. /// </summary> public static bool DeleteBySite(Guid siteGuid) { return(DBFileAttachment.DeleteBySite(siteGuid)); }
/// <summary> /// Deletes an instance of FileAttachment. Returns true on success. /// </summary> /// <param name="rowGuid"> rowGuid </param> /// <returns>bool</returns> public static bool Delete(Guid rowGuid) { return(DBFileAttachment.Delete(rowGuid)); }