示例#1
0
 public async void Remove(Guid ID)
 {
     await Task.Factory.StartNew(() => {
         Flat.CadCustomer.Remove(Flat.CadCustomer.Find(X => X.Id == ID));
         Flat.SetCadastro <Customer>(Flat.CadCustomer, Flat.ArqCustomer);
     });
 }
示例#2
0
        public async void Add(Domain.Models.Customer customer)
        {
            if (customer.Id == null)
            {
                customer.AddID(Guid.NewGuid());
            }

            Flat.CadCustomer.Add(customer);
            await Task.Factory.StartNew(() => { Flat.SetCadastro <Customer>(Flat.CadCustomer, Flat.ArqCustomer); });
        }
示例#3
0
        public async void Update(Customer customer)
        {
            await Task.Factory.StartNew(() => {
                var Cad = Flat.CadCustomer.Find(X => X.Id == customer.Id);

                if (Cad != null)
                {
                    Flat.CadCustomer[Flat.CadCustomer.IndexOf(Cad)] = customer;
                }
                var Prod = Flat.CadCustomer.Find(X => X.Id == customer.Id);

                Flat.SetCadastro <Customer>(Flat.CadCustomer, Flat.ArqCustomer);
            });
        }