private async Task GetLabelObjectsAsync() { Filter.MaxResultCount = PageSize; Filter.SkipCount = (CurrentPage - 1) * PageSize; Filter.Sorting = CurrentSorting; LabelList = await LabelObjectServices.GetList(); foreach (var item in LabelList) { if (item.TextCssClass == TextCssClass.label_text1) { CuloareText = "Text negru"; } else { CuloareText = "Text rosu inchis"; } } foreach (var item in LabelList) { switch (item.BackgroundCssClass) { case BackgroundCssClass.label1_background: CuloareBackground = "Albastru deschis"; break; case BackgroundCssClass.label2_background: CuloareBackground = "Roz deschis"; break; case BackgroundCssClass.label3_background: CuloareBackground = "Rosu"; break; case BackgroundCssClass.label4_background: CuloareBackground = "Verde galbui"; break; case BackgroundCssClass.label5_background: CuloareBackground = "Maro"; break; case BackgroundCssClass.label6_background: CuloareBackground = "Visiniu"; break; case BackgroundCssClass.label7_background: CuloareBackground = "Gri deschis"; break; case BackgroundCssClass.label8_background: CuloareBackground = "Auriu"; break; case BackgroundCssClass.label9_background: CuloareBackground = "Violet deschis"; break; case BackgroundCssClass.label10_background: CuloareBackground = "Caramiziu"; break; } } TotalCount = LabelList.Count; }
protected override async Task OnInitializedAsync() { LabelList = await LabelObjectServices.GetList(); }