public String[,] CrearArrayVentas(DashboardVO dashboardVO) { OperacionesDAL operacionesDAL = new OperacionesDAL(); String[,] arrayCom = operacionesDAL.CrearArrayVentas(dashboardVO); return(arrayCom); }
public Form1() { InitializeComponent(); fileComerciales = "1_datos_comerciales.csv"; fileVentas = "2_facturacion_comercial.csv"; comElegido = ""; tlp = tlP0; // Crea objeto VO DashboardVO dashboardVO = new DashboardVO(fileComerciales, fileVentas); //Crea objeto BLL para procesarlo y crear los arrays de datos OperacionesBLL operacionesBLL = new OperacionesBLL(dashboardVO); arrayComerciales = operacionesBLL.CrearArrayComerciales(dashboardVO); arrayVentas = operacionesBLL.CrearArrayVentas(dashboardVO); // Rellena datos del panel superior con los nombres de los comerciales com1 = arrayComerciales[1, 1] + " " + arrayComerciales[1, 2]; com2 = arrayComerciales[2, 1] + " " + arrayComerciales[2, 2]; com3 = arrayComerciales[3, 1] + " " + arrayComerciales[3, 2]; nombres = new String[] { com1, com2, com3 }; btCom1.Text = nombres[0]; btCom2.Text = nombres[1]; btCom3.Text = nombres[2]; label_titulo.Text = "Selecciona un comercial"; }
//Llama al método CSV_ToArray para crear el array de ventas public String[,] CrearArrayVentas(DashboardVO dashboardVO) { String fichero = "./" + dashboardVO.FileVentas; String[,] miArray = CSV_ToArray(@fichero, ","); return(miArray); }
//Llama al método CSV_ToArray para crear el array con los datos de los comerciales public String[,] CrearArrayComerciales(DashboardVO dashboardVO) { String fichero = "./" + dashboardVO.FileComerciales; String[,] miArray = CSV_ToArray(@fichero, ","); return(miArray); }
public OperacionesBLL(DashboardVO dashboardVO) { this.dashboardVO = dashboardVO; }