示例#1
0
        void GetReportTypes_Completed(object sender, OpenReadCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                return;
            }

            var sr      = new StreamReader(e.Result);
            var jsonStr = sr.ReadToEnd();
            var json    = JsonSerializer.Deserialize <List <ReportType> >(jsonStr);

            ReportTypes.Clear();
            json.ForEach(x => ReportTypes.Add(x));
        }
示例#2
0
        private async Task GetReportNames()
        {
            var response = await _reprintBusinessLogic.GetReprintReportName();

            foreach (var report in response)
            {
                ReportTypes.Add(new ReportTypesModel
                {
                    IsReportEnabled = report.IsEnabled,
                    ReportName      = report.Name.Replace("_", " "),
                    ReportType      = report.ReportType,
                    IsDateEnabled   = report.DateEnabled
                });
            }
        }