private void dataGridCuerpo_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { try { DataRowView row = (DataRowView)dataGridCuerpo.SelectedItems[0]; pie_Codigo.Text = row["cod_ref"].ToString().Trim(); decimal val_ref = Convert.ToDecimal(row["val_ref"]); pie_PrecLi.Text = val_ref.ToString("C"); decimal val_iva = Convert.ToDecimal(row["val_iva"]); pie_iva.Text = val_iva.ToString("C"); decimal total = Convert.ToDecimal(row["tot_tot"].ToString().Trim()); decimal cantidad = Convert.ToDecimal(row["cantidad"].ToString().Trim()); decimal valConIva = total / cantidad; pie_valconiva.Text = valConIva.ToString("C"); decimal val_des = Convert.ToDecimal(row["val_des"].ToString().Trim()); pie_decu.Text = val_des.ToString("C"); decimal subtotal = Convert.ToDecimal(row["subtotal"].ToString().Trim()); pie_Subt.Text = subtotal.ToString("C"); pie_total.Text = total.ToString("C"); } catch (Exception w) { vaciarCamposPie(); } }
private void dataGridSuc_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { try { if (banderaSelection == true) { controlesBlock(1); DataRowView row = (DataRowView)dataGridSuc.SelectedItems[0]; string codigo_sucur = row["cod_suc"].ToString(); TB_codSuc.Text = row["cod_suc"].ToString().Trim(); TB_NomSuc.Text = row["nom_suc"].ToString().Trim(); TB_DirSuc.Text = row["dir"].ToString().Trim(); TB_DirCorSuc.Text = row["dir_corres"].ToString().Trim(); TB_TelSuc.Text = row["tel"].ToString().Trim(); TB_CiuSuc.Text = row["nom_ciu"].ToString().Trim(); TB_CodCiuSuc.Text = row["cod_ciu"].ToString().Trim(); TB_EstSuc.SelectedIndex = Convert.ToInt32(row["estado"]); TB_CodigoZonaSuc.Text = row["cod_zona"].ToString().Trim(); TB_ZonaSuc.Text = row["Nom_zona"].ToString().Trim(); } banderaSelection = true; } catch (Exception w) { MessageBox.Show("errro en la selecion:::" + w); } }
/// <summary> /// sets the Current Company /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgCompanies_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { if (e.AddedItems.Count > 0 && e.AddedItems[0] is GridRowInfo) { this.Main.CompanyManager.Companies.SetCurrent((Company)((GridRowInfo)e.AddedItems[0]).RowData); this.Update(); } }
private void SfDataGrid_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { var grid = (SfDataGrid)sender; if (grid.SelectedItem != null) { grid.ScrollInView(new Syncfusion.UI.Xaml.ScrollAxis.RowColumnIndex(grid.SelectedIndex, 0)); } }
async private void sfDataGrid_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { try { var dc = (InspectionDetailsPageViewModel)this.DataContext; await dc.GetCustomerDetailsAsync(false); } catch (Exception ex) { new MessageDialog(ex.Message); } }
private void appointments_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { var record = this.appointments.SelectedItem; var calDataInt = ((MappedAppointment)record).CalendarDataID; foreach (var cd in ServiceLayer.CalendarDataList) { if (cd.EntryID == calDataInt) { calData = cd; break; } } }
private void dataGridCabeza_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { try { cabeza(); DataRowView row = (DataRowView)dataGridCabeza.SelectedItems[0]; Nota.Text = row["des_mov"].ToString(); factura(row["num_trn"].ToString()); } catch (Exception w) { MessageBox.Show("change:" + w); } }
private void dataGridCabeza_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { try { DataRowView row = (DataRowView)dataGridCabeza.SelectedItems[0]; string idreg = row["idreg"].ToString(); string num_trn = row["num_trn"].ToString(); string cod_emp = cod_empresa; SqlConnection con = new SqlConnection(SiaWin._cn); SqlCommand cmd = new SqlCommand(); SqlDataAdapter da = new SqlDataAdapter(); DataSet ds = new DataSet(); cmd = new SqlCommand("_EmpPvCuerpoConsignacion", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@idreg", idreg); cmd.Parameters.AddWithValue("@num_trn", num_trn); cmd.Parameters.AddWithValue("@_codemp", cod_empresa); da = new SqlDataAdapter(cmd); da.Fill(ds); con.Close(); temporal = ds.Tables[0]; dataGridCuerpo.ItemsSource = ds.Tables[0].DefaultView; TotalRef.Text = ds.Tables[0].Rows.Count.ToString(); //string cadena = "select cuerpo.cod_ref,referencia.nom_ref,cuerpo.cantidad,cuerpo.val_uni,cuerpo.subtotal,cuerpo.por_des,cuerpo.tot_tot,referencia.val_ref,cuerpo.val_iva,cuerpo.val_des from InCue_doc as cuerpo "; //cadena += "inner join InMae_ref as referencia on cuerpo.cod_ref = referencia.cod_ref "; //cadena += "inner join InCab_doc as cabeza on cuerpo.idregcab = cabeza.idreg "; //cadena += "where cuerpo.cod_trn='145' and cuerpo.idregcab='"+idreg+"' "; //temporal = SiaWin.Func.SqlDT(cadena, "Clientes", idemp); //dataGridCuerpo.ItemsSource = temporal.DefaultView; //TotalRef.Text = temporal.Rows.Count.ToString(); } catch (Exception w) { MessageBox.Show("error al carcar el detalle del cuerpo:" + w); } }
private void InnerList_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { var newsender = sender as SfDataGrid; if (newsender.SelectedItem != null) { var selected = newsender.SelectedItem as FileEntryViewModel; StaticReferencesVM.GlobalStatusBar.SelectedFilename = selected.Name; } if (StaticReferences.GlobalPropertiesView == null) { return; } if (ViewModel is not AssetBrowserViewModel vm) { return; } var propertiesViewModel = ServiceLocator.Default.ResolveType <PropertiesViewModel>(); if (propertiesViewModel.State is DockState.AutoHidden or DockState.Hidden) { return; } if (propertiesViewModel.canShowPrev) { propertiesViewModel.AB_SelectedItem = vm.RightSelectedItem; } else { return; } propertiesViewModel.AB_MeshPreviewVisible = false; propertiesViewModel.IsAudioPreviewVisible = false; propertiesViewModel.IsImagePreviewVisible = false; if (propertiesViewModel.AB_SelectedItem != null) { var selectedItem = propertiesViewModel.AB_SelectedItem; var selectedGameFile = propertiesViewModel.AB_SelectedItem.GetGameFile(); if (string.Equals(propertiesViewModel.AB_SelectedItem.Extension, ERedExtension.mesh.ToString(), System.StringComparison.OrdinalIgnoreCase)) { PreviewMesh(propertiesViewModel, selectedItem, selectedGameFile); } if (string.Equals(propertiesViewModel.AB_SelectedItem.Extension, ERedExtension.wem.ToString(), System.StringComparison.OrdinalIgnoreCase)) { PreviewWem(propertiesViewModel, selectedItem, selectedGameFile); } if (string.Equals(propertiesViewModel.AB_SelectedItem.Extension, ERedExtension.xbm.ToString(), System.StringComparison.OrdinalIgnoreCase)) { PreviewTexture(propertiesViewModel, selectedItem, selectedGameFile); } } propertiesViewModel.DecideForMeshPreview(); }