private void llamada_movi_x_cta() { try { if (Info_Fila != null) { if (Info_Fila.pc_EsMovimiento == "S") { DateTime FechaIni = DateTime.Now; DateTime FechaFin = DateTime.Now; int IdPunto_Cargo_Grupo = 0; int IdPunto_Cargo = 0; string IdCentroCosto = ""; string[] cadena = Info_Fila.IdCtaCble.Split(); IdPunto_Cargo_Grupo = uCct_Menu_Reportes1.Get_info_punto_cargo_grupo() == null ? 0 : uCct_Menu_Reportes1.Get_info_punto_cargo_grupo().IdPunto_cargo_grupo; IdPunto_Cargo = uCct_Menu_Reportes1.Get_info_punto_cargo() == null ? 0 : uCct_Menu_Reportes1.Get_info_punto_cargo().IdPunto_cargo; IdCentroCosto = uCct_Menu_Reportes1.Get_info_Centro_costo() == null ? "" : uCct_Menu_Reportes1.Get_info_Centro_costo().IdCentroCosto; FechaIni = uCct_Menu_Reportes1.bei_Desde.EditValue == null ? DateTime.Now : Convert.ToDateTime(uCct_Menu_Reportes1.bei_Desde.EditValue); FechaFin = uCct_Menu_Reportes1.bei_Hasta.EditValue == null ? DateTime.Now : Convert.ToDateTime(uCct_Menu_Reportes1.bei_Hasta.EditValue); bool mostrar_asiento_cierre = Convert.ToBoolean(uCct_Menu_Reportes1.bei_Check3.EditValue); XCONTA_Rpt006_rpt Reporte = new XCONTA_Rpt006_rpt(); Reporte.RequestParameters = false; ReportPrintTool pt = new ReportPrintTool(Reporte); pt.AutoShowParametersPanel = false; Reporte.P_IdEmpresa.Value = param.IdEmpresa; Reporte.P_FechaIni.Value = FechaIni; Reporte.P_FechaFin.Value = FechaFin; Reporte.P_IdCtaCble.Value = cadena[0]; Reporte.P_IdPuntoCargo.Value = IdPunto_Cargo; Reporte.P_IdPuntoCargo_Grupo.Value = IdPunto_Cargo_Grupo; Reporte.P_IdCentro_Costo.Value = Info_Fila.IdCentroCosto; Reporte.P_Mostrar_Asiento_cierre.Value = mostrar_asiento_cierre; Reporte.Visible_col_CentroCosto = false; Reporte.Visible_col_PuntoCargo = false; Reporte.ShowPreview(); } } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void llamada_movi_x_cta() { try { if (Info_Fila != null) { if (Info_Fila.pc_EsMovimiento == "S") { DateTime FechaIni = DateTime.Now; DateTime FechaFin = DateTime.Now; int IdPunto_Cargo_Grupo = 0; int IdPunto_Cargo = 0; string IdCentroCosto = ""; IdPunto_Cargo_Grupo = uCct_Pto_Cargo_Grupo.Get_Id_grupo(); IdPunto_Cargo = uCct_Pto_Cargo_Grupo.Get_Id_punto_cargo(); IdCentroCosto = cmb_centro_costo.EditValue == null ? "" : cmb_centro_costo.EditValue.ToString(); FechaIni = dtpFechaDesde.Value; FechaFin = dtpFechaHasta.Value; XCONTA_Rpt006_rpt Reporte = new XCONTA_Rpt006_rpt(); Reporte.RequestParameters = false; ReportPrintTool pt = new ReportPrintTool(Reporte); pt.AutoShowParametersPanel = false; Reporte.Visible_col_CentroCosto = false; Reporte.Visible_col_PuntoCargo = false; Reporte.P_IdEmpresa.Value = param.IdEmpresa; Reporte.P_FechaIni.Value = FechaIni; Reporte.P_FechaFin.Value = FechaFin; Reporte.P_IdCtaCble.Value = Info_Fila.IdCtaCble; Reporte.P_IdPuntoCargo.Value = IdPunto_Cargo; Reporte.P_IdPuntoCargo_Grupo.Value = IdPunto_Cargo_Grupo; Reporte.P_IdCentro_Costo.Value = IdCentroCosto; Reporte.ShowPreview(); } } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void Procesar() { try { DateTime FechaIni = DateTime.Now; DateTime FechaFin = DateTime.Now; string IdCentro_costo = ""; string IdCtaIni = ""; string IdCtaFin = ""; int IdGrupo_Punto_cargo = 0; int IdPunto_Cargo = 0; List <string> listCuentas = new List <string>(); if (rb_x_rango_cuentas.Checked) { IdCtaIni = Convert.ToString(cmb_cuentas_inicio.EditValue); IdCtaFin = Convert.ToString(cmb_cuentas_fin.EditValue); List <ct_Plancta_Info> listaEncontrada = new List <ct_Plancta_Info>(); listaEncontrada = lista_planCta.FindAll(v => Convert.ToDecimal(v.IdCtaCble) >= Convert.ToDecimal(IdCtaIni) && Convert.ToDecimal(v.IdCtaCble) <= Convert.ToDecimal(IdCtaFin)); if (listaEncontrada.Count() == 0) { MessageBox.Show("No Existe cuentas en este rango ..."); return; } foreach (var item in listaEncontrada) { listCuentas.Add(item.IdCtaCble); } } if (rb_x_diferentes_cuentas.Checked) { var listCtas_Select = ((List <ct_Plancta_Info>)(gridControlPlanCta.DataSource)).FindAll(var => var.Check == true); if (listCtas_Select.Count == 0) { MessageBox.Show("No ha seleccionado Cuentas Contables a mostrar."); return; } foreach (var item in listCtas_Select) { listCuentas.Add(item.IdCtaCble); } } FechaIni = dtpFechaIni.Value; FechaFin = dtpFechaFin.Value; IdGrupo_Punto_cargo = cmb_Pto_Cargo_Grupo.Get_Id_grupo(); IdPunto_Cargo = cmb_Pto_Cargo_Grupo.Get_Id_punto_cargo(); IdCentro_costo = cmb_centro_costo.EditValue == null ? "" : cmb_centro_costo.EditValue.ToString(); XCONTA_Rpt006_rpt Reporte = new XCONTA_Rpt006_rpt(); Reporte.RequestParameters = false; ReportPrintTool pt = new ReportPrintTool(Reporte); pt.AutoShowParametersPanel = false; Reporte.Visible_col_PuntoCargo = chkMostrar_col_Punto_Cargo.Checked; Reporte.Visible_col_CentroCosto = chkMostrar_col_centro_costo.Checked; Reporte.P_ListIdCtasCbles = listCuentas; Reporte.P_IdEmpresa.Value = param.IdEmpresa; Reporte.P_FechaIni.Value = FechaIni; Reporte.P_FechaFin.Value = FechaFin; Reporte.P_IdCtaCble.Value = ""; Reporte.P_IdPuntoCargo.Value = IdPunto_Cargo; Reporte.P_IdPuntoCargo_Grupo.Value = IdGrupo_Punto_cargo; Reporte.P_IdCentro_Costo.Value = IdCentro_costo; Reporte.P_Mostrar_Asiento_cierre.Value = chk_Mostrar_Asiento_cierre.Checked; Reporte.ShowPreview(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.Message); } }