public frmAsientos(bool Antiguo) { InitializeComponent(); objBLEstablecimiento = new BLEstablecimiento(); objBLHotel = new BLHotel(); if (Antiguo == true) { btnEstadosCuenta1.Visible = true; btnLibros1.Visible = true; btnVoucher1.Visible = true; } }
private void btnGenerarLAPVentas_Click(object sender, EventArgs e) { exportaVentasLAP objExp = new exportaVentasLAP(); //generar el txt DateTime fechaDesde = dtpFechaLAPVentasDesde.Value; DateTime fechaHasta = dtpFechaLAPVentasHasta.Value; string ruta = lblRutaLAPVentas.Text + "\\"; string cadenaConexion = Connection.connectionString(); //string ruc = ConfigurationManager.AppSettings["rucEmpresa"].ToString(); //obtener el codigo de concesionario BLHotel objHotel = new BLHotel(); string codigoConcesionario = objHotel.codigoConcesionario().Trim(); //exportar a un archivo de texto //objExp.exportar llamar al archivo exportaVentasLAP.cs if (objExp.exportar(cadenaConexion, RucEmpresa, fechaDesde, ruta, codigoConcesionario, fechaHasta) == true) { MessageBox.Show("Se generó el archivo de ventas para LAP sin errores."); /* * guardar el valor utilizado ruta de la carpeta * donde se generan los archivos */ ConfigurationManager.AppSettings["Ruta_Interfaz_LapVentas"] = lblRutaLAPVentas.Text; } else { MessageBox.Show("Error al generar el archivo de ventas para LAP."); } }
public JsonResult Grabar(int idHotel, int idEmpresa, string nombre_hotel, int num_estrellas, string direccion, int num_cuartos, string estado) { hotel hote = new hotel(); bool exito = true; hote.id_empresa = idEmpresa; hote.nombre_hotel = nombre_hotel; hote.num_estrellas = num_estrellas; hote.direccion = direccion; hote.num_cuartos = num_cuartos; hote.estado = estado; if (idHotel == -1) { exito = BLHotel.Registrar(hote); } else { hote.id_hotel = idHotel; exito = BLHotel.Actualizar(hote); } return(Json(new { success = exito })); }
public ActionResult Listado() { ViewBag.ListadoHotel = BLHotel.Listado(); return(PartialView()); }