private async void Guardar() { double entrega = 0; int FormaDePagoId = 0; int EntidadId = 0; double.TryParse(txtEntrega.Text, out entrega); if (txtPaymentMethod.SelectedValue != null) { FormaDePagoId = (int)txtPaymentMethod.SelectedValue; } if (txtEntidad.SelectedValue != null) { EntidadId = (int)txtEntidad.SelectedValue; } receipt.Entrega = entrega; receipt.FormaDePagoId = FormaDePagoId; receipt.FormaDePagoEntidadId = EntidadId; receipt.FormaDePagoData = txtEntidadData.Text; receipt.FormaDePagoCobro = txtFechaCobro.Date.DateTime; int result = await Invoicing.save(receipt); if (result > 0) { receipt.Id = result; CloureParam cloureParam = new CloureParam("finish", receipt); CloureManager.GoBack(cloureParam); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); LoadLocales(); object cloure_param = CloureManager.GetParameter(); txtCliente.Focus(FocusState.Programmatic); if (cloure_param != null) { if (cloure_param.GetType() == typeof(CartItem)) { CartItem item = (CartItem)CloureManager.GetParameter(); addProductToCarrito(item); } if (cloure_param.GetType() == typeof(CloureParam)) { CloureParam cloureParam = (CloureParam)CloureManager.GetParameter(); if (cloureParam.name == "finish") { Receipt receipt = (Receipt)cloureParam.value; ShowFinishedDialog(receipt); Clear(); } } } check_monthly_exceed(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); //Verify GoBack Method var cParameter = CloureManager.GetParameter(); if (cParameter != null) { if (cParameter.GetType() == typeof(CloureParam)) { CloureParam cloureParam = (CloureParam)cParameter; if (cloureParam.name == "place_id") { LoadPlaces((int)cloureParam.value); } if (cloureParam.name == "artist_id") { LoadBandArtists((int)cloureParam.value); } } else if (cParameter.GetType() == typeof(List <User>)) { List <User> users_tmp = (List <User>)cParameter; selectedShow.Fotografos.Clear(); foreach (User item in users_tmp) { selectedShow.Fotografos.Add(item); } } } }
private void BtnAddPhotographer_Click(object sender, RoutedEventArgs e) { selectedShow = (Show)((FrameworkElement)e.OriginalSource).DataContext; CloureParam cloureParam = new CloureParam("miembros", "1"); CloureManager.Navigate(typeof(UsersSelectionPage), cloureParam); }
protected async override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); lstPhotographers.ItemsSource = null; if (e.Parameter != null) { if (e.Parameter.GetType() == typeof(int)) { int id = (int)e.Parameter; show = await Shows.Get(id); txtFecha.Date = show.Fecha.Value; txtBandaArtista.SelectedValue = show.ArtistaId; txtLugar.SelectedValue = show.LugarId; lstPhotographers.ItemsSource = null; lstPhotographers.ItemsSource = show.Fotografos; //LoadData(id); } } else { show = new Show(); show.Id = 0; txtFecha.Date = DateTime.Now; txtBandaArtista.SelectedIndex = -1; txtLugar.SelectedIndex = -1; } //Verify GoBack Method var cParameter = CloureManager.GetParameter(); if (cParameter != null) { if (cParameter.GetType() == typeof(CloureParam)) { CloureParam cloureParam = (CloureParam)cParameter; if (cloureParam.name == "place_id") { LoadPlaces((int)cloureParam.value); } if (cloureParam.name == "artist_id") { LoadBandArtists((int)cloureParam.value); } } else if (cParameter.GetType() == typeof(ObservableCollection <User>)) { fotografos = (ObservableCollection <User>)cParameter; show.Fotografos = fotografos; lstPhotographers.ItemsSource = null; lstPhotographers.ItemsSource = fotografos; } } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.Parameter != null) { if (e.Parameter.GetType() == typeof(CloureParam)) { CloureParam cloureParam = (CloureParam)e.Parameter; if (cloureParam.name == "miembros") { string miembros = (string)cloureParam.value; LoadData("", "apellido", "asc", 1, 50, "all"); } } } }
private void BtnSelectPhotographer_Click(object sender, RoutedEventArgs e) { CloureParam cloureParam = new CloureParam("miembros", "1"); CloureManager.Navigate(typeof(UsersSelectionPage), cloureParam); }