public DevWPhoto(DataServiceCollection<T_RubbingPhoto> rubbingPhotos, T_RubbingPhoto currentRubbingPhoto ) { InitializeComponent(); _vmPhoto = new VMPhotos(rubbingPhotos, currentRubbingPhoto); LoadImage(); SetButtonEnable(); }
private T_RubbingPhoto UploadPhoto(string filePath) { if (!IsPhoto(filePath)) return null; var fs = new FileStream(filePath, FileMode.Open); T_Photo photo = UploadPhoto(fs, GetExtensionName(filePath)); T_RubbingPhoto rubbingPhoto = new T_RubbingPhoto(); rubbingPhoto.T_Photo = photo; rubbingPhoto.PhotoID = photo.ID; //rubbingPhoto.PageNumber = int.Parse(GetFileNameWithoutExtension(filePath)); photo.T_RubbingPhoto.Add(rubbingPhoto); return rubbingPhoto; }
public void AddToT_RubbingPhoto(T_RubbingPhoto t_RubbingPhoto) { base.AddObject("T_RubbingPhoto", t_RubbingPhoto); }
public static T_RubbingPhoto CreateT_RubbingPhoto(int ID) { T_RubbingPhoto t_RubbingPhoto = new T_RubbingPhoto(); t_RubbingPhoto.ID = ID; return t_RubbingPhoto; }
public VMPhotos(DataServiceCollection<T_RubbingPhoto> rubbingPhotos, T_RubbingPhoto currentRubbingPhoto) { _rubbingPhotos = rubbingPhotos; _currentPhotoIdx = _rubbingPhotos.IndexOf(currentRubbingPhoto); }