public async Task <JsonResult> ILSGetOwner(string id, string aid) { try { var data = ImageLinkStorageService.GetByOIDAPI(Guid.Parse(id), Guid.Parse(aid)); return(Success(ImageLinkStorageVM.MsToVMs(data))); } catch { return(Failed(MessageUtilityService.ServerError())); } }
public static QuizQuestionAnswerVM SetSubData(QuizQuestionAnswer data, Guid aid) { var model = QuizQuestionAnswerVM.MToVM(data); model.Images = ImageLinkStorageVM.MsToVMs(ImageLinkStorageService.GetByOIDAPI(data.ID, aid)); return(model); }
public static AdsInformationVM SetSubData(AdsInformation model, Guid cid, Guid aid) { var data = AdsInformationVM.MToVM(model); data.Images = ImageLinkStorageVM.MsToVMs(ImageLinkStorageService.GetByOIDCID(model.ID, aid, cid)); return(data); }
public static IS_ItemColorVM SetSubData(IS_ItemColor model) { var data = IS_ItemColorVM.MToVM(model); data.Category = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(model.CategoryID)); data.Images = ImageLinkStorageVM.MsToVMs(ImageLinkStorageService.GetByOIDAPI(model.ID, model.API)); return(data); }
public static QuizQuestionsVM SetSubData(QuizQuestions data, Guid aid, bool isSurvey) { var model = QuizQuestionsVM.MToVM(data); model.Images = ImageLinkStorageVM.MsToVMs(ImageLinkStorageService.GetByOIDAPI(data.ID, aid)); model.Status = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.Status)); model.Choices = isSurvey? QuizQuestionAnswerService.SetSurveyFormats(QuizQuestionAnswerService.GetByQQID(data.ID), aid, data.QuizInfoID) : QuizQuestionAnswerService.SetSubDatas(QuizQuestionAnswerService.GetByQQID(data.ID), aid); return(model); }
public static IS_ItemVM SetSubData(IS_Item data, Guid aid) { var model = IS_ItemVM.MToVM(data); model.DateTimeStorage = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(data.DateTimeStorageID)); model.ItemCategory = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.ItemCategoryID)); model.ItemColors = IS_ItemColorService.SetSubDatas(IS_ItemColorService.GetByOwnerID(data.ID, aid)); model.Images = ImageLinkStorageVM.MsToVMs(ImageLinkStorageService.GetByOIDAPI(data.ID, aid)); model.Condition = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.ConditionID)); return(model); }