Prizm.Main.Forms.Reports.Construction.ConstructionReportViewModel.LoadData C# (CSharp) Method

LoadData() public method

public LoadData ( ) : void
return void
        public void LoadData()
        {
            this.AllKP = new BindingList<int>();
            foreach(var kp in JointsProjections.Select<JointProjection, int>(x => x.NumberKP))
            {
                if (!AllKP.Contains(kp) && kp!=int.MinValue)
                {
                    AllKP.Add(kp);
                }
            }
        }

Usage Example

        private void ConstructionReportsXtraForm_Load(object sender, EventArgs e)
        {
            viewModel = (ConstructionReportViewModel)Program.Kernel.GetService(typeof(ConstructionReportViewModel));

            EnumWrapper <PartType> .LoadItems(type.Properties.Items, CheckState.Checked, enabled : true, skip0 : true);

            EnumWrapper <ReportType> .LoadItems(reportType.Properties.Items);

            EnumWrapper <PartType> .LoadItems(localizedAllPartType, skip0 : true);

            viewModel.LoadData();

            start.Properties.DataSource = viewModel.JointsProjections;
            end.Properties.DataSource   = viewModel.JointsProjections;

            startKPLookUp.Properties.DataSource = viewModel.AllKP;
            endKPLookUp.Properties.DataSource   = viewModel.AllKP;

            BindToViewModel();
            BindCommands();
            RefreshTypes();

            viewModel.ReportTypeIndex = reportType.SelectedIndex = 0;

            tracingModeRadioGroup_SelectedIndexChanged(tracingModeRadioGroup, e);

            viewModel.StartPK = int.MinValue;
            viewModel.EndPK   = int.MinValue;
        }
All Usage Examples Of Prizm.Main.Forms.Reports.Construction.ConstructionReportViewModel::LoadData