private bool Update() { return(DBProductFile.Update( this.productGuid, this.fileName, this.fileImage, this.serverFileName, this.byteLength, this.created, this.createdBy)); }
private bool Exists() { bool result = false; using (IDataReader reader = DBProductFile.Get(productGuid)) { if (reader.Read()) { result = true; } } return(result); }
private void GetProductFile(Guid productGuid) { using (IDataReader reader = DBProductFile.Get(productGuid)) { if (reader.Read()) { this.productGuid = new Guid(reader["ProductGuid"].ToString()); this.fileName = reader["FileName"].ToString(); //this.fileImage = Byte[] this.serverFileName = reader["ServerFileName"].ToString(); this.byteLength = Convert.ToInt32(reader["ByteLength"]); this.created = Convert.ToDateTime(reader["Created"]); this.createdBy = new Guid(reader["CreatedBy"].ToString()); } } }
private bool Create() { //Guid newID = Guid.NewGuid(); //this.productGuid = newID; int rowsAffected = DBProductFile.Add( this.productGuid, this.fileName, this.fileImage, this.serverFileName, this.byteLength, this.created, this.createdBy); return(rowsAffected > 0); }
public static bool Delete(Guid productGuid) { return(DBProductFile.Delete(productGuid)); }