Пример #1
0
 private bool Update()
 {
     return(DBProductFile.Update(
                this.productGuid,
                this.fileName,
                this.fileImage,
                this.serverFileName,
                this.byteLength,
                this.created,
                this.createdBy));
 }
Пример #2
0
        private bool Exists()
        {
            bool result = false;

            using (IDataReader reader = DBProductFile.Get(productGuid))
            {
                if (reader.Read())
                {
                    result = true;
                }
            }

            return(result);
        }
Пример #3
0
 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());
         }
     }
 }
Пример #4
0
        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);
        }
Пример #5
0
 public static bool Delete(Guid productGuid)
 {
     return(DBProductFile.Delete(productGuid));
 }