async void DeleteAll_Clicked(object sender, EventArgs e)
        {
            using (var context = new Services.Context())
            {
                context.RemoveRange(context.Programari);

                await context.SaveChangesAsync();

                blobCollectionView.ItemsSource = context.Programari.ToList();
            }
        }
        async void Sterge_Clicked(System.Object sender, System.EventArgs e)
        {
            if (blobCollectionView.SelectedItem != null)
            {
                using (var context = new Services.Context())
                {
                    context.Remove((Programare)blobCollectionView.SelectedItem);

                    await context.SaveChangesAsync();

                    blobCollectionView.ItemsSource = context.Programari.ToList();
                }
            }
        }
Exemple #3
0
        async void Save_Clicked(System.Object sender, System.EventArgs e)
        {
            this.cabinet.Nume   = txtNume.Text;
            this.cabinet.Adresa = txtAdresa.Text;

            using (var context = new Services.Context())
            {
                context.Update(this.cabinet);

                await context.SaveChangesAsync();
            }

            await Navigation.PopModalAsync();
        }
Exemple #4
0
        async void Save_Clicked(System.Object sender, System.EventArgs e)
        {
            this.client.Nume    = txtNume.Text;
            this.client.Prenume = txtPrenume.Text;
            this.client.Telefon = txtTelefon.Text;

            using (var context = new Services.Context())
            {
                context.Update(client);

                await context.SaveChangesAsync();
            }

            await Navigation.PopModalAsync();
        }
Exemple #5
0
        async void Save_Clicked(System.Object sender, System.EventArgs e)
        {
            this.programare.CabinetId = ((Cabinet)this.PickerCabinet.SelectedItem).CabinetId;
            this.programare.ClientId  = ((Client)this.PickerClient.SelectedItem).ClientId;
            this.programare.Data      = txtData.Text;

            using (var context = new Services.Context())
            {
                context.Update(this.programare);

                await context.SaveChangesAsync();
            }

            await Navigation.PopModalAsync();
        }
        async void Save_Clicked(System.Object sender, System.EventArgs e)
        {
            var client = new Client {
                Nume = txtNume.Text, Prenume = txtPrenume.Text, Telefon = txtTelefon.Text
            };

            using (var context = new Services.Context())
            {
                context.Add(client);

                await context.SaveChangesAsync();
            }

            await Navigation.PopModalAsync();
        }
Exemple #7
0
        async void Save_Clicked(System.Object sender, System.EventArgs e)
        {
            var cabinet = new Cabinet {
                Nume = txtNume.Text, Adresa = txtAdresa.Text
            };

            using (var context = new Services.Context())
            {
                context.Add(cabinet);

                await context.SaveChangesAsync();
            }

            await Navigation.PopModalAsync();
        }