Esempio n. 1
0
 public static BllImage CreateBllImage(int Id, HttpPostedFileBase LoadImage)
 {
         BllImage bllimage = new BllImage();
         bllimage.MimeType = LoadImage.ContentType;
         bllimage.Image = new byte[LoadImage.ContentLength];
         bllimage.LotId = Id;
         LoadImage.InputStream.Read(bllimage.Image, 0, LoadImage.ContentLength);
         LoadImage.InputStream.Close();
         return bllimage;
 }
Esempio n. 2
0
 public void CreateImage(BllImage bllimage)
 {
    imageRepository.Create(Maper.ToDalImage(bllimage));
    uow.Commit();
 }
Esempio n. 3
0
 internal static ImageModel ToImageModel(BllImage bllImage)
 {
     if (bllImage != null) return new ImageModel()
     {
         Id = bllImage.Id,
         Image = bllImage.Image,
         MimeType = bllImage.MimeType,
         LotId = bllImage.LotId
     };
     return null;
 }
Esempio n. 4
0
 internal static DalImage ToDalImage(BllImage bllimage)
 {
     if (bllimage != null) return new DalImage()
     {
         Id = bllimage.Id,
         Image = bllimage.Image,
         MimeType = bllimage.MimeType,
         LotId = bllimage.LotId
     };
     return null;
 }