public static AttachmentsCollection GetAllPMProjectAttach(int CompanyID, string ProjectCD) { AttachmentsCollection collection = new AttachmentsCollection(); using (var reader = SqlHelper.ExecuteReader(CommandType.StoredProcedure, "PMProjectAttach_GetAll", new SqlParameter[] { new SqlParameter("@ProjectCD", ProjectCD), new SqlParameter("@CompanyID", CompanyID), })) { while (reader.Read()) { Attachments objItem = new Attachments(); objItem.AttachID = SqlHelper.GetGuid(reader, "AttachID"); objItem.CompanyID = SqlHelper.GetInt(reader, "CompanyID"); objItem.Filetype = SqlHelper.GetString(reader, "Filetype"); objItem.Title = SqlHelper.GetString(reader, "Title"); objItem.Description = SqlHelper.GetString(reader, "Description"); objItem.Version = SqlHelper.GetString(reader, "Version"); collection.Add(objItem); } } return(collection); }
/// <summary> /// Obtiene los archivos de la lista /// </summary> public AttachmentsCollection GetParameters() { AttachmentsCollection objColFiles = new AttachmentsCollection(); // Obtiene los parámetros foreach (ListViewItem lsiItem in lswParameters.Items) objColFiles.Add(lsiItem.Text); // Devuelve la colección de archivos return objColFiles; }
/// <summary> /// Obtiene los archivos de la lista /// </summary> public AttachmentsCollection GetParameters() { AttachmentsCollection objColFiles = new AttachmentsCollection(); // Obtiene los parámetros foreach (ListViewItem lsiItem in lswParameters.Items) { objColFiles.Add(lsiItem.Text); } // Devuelve la colección de archivos return(objColFiles); }
public static AttachmentsCollection GetbyUser(string CreatedUser, int CompanyID) { AttachmentsCollection collection = new AttachmentsCollection(); Attachments obj; var sqlParams = new SqlParameter[] { new SqlParameter("@CreatedUser", CreatedUser), new SqlParameter("@CompanyID", CompanyID), }; using (var reader = SqlHelper.ExecuteReader("tbAttachment_GetAll_byUser", sqlParams)) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static AttachmentsCollection GetAllItem(int CompanyID) { AttachmentsCollection collection = new AttachmentsCollection(); var sqlParams = new SqlParameter[] { new SqlParameter("@CompanyID", CompanyID), }; using (var reader = SqlHelper.ExecuteReader("tbAttachment_GetAll", sqlParams)) { while (reader.Read()) { Attachments obj = new Attachments(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }