示例#1
0
 public async Task <JsonResult> ILSGet(string id, string oid, string aid)
 {
     try {
         var data = ImageLinkStorageService.GetByID(Guid.Parse(id), Guid.Parse(oid), Guid.Parse(aid));
         return(Success(ImageLinkStorageVM.MToVM(data)));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
        public static ShopManagementVM SetSubData(ShopManagement model, bool isSetItem)
        {
            var data = ShopManagementVM.MToVM(model);

            data.ProfileImage = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByID(model.ProfileImage, model.ID, model.API));
            data.Items        = isSetItem ? IS_ItemService.SetSubDatas(IS_ItemService.GetByOID(model.ID, model.API), model.API) : new List <IS_ItemVM>();
            return(data);
        }
示例#3
0
        public static LeadPagesVM SetSubdata(LeadPages model, Guid api)
        {
            var data = LeadPagesVM.MToVM(model);

            data.BackgroundImage = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByID(model.BackgroundImageID, model.ID, api));
            data.MainImage       = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByID(model.MainImageID, model.ID, api));
            data.TemplateDesign  = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(model.TemplateDesignID));
            return(data);
        }
        public static MyStoreVM SetSubData(MyStore data, Guid aid)
        {
            var model = MyStoreVM.MToVM(data);

            model.StoreCategory        = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.StoreCategoryID));
            model.StoreLogo            = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByID(data.StoreLogoID, data.ID, aid));
            model.StoreBackgroundImage = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByID(data.StoreBackgroundImageID, data.ID, aid));
            return(model);
        }