public CommonController(SiteSettingService settingService, UserService userService, ImageStorageService imageService, ImageProcessor imageProcessor, ILogger <CommonController> logger) : base(userService) { _settingService = settingService; _imageService = imageService; _imageProcessor = imageProcessor; _logger = logger; }
public static DataTable GetImageByNum(string imageNum, Guid userId) { ImageStorageService iss = new ImageStorageService(); DataTable dt = iss.GetImageByAuthAndNum(imageNum, userId); return(dt); //DataRow dr = dt.Rows[0]; //return QJVRMS.Business.ImageStorage.ParseImageStorage(dr); }
//public static IImageStorage GetImageInfoByNum(string serialNum) //{ // ImageStorageService iss = new ImageStorageService(); // string objStr = iss.GetImageInfoByNum(serialNum); // QJVRMS.Common.SerializeObjectFactory sof = new QJVRMS.Common.SerializeObjectFactory(); // object o = sof.DesializeFromBase64(objStr); // QJVRMS.Business.ImageStorage oimage = (QJVRMS.Business.ImageStorage)o; // return oimage; //} public static IImageStorage GetImageInfoByItemId(Guid itemId, Guid userId) { ImageStorageService iss = new ImageStorageService(); // string objStr = iss.GetImageInfoByItemId(itemId); DataTable dt = iss.GetImageInfoByAuthAndId(itemId, userId); return(ImageStorage.ParseImageStorage(dt.Rows[0])); //QJVRMS.Common.SerializeObjectFactory sof = new QJVRMS.Common.SerializeObjectFactory(); //object o = sof.DesializeFromBase64(objStr); //QJVRMS.Business.ImageStorage oimage = (QJVRMS.Business.ImageStorage)o; }
/// <summary> /// 修改图片信息 /// </summary> /// <param name="img"></param> /// <returns></returns> public static bool UpdateImageStorage(IImageStorage img) { ImageStorageService iss = new ImageStorageService(); return(iss.UpdateImageStorage(img.ItemId, img.Caption, img.Address, img.Character, img.StartDate, img.EndDate, img.shotDate, img.Keyword, img.Description)); }
/// <summary> /// 修改图片信息 /// </summary> /// <param name="img"></param> /// <returns></returns> public static bool UpdateImageStorage(IImageStorage img) { ImageStorageService iss = new ImageStorageService(); return iss.UpdateImageStorage(img.ItemId, img.Caption, img.Address, img.Character, img.StartDate, img.EndDate, img.shotDate, img.Keyword, img.Description); }
private string UploadImage(Guid userId, string imageType, string filename, byte[] fileBytes, params string[] tags) { Task <string> op = ImageStorageService.StoreImageAsync(userId.ToString(), imageType.ToLower() + "_" + filename, fileBytes, tags); op.Wait(); if (!op.IsCompletedSuccessfully) { throw op.Exception; } string url = op.Result; return(url); }
private string DeleteImage(Guid userId, string imageType, string filename) { Task <string> op = ImageStorageService.DeleteImageAsync(userId.ToString(), imageType.ToLower() + "_" + filename); op.Wait(); if (!op.IsCompletedSuccessfully) { throw op.Exception; } string url = op.Result; return(url); }
/// <summary> /// 根据关键字搜索图片 /// 获取 ItemSerialNum,Hvsp 属性值 /// </summary> /// <returns></returns> public static string AddImageStorage(IImageStorage imgStorage) { ImageStorageService iss = new ImageStorageService(); return(iss.AddImageStorage(imgStorage.userId, imgStorage.FileName, imgStorage.FolderName, imgStorage.Caption, imgStorage.Address, imgStorage.Character, imgStorage.StartDate, imgStorage.EndDate, imgStorage.shotDate, imgStorage.Keyword, imgStorage.Description, imgStorage.ImageType, imgStorage.Hvsp, imgStorage.ItemId, imgStorage.ItemSerialNum, imgStorage.GroupId)); }
/// <summary> /// 根据关键字搜索图片 /// 获取 ItemSerialNum,Hvsp 属性值 /// </summary> /// <returns></returns> public static string AddImageStorage(IImageStorage imgStorage) { ImageStorageService iss = new ImageStorageService(); return iss.AddImageStorage(imgStorage.userId, imgStorage.FileName, imgStorage.FolderName, imgStorage.Caption, imgStorage.Address, imgStorage.Character, imgStorage.StartDate, imgStorage.EndDate, imgStorage.shotDate, imgStorage.Keyword, imgStorage.Description, imgStorage.ImageType, imgStorage.Hvsp, imgStorage.ItemId, imgStorage.ItemSerialNum, imgStorage.GroupId); }
private static void CreateProduct(CatalogDbContext context, string name, string description, Category category, decimal price, string image) { var service = new ImageStorageService(); var file = System.Web.HttpContext.Current.Server.MapPath(image); string imageUrl; using (var reader = System.IO.File.OpenRead(file)) { imageUrl = service.SaveImage(file, reader); } var p = new Product { Id = Guid.NewGuid().ToString(), Name = name, Description = description, Category = category, Price = price, Image = imageUrl }; context.Products.Add(p); }
public static bool AddAttach(Guid itemId, string fileName) { ImageStorageService iss = new ImageStorageService(); return(iss.AddAttach(itemId, fileName)); }
public static void Production_Hires_Down_Log(string filaName, string fileType, string downusername, string usage, string enduser, string folder, bool Errflag) { ImageStorageService iss = new ImageStorageService(); iss.Production_Hires_Down_Log(filaName, fileType, downusername, usage, enduser, folder, Errflag); }
public static bool AddAttach(Guid itemId,string fileName) { ImageStorageService iss = new ImageStorageService(); return iss.AddAttach(itemId, fileName); }
public SubmitMarkers(MarkersService markersService, ImageStorageService imageStorageService) { this.markersService = markersService; this.imageStorageService = imageStorageService; }
public CommonController(SiteSettingService settingService, UserService userService, ImageStorageService imageService) : base(userService) { _settingService = settingService; _imageService = imageService; }
public static DataTable GetAttachList(Guid itemId) { ImageStorageService iss = new ImageStorageService(); return iss.GetAttachList(itemId); }
public static DataSet GetCatalogByItemId(string itemId) { ImageStorageService iss = new ImageStorageService(); return(iss.GetImageCatalog(itemId)); }
public static DataTable GetImageByNum(string imageNum, Guid userId) { ImageStorageService iss = new ImageStorageService(); DataTable dt = iss.GetImageByAuthAndNum(imageNum, userId); return dt; //DataRow dr = dt.Rows[0]; //return QJVRMS.Business.ImageStorage.ParseImageStorage(dr); }
public void CreateRelationshipImageAndCatalog(Guid Itemid, Guid[] catalogid) { ImageStorageService iss = new ImageStorageService(); iss.AddImageToCatalog(catalogid, Itemid); }
public static bool DeleteImageStorage(Guid itemId) { ImageStorageService iss = new ImageStorageService(); return iss.DeleteImageStorage(itemId); }
/// <summary> /// 统计信息 /// </summary> /// <returns></returns> public static DataTable GetStatImages() { ImageStorageService iss = new ImageStorageService(); return iss.GetImageStatic(); }
public static DataSet GetCatalogByItemId(string itemId) { ImageStorageService iss = new ImageStorageService(); return iss.GetImageCatalog(itemId); }
public static void DeleteAttach(Guid attId) { ImageStorageService iss = new ImageStorageService(); iss.DeleteAttach(attId); }
public static DataTable GetAttachList(Guid itemId) { ImageStorageService iss = new ImageStorageService(); return(iss.GetAttachList(itemId)); }
public static DataTable GetLightBoxItems(Guid userId) { ImageStorageService iss = new ImageStorageService(); return iss.GetLightBoxList(userId); }
public void CreateRelationshipImageAndCatalog(Guid Itemid, Guid[] catalogid) { ImageStorageService iss = new ImageStorageService(); iss.AddImageToCatalog(catalogid, Itemid); }
public static void DeleteAttach(Guid attId) { ImageStorageService iss = new ImageStorageService(); iss.DeleteAttach(attId); }
public static bool DeleteImageStorage(Guid itemId) { ImageStorageService iss = new ImageStorageService(); return(iss.DeleteImageStorage(itemId)); }
public static bool DeleteItemOfLightBox(Guid userId, Guid itemId) { ImageStorageService iss = new ImageStorageService(); return iss.DelItemFromLightBox(userId, itemId); }
//public static IImageStorage GetImageInfoByNum(string serialNum) //{ // ImageStorageService iss = new ImageStorageService(); // string objStr = iss.GetImageInfoByNum(serialNum); // QJVRMS.Common.SerializeObjectFactory sof = new QJVRMS.Common.SerializeObjectFactory(); // object o = sof.DesializeFromBase64(objStr); // QJVRMS.Business.ImageStorage oimage = (QJVRMS.Business.ImageStorage)o; // return oimage; //} public static IImageStorage GetImageInfoByItemId(Guid itemId, Guid userId) { ImageStorageService iss = new ImageStorageService(); // string objStr = iss.GetImageInfoByItemId(itemId); DataTable dt = iss.GetImageInfoByAuthAndId(itemId, userId); return ImageStorage.ParseImageStorage(dt.Rows[0]); //QJVRMS.Common.SerializeObjectFactory sof = new QJVRMS.Common.SerializeObjectFactory(); //object o = sof.DesializeFromBase64(objStr); //QJVRMS.Business.ImageStorage oimage = (QJVRMS.Business.ImageStorage)o; }
public static DataTable GetLightBoxItems(Guid userId) { ImageStorageService iss = new ImageStorageService(); return(iss.GetLightBoxList(userId)); }
public static bool DeleteItemOfLightBox(Guid userId, Guid itemId) { ImageStorageService iss = new ImageStorageService(); return(iss.DelItemFromLightBox(userId, itemId)); }
/// <summary> /// 统计信息 /// </summary> /// <returns></returns> public static DataTable GetStatImages() { ImageStorageService iss = new ImageStorageService(); return(iss.GetImageStatic()); }
public ImagesController() { _imageStoreService = new ImageStorageService(); }
public static void Production_Hires_Down_Log(string filaName, string fileType, string downusername, string usage, string enduser,string folder, bool Errflag) { ImageStorageService iss = new ImageStorageService(); iss.Production_Hires_Down_Log(filaName, fileType, downusername, usage, enduser, folder, Errflag); }