//OptionImage Converter public static OptionTransactionImageDO GetOptionTransactionImageDO(OptionImage optionImage) { OptionTransactionImageDO optionTransactionImageDO = new OptionTransactionImageDO() { ID = optionImage.ID, ItemImage = optionImage.Image, OptionTransactionID = optionImage.OptionTransID }; return(optionTransactionImageDO); }
public static OptionImage GetOptionImage(OptionTransactionImageDO optionTransactionImageDO) { OptionImage optionImage = new OptionImage() { ID = optionTransactionImageDO.ID, Image = optionTransactionImageDO.ItemImage, OptionTransID = optionTransactionImageDO.OptionTransactionID }; return(optionImage); }
public int DeleteOptionImage(OptionImage optionImage) { int result = 0; try{ OptionTransactionImageDO optionTransactionImageDO = Converter.GetOptionTransactionImageDO(optionImage); result = optionTransactionRepository.DeleteEntity(optionTransactionImageDO.ID); } catch (Exception ex) { Debug.WriteLine("Exception Occured in DeleteSpaceOption method due to " + ex.Message); } return result; }
public OptionImage GetOptionImage(int optionImageID) { OptionImage optionImage = new OptionImage(); try { OptionTransactionImageDO optionTransactionImageDO = optionTransactionRepository.GetEntity(optionImageID); if (optionTransactionImageDO != null) optionImage = Converter.GetOptionImage(optionTransactionImageDO); } catch (Exception ex) { Debug.WriteLine("Exception Occured in GetCheckList method due to " + ex.Message); } return optionImage; }
// Metodos #region Metodos // Abrir imagen private async void AbrirImagen(OptionImage optionImage, string title) { // Creamos el FileDialog var fileDialog = new OpenFileDialog() { Title = title, Filter = "Image (*.jpg; *.jpeg; *.bmp; *.png)|*.jpg; *.jpeg; *.bmp; *.png", InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), Multiselect = false }; // Se muestra y se valida la respuesta if (fileDialog.ShowDialog() == DialogResult.OK) { // Se obtiene la ruta y el nombre del archivo var fileName = fileDialog.FileName; switch (optionImage) { case OptionImage.OpenImage360: await Render360Image(fileName); break; case OptionImage.ImportImage360: _uriImage360 = fileName; await Display360Image(fileName); break; case OptionImage.ImportWatermark: _uriWatermarkImage = fileName; await DisplayWaterMark(fileName); break; } } }