Example #1
0
 public async Task <JsonResult> GetByID(string id)
 {
     try{
         var data = StatusTypeReferenceService.GetByID(Guid.Parse(id));
         return(Success(StatusTypesReferencesVM.MToVM(data)));
     }catch { return(Failed(MessageUtility.ServerError())); }
 }
        public static StatusTypesReferencesVM SetSubData(StatusTypesReferences model, Guid cid)
        {
            var data = StatusTypesReferencesVM.MToVM(model);

            data.SubStatus = StatusTypesReferencesService.SetSubDatas(StatusTypesReferencesService.GetByOIDAIDCID(model.ID, model.API, cid), cid);
            return(data);
        }
        public static DescriptionStorageVM SetSubData(DescriptionStorage model)
        {
            var data = DescriptionStorageVM.MToVM(model);

            data.Category = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(model.CategoryID));
            return(data);
        }
        public static IS_ItemStockVM SetSubData(IS_ItemStock data, Guid aid)
        {
            var model = IS_ItemStockVM.MToVM(data);

            model.DateTimeStorage = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(data.DateTimeStorageID));
            model.StockStatus     = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.StockStatusID));
            return(model);
        }
Example #5
0
        public static UserAccessLevelVM SetSubData(UserAccessLevel item, Guid aid)
        {
            var model = UserAccessLevelVM.MToVM(item);

            model.AccessLevel  = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(item.AccessLevelID));
            model.DateTimeData = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(item.DateTimeStorageID));
            return(model);
        }
Example #6
0
        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 GroupingsDataVM SetSubData(GroupingsData data, Guid aid)
        {
            var model = GroupingsDataVM.MToVM(data);

            model.DateTimeData   = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(data.DateTimeStorageID));
            model.CategoryStatus = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByOIDAID(data.CategoryID, aid).FirstOrDefault());
            return(model);
        }
Example #8
0
        public static ReportClaimsVM SetSubData(ReportClaims data, Guid aid)
        {
            var model = ReportClaimsVM.MToVM(data);

            model.DateTime   = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(data.DateTimeStorageID));
            model.ReportType = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.ReportTypeID));
            return(model);
        }
        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);
        }
Example #10
0
        public static QuizInfoVM SetSubData(QuizInfo data, Guid aid)
        {
            var model = QuizInfoVM.MToVM(data);

            model.QuizStatus      = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.QuizStatus));
            model.Status          = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.Status));
            model.DateTimeStorage = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(data.DateTimeStorageID));
            return(model);
        }
Example #11
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);
        }
Example #12
0
 public async Task <JsonResult> STGetByID()
 {
     try {
         var id   = Guid.Parse(Request.Form["id"]);
         var aid  = Guid.Parse(Request.Form["aid"]);
         var data = StatusTypesReferencesService.GetByIDAID(id, aid);
         return(Success(StatusTypesReferencesVM.MToVM(data)));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
        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);
        }
Example #14
0
        public static UserAccessLevelVM SetSubDataAdmin(UserAccessLevel model)
        {
            var data = UserAccessLevelVM.MToVM(model);

            data.AccessLevel  = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(model.AccessLevelID));
            data.DateTimeData = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(model.DateTimeStorageID));
            data.Application  = ApplicationInformationVM.MToVM(ApplicationInformationService.GetByID(model.ApplicationID));
            return(data);
        }
        public static StatusTypesReferencesVM SetSubDataAdmin(StatusTypesReferences model)
        {
            var data = StatusTypesReferencesVM.MToVM(model);

            data.CategoryID = model.CategoryID.ToString();
            data.OwnerID    = model.OwnerID.ToString();
            data.API        = model.API.ToString();
            data.Category   = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(model.CategoryID));
            return(data);
        }
Example #16
0
        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);
        }