private void But_Crear_Reporte_Click(object sender, RoutedEventArgs e) { Xceed.Wpf.DataGrid.DataRow row; this.Datos = new List<Empresa.Comun.valores_punto>(); Empresa.Comun.valores_punto valorpunto; valorpunto = new Empresa.Comun.valores_punto(); valorpunto.Serie = new System.Windows.Controls.DataVisualization.Charting.ColumnSeries(); List<Empresa.Docente.tsolicitudfunenario_view> vista_sol = new List<Empresa.Docente.tsolicitudfunenario_view>(); Empresa.Docente.tsolicitudfunenario_view item_vista_sol; //Empresa.Docente //Recorriendo la filas //for(int row_index =0 ; row_index <= __grid.Items.Count -1; row_index ++){ foreach (Empresa.Docente.tsolicitudfunenario item_seg in __grid.Items) { item_vista_sol = new Empresa.Docente.tsolicitudfunenario_view(); item_vista_sol.Monto = 1; //row = (Xceed.Wpf.DataGrid.DataRow)__grid.GetContainerFromItem(item_seg); //if (row != null) //{ // //Recorriendo las columnas // object yvalue = 0.0; // object xvalue = string.Empty; // for (int icont = 0; icont <= row.Cells.Count - 1; icont++) // { // if (((Empresa.Comun.valores_dependientes_independientes)lis_d_dependientes.Items[0]).Nombre == __grid.Columns[icont].Title.ToString()){ // //Encontro el valor dependiente. // yvalue = row.Cells[icont].Content; // } // if (((Empresa.Comun.valores_dependientes_independientes)lis_d_inpendientes.Items[0]).Nombre == __grid.Columns[icont].Title.ToString()){ // //Encontro el valor dependiente. // xvalue = row.Cells[icont].Content; // } // } // valorpunto.Puntos.Add(new Empresa.Comun.valores_punto_axial(xvalue.ToString(), (double)yvalue)); //} } }
private void But_Estadistica_Click(object sender, RoutedEventArgs e) { try { SIC.Objs.Controles.SeguroFunerario.Asistentes.win_dial_sel_estadistica_sf __win_dialog_select = new Controles.SeguroFunerario.Asistentes.win_dial_sel_estadistica_sf(); List<Empresa.Comun.valores_punto> __datos = new List<Empresa.Comun.valores_punto>(); Empresa.Comun.valores_punto _plano = new Empresa.Comun.valores_punto(new System.Windows.Controls.DataVisualization.Charting.LineSeries()); Empresa.Comun.valores_punto_axial _punto; object objecto_x = new object(); object objecto_y = new object(); //EXISTEN GRUPOS if (this.datagrid1.GroupLevelDescriptions.Count > 0) { var resultim = this.datagrid1.Items; __win_dialog_select.ShowDialog(); if (__win_dialog_select.EsValido) { var resul = (System.Windows.Controls.ItemCollection)this.datagrid1.Items; foreach (System.Windows.Data.CollectionViewGroup gr in resul.Groups) { //var resul = gr.Title; objecto_x = gr.Name; objecto_y = gr.ItemCount; _punto = new Empresa.Comun.valores_punto_axial(objecto_x, objecto_y); _plano.Puntos.Add(_punto); } __datos.Add(_plano); __win_dialog_select.Close(); } } //NO EXISTEN GRUPOS else { __win_dialog_select.ShowDialog(); if (__win_dialog_select.EsValido) { foreach (Empresa.Docente.tsolicitudfunenario item in this.datagrid1.Items) { switch (__win_dialog_select.SeleccionIndependiente) { case Controles.SeguroFunerario.Asistentes.win_dial_sel_estadistica_sf.enum_eje_inde.Estado: objecto_x = item.EstadoActual.Estado.Nombre; break; case Controles.SeguroFunerario.Asistentes.win_dial_sel_estadistica_sf.enum_eje_inde.EstadoPago: objecto_x = item.EstadoPago.Nombre; break; case Controles.SeguroFunerario.Asistentes.win_dial_sel_estadistica_sf.enum_eje_inde.Parentesco: objecto_x = item.DamePrimerBeneficiario.Parentesco.Nombre; break; } switch (__win_dialog_select.SeleccionDependiente) { case Controles.SeguroFunerario.Asistentes.win_dial_sel_estadistica_sf.enum_eje_depe.Fecha: objecto_y = item.Fecha; break; case Controles.SeguroFunerario.Asistentes.win_dial_sel_estadistica_sf.enum_eje_depe.Monto: objecto_y = item.Monto; break; } _punto = new Empresa.Comun.valores_punto_axial(objecto_x, objecto_y); _plano.Puntos.Add(_punto); } __datos.Add(_plano); __win_dialog_select.Close(); } } SIC.Objs.Controles.Dialogos.win_contenedor_estadistica __content_estadis = new Controles.Dialogos.win_contenedor_estadistica(__datos); __content_estadis.Show(); } catch{ MessageBox.Show("No se puede presentar la tarea requerida."); } }