Пример #1
0
        void mc_srv_select_RDCompleted(object sender, srv_select_RDCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                if (e.Result.Count > 0)
                {
                    PagedCollectionView c1 = new PagedCollectionView(e.Result);

                    //c1.GroupDescriptions.Add(new PropertyGroupDescription(""));

                    listRD = new List <RD_ex>();
                    string name = e.Result[0].Contractor_Name;
                    RD_ex  R    = new RD_ex(name);
                    foreach (cRD item in c1)
                    {
                        if (name != item.Contractor_Name)
                        {
                            listRD.Add(R);
                            name = item.Contractor_Name;
                            R    = new RD_ex(name);
                        }
                        R.addItem(item.MassType, item.Sort_Name, item.Val.ToString());
                    }

                    dgCol = new PagedCollectionView(GenerateDataB().ToDataSource());

                    dg_B.ItemsSource = dgCol;
                    //dg_F.ItemsSource = GenerateDataF().ToDataSource();
                }
            }
        }
Пример #2
0
        void mc_srv_select_RDCompleted(object sender, srv_select_RDCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                if (e.Result.Count > 0)
                {
                    PagedCollectionView c1 = new PagedCollectionView(e.Result);

                    //c1.GroupDescriptions.Add(new PropertyGroupDescription(""));

                    listRD = new List<RD_ex>();
                    string name = e.Result[0].Contractor_Name;
                    RD_ex R = new RD_ex(name);
                    foreach (cRD item in c1)
                    {
                        if (name != item.Contractor_Name)
                        {
                            listRD.Add(R);
                            name = item.Contractor_Name;
                            R = new RD_ex(name);
                        }
                        R.addItem(item.MassType, item.Sort_Name, item.Val.ToString());
                    }

                    dgCol = new PagedCollectionView(GenerateDataB().ToDataSource());

                    dg_B.ItemsSource = dgCol;
                    //dg_F.ItemsSource = GenerateDataF().ToDataSource();
                }
            }

        }