private void InsertarCarga_Combustible() { CLS_Carga_Combustible Clase = new CLS_Carga_Combustible(); Clase.Folio = textFolio.Text.Trim(); DateTime Fecha; Fecha = Convert.ToDateTime(dtFechaAlta.Text.Trim()); Clase.FechaCarga = Fecha.Year.ToString() + DosCero(Fecha.Month.ToString()) + DosCero(Fecha.Day.ToString()); Clase.Kilometraje = Convert.ToDouble(textKM.Text); Clase.Litros = Convert.ToDouble(textLT.Text); Clase.PrecioLitro = Convert.ToDouble(textPrecio.Text); Clase.PrecioTotal = Convert.ToDouble(textTotal.Text); Clase.Id_Activo = textActivo.Tag.ToString(); Clase.Id_Proveedor = textProveedor.Tag.ToString(); Clase.Id_Factura = textFactura.Text.ToString(); Clase.Comprador = textComprador.Tag.ToString(); Clase.Observaciones = memoObservaciones.Text.ToString(); Clase.MtdInsertarCarga_Combustible(); if (Clase.Exito) { CargarCarga_Combustible(); XtraMessageBox.Show("Se ha Insertado el registro con exito"); LimpiarCampos(); } else { XtraMessageBox.Show(Clase.Mensaje); } }
private void CargarCarga_Combustible() { gridControl1.DataSource = null; CLS_Carga_Combustible Clase = new CLS_Carga_Combustible(); Clase.MtdSeleccionarCarga_Combustible(); if (Clase.Exito) { gridControl1.DataSource = Clase.Datos; } }
private void EliminarCarga_Combustible() { CLS_Carga_Combustible Clase = new CLS_Carga_Combustible(); Clase.Folio = textFolio.Text.Trim(); Clase.MtdEliminarCarga_Combustible(); if (Clase.Exito) { CargarCarga_Combustible(); XtraMessageBox.Show("Se ha Eliminado el registro con exito"); LimpiarCampos(); } else { XtraMessageBox.Show(Clase.Mensaje); } }