private void ReporteCedula_Load(object sender, EventArgs e) { // TODO: esta línea de código carga datos en la tabla 'pinaDataSet.detallecedulaproductos' Puede moverla o quitarla según sea necesario. // TODO: esta línea de código carga datos en la tabla 'pinaDataSet.detalleseccioncedula' Puede moverla o quitarla según sea necesario. // TODO: esta línea de código carga datos en la tabla 'pinaDataSet.sprayboom' Puede moverla o quitarla según sea necesario. // TODO: esta línea de código carga datos en la tabla 'pinaDataSet.cedulaidentidad' Puede moverla o quitarla según sea necesario. this.cedulaidentidadTableAdapter.llenarCedula(pinaDataSet.cedulaidentidad, cedula); this.sprayboomTableAdapter.FillBy(this.pinaDataSet.sprayboom, pinaDataSet.cedulaidentidad.Rows[0]["numSpray"].ToString()); this.detalleseccioncedulaTableAdapter.FillBy(this.pinaDataSet.detalleseccioncedula, cedula); this.detallecedulaproductosTableAdapter.FillBy(this.pinaDataSet.detallecedulaproductos, cedula); bool opc; string semana = System.Globalization.CultureInfo.CurrentUICulture.Calendar.GetWeekOfYear(DateTime.Today, CalendarWeekRule.FirstDay, DateTime.Today.DayOfWeek).ToString(); DateTime fechaProgramada = DateTime.Parse(pinaDataSet.cedulaidentidad.Rows[0]["fechaProgramada"].ToString()); ReportParameter[] parametros = new ReportParameter[5]; Entidades.Chofer c = DAO.Chofer.buscarChofer(pinaDataSet.cedulaidentidad.Rows[0]["chofer"].ToString()); parametros[0] = new ReportParameter("semana", semana); opc = Boolean.Parse(pinaDataSet.cedulaidentidad.Rows[0]["muestreo"].ToString()); parametros[1] = new ReportParameter("muestreo", agregarX(opc)); opc = Boolean.Parse(pinaDataSet.cedulaidentidad.Rows[0]["programacion"].ToString()); parametros[2] = new ReportParameter("programacion", agregarX(opc)); parametros[3] = new ReportParameter("chofer", (c.Nombre + " " + c.Apellido + " " + c.Apellido2)); double boomH = Double.Parse(pinaDataSet.cedulaidentidad.Rows[0]["ltsRequeridosH"].ToString()) / Double.Parse(this.pinaDataSet.sprayboom.Rows[0]["capacidad"].ToString()); parametros[4] = new ReportParameter("boomH", boomH.ToString()); reportViewer1.LocalReport.SetParameters(parametros); this.reportViewer1.RefreshReport(); this.reportViewer1.RefreshReport(); }
void llenarDetalles(Entidades.Chofer c) { txtEditApellido.Text = c.Apellido; txtEditApellido2.Text = c.Apellido2; txtEditCedula.Text = c.Celuda; txtEditNombre.Text = c.Nombre; txtEditTelefono.Text = c.Telefono; }
Entidades.Chofer choferAgregar() { Entidades.Chofer c = new Entidades.Chofer(); c.Apellido = txtAddApellido.Text; c.Apellido2 = txtAddApellido2.Text; c.Celuda = txtAddCedula.Text; c.Nombre = txtAddNombre.Text; c.Telefono = txtAddTelefono.Text; return(c); }
Entidades.Chofer choferDetalles() { Entidades.Chofer c = new Entidades.Chofer(); c.Apellido = txtEditApellido.Text; c.Apellido2 = txtEditApellido2.Text; c.Celuda = txtEditCedula.Text; c.Nombre = txtEditNombre.Text; c.Telefono = txtEditTelefono.Text; return(c); }