Beispiel #1
0
        void Instance_LoadOtherWorkListComplete(object sender, EventArgs e)
        {
            var model = WorksTree.First(p => p.id == -2);

            foreach (var item in model.Items)
            {
                item.Items.Clear();
                var temp = _storage.OtherWorkList.Where(p => p.id_Class == item.id).ToList();
                foreach (var w in temp)
                {
                    item.Items.Add(new WorkTreeModel
                    {
                        Cost     = w.Cost,
                        id       = w.id,
                        id_Class = w.id_Class,
                        idWork   = w.idWork,
                        Name     = w.Name,
                        NH       = w.NH,
                        NHD      = w.NHD,
                        WGUID    = w.WGUID
                    });
                }
            }
        }
Beispiel #2
0
        void Instance_LoadWorkListComplete(object sender, EventArgs e)
        {
            WorkTreeModel model = WorksTree.Where(p => p.id == -1).First();

            foreach (var item in model.Items)
            {
                item.Items.Clear();
                List <WorksInfoDataModel> temp = SpecificationDataStorage.Instance.WorkList.Where(p => p.id_Class == item.id).ToList();
                foreach (var w in temp)
                {
                    item.Items.Add(new WorkTreeModel
                    {
                        Cost     = w.Cost,
                        id       = w.id,
                        id_Class = w.id_Class,
                        idWork   = w.idWork,
                        Name     = w.Name,
                        NH       = w.NH,
                        NHD      = w.NHD,
                        WGUID    = w.WGUID
                    });
                }
            }
        }