Пример #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 UsersVM SetSubDataAdmin(Users item)
        {
            var model = UsersVM.MToVM(item);

            model.DateTimeData = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(item.DateTimeStorageID));
            model.ProfileImage = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByIDAdmin(item.ProfileImageID));
            return(model);
        }
        //setting sub data sub classes of this class properties are set here
        public static UsersVM SetSubData(Users item, Guid aid)
        {
            var model = UsersVM.MToVM(item);

            model.DateTimeData = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByOID(item.DateTimeStorageID, aid).FirstOrDefault());
            model.ProfileImage = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByIDAdmin(item.ProfileImageID));
            return(model);
        }
        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);
        }
Пример #5
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);
        }