private void toolStripButton1_Click(object sender, EventArgs e) { FrmOrdenReparaciones frm = new FrmOrdenReparaciones(); frm.ShowDialog(); buscar("", frm.EntOrden1.Id, "id_orden"); }
private void seleccionOrden(object sender, MouseEventArgs e) { if (this.grdOrdenes.Rows.Count > 0) { int fila = this.grdOrdenes.CurrentRow.Index; EntOrden.Id = Int32.Parse(this.grdOrdenes[0, fila].Value.ToString()); EntOrden.FechaIngreso = DateTime.Parse(this.grdOrdenes[1, fila].Value.ToString()); EntOrden.FechaSalida = DateTime.Parse(this.grdOrdenes[2, fila].Value.ToString()); EntOrden.FechaFacturacion = DateTime.Parse(this.grdOrdenes[3, fila].Value.ToString()); EntOrden.Estado = this.grdOrdenes[4, fila].Value.ToString(); EntOrden.CostoTotal = Double.Parse(this.grdOrdenes[5, fila].Value.ToString()); EntOrden.Empleado = (ENT.Empleado)grdOrdenes[7, fila].Value; EntOrden.Vehiculo = (ENT.Vehiculo) this.grdOrdenes[6, fila].Value; FrmOrdenReparaciones frm = new FrmOrdenReparaciones(EntOrden); frm.ShowDialog(); cargarOrden(); } }
private void MateniminetoOrden(object sender, EventArgs e) { if (this.dgOrdenes.Rows.Count > 0) { int fila = this.dgOrdenes.CurrentRow.Index; orden.Id = Int32.Parse(this.dgOrdenes[0, fila].Value.ToString()); orden.FechaIngreso = DateTime.Parse(this.dgOrdenes[1, fila].Value.ToString()); orden.FechaSalida = DateTime.Parse(this.dgOrdenes[2, fila].Value.ToString()); orden.FechaFacturacion = DateTime.Parse(this.dgOrdenes[3, fila].Value.ToString()); orden.Estado = this.dgOrdenes[4, fila].Value.ToString(); orden.CostoTotal = Double.Parse(this.dgOrdenes[5, fila].Value.ToString()); orden.Empleado = (ENT.Empleado)dgOrdenes[7, fila].Value; orden.Vehiculo = (ENT.Vehiculo) this.dgOrdenes[6, fila].Value; FrmOrdenReparaciones frm = new FrmOrdenReparaciones(orden); frm.ShowDialog(); buscar("", orden.Id, "id_orden"); } }