示例#1
0
文件: Model.cs 项目: lyarmark/ZSRF
        public Model()
        {
            data = new ZSRFEntities();

            data.Clients.Add(new Client());

            _clients = new ObservableCollection <Client>(data.Clients);
        }
示例#2
0
        private void ClientSelected(Client client)
        {
            SelectionTrail.Client = client;

            using (ZSRFEntities context = new ZSRFEntities())
            {
                IEnumerable <Service> services =
                    from s in context.Services
                    where s.clientID == client.clientID
                    orderby s.serviceDate descending
                    select s;

                //ClientServices = new ObservableCollection<Service>(services);
                this.OnPropertyChanged("ClientServices");
            }
        }