示例#1
0
        public static void DeleteImage(Images image)
        {
            string fn = GetImageFullPath(image.UserId, image.ImagePath);
              if (File.Exists(fn))
            File.Delete(fn);

              fn = GetThumbImageFullPath(image.UserId, image.ImagePath);
              if (File.Exists(fn))
            File.Delete(fn);
        }
 /// <summary>
 /// Create a new Images object.
 /// </summary>
 /// <param name="imageId">Initial value of the ImageId property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="dateAdded">Initial value of the DateAdded property.</param>
 /// <param name="isRead">Initial value of the IsRead property.</param>
 /// <param name="isEdit">Initial value of the IsEdit property.</param>
 /// <param name="isDelete">Initial value of the IsDelete property.</param>
 /// <param name="isReSeq">Initial value of the IsReSeq property.</param>
 /// <param name="isInvalid">Initial value of the IsInvalid property.</param>
 public static Images CreateImages(global::System.Int32 imageId, global::System.String userId, global::System.DateTime dateAdded, global::System.Boolean isRead, global::System.Boolean isEdit, global::System.Boolean isDelete, global::System.Boolean isReSeq, global::System.Boolean isInvalid)
 {
     Images images = new Images();
     images.ImageId = imageId;
     images.UserId = userId;
     images.DateAdded = dateAdded;
     images.IsRead = isRead;
     images.IsEdit = isEdit;
     images.IsDelete = isDelete;
     images.IsReSeq = isReSeq;
     images.IsInvalid = isInvalid;
     return images;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Images EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToImages(Images images)
 {
     base.AddObject("Images", images);
 }
示例#4
0
 public static string GetThumbImageUrl(Images image)
 {
     return Settings.UserImagesUrl + "/" + image.UserId + "/thumbs/" + image.ImagePath;
 }