示例#1
0
 private void generarGrafico()
 {
     GestionDeHoteles.GUI.MainWindow main = new GestionDeHoteles.GUI.MainWindow(new GestionDeHoteles.XML.XMLBrowser(), 1280, 720);
     main.Show();
     main.setGraficoGeneral();
     Gtk.Application.Run();
 }
        void selectOperation()
        {
            this.MainWindowView.GrdLista.Enabled = false;


            if (this.MainWindowView.GrdLista.CurrentCell.ColumnIndex == 6)
            {
                //MessageBox.Show("Column button clicked ");
                this.Eliminar();
            }
            else if (this.MainWindowView.GrdLista.CurrentCell.ColumnIndex == 7)
            {
                //MessageBox.Show("Column button clicked ");
                int Identificador = (int)this.MainWindowView.GrdLista.CurrentRow.Cells[3].Value;
                this.UpdateHabitacion(Identificador);
            }
            else if (this.MainWindowView.GrdLista.CurrentCell.ColumnIndex == 8)
            {
                int Identificador = (int)this.MainWindowView.GrdLista.CurrentRow.Cells[3].Value;
                GestionDeHoteles.GUI.MainWindow main = new GestionDeHoteles.GUI.MainWindow(new GestionDeHoteles.XML.XMLBrowser(), 1280, 720);
                main.Show();
                main.setGraficoHabitacion(Identificador);

                Gtk.Application.Run();
            }

            this.MainWindowView.GrdLista.Enabled = true;
        }
示例#3
0
        //Funcionalidades de Clientes

        void SeleccionarAccionCliente()
        {
            this.MainWindowViewClientes.GrdListaClientes.Enabled = false;

            //Case Modificar-Cliente
            if (this.MainWindowViewClientes.GrdListaClientes.CurrentCell.ColumnIndex == 6)
            {
                string DNI = (string)this.MainWindowViewClientes.GrdListaClientes.CurrentRow.Cells[2].Value;
                this.ModificarCliente(DNI);
            }
            //Case Eliminar-Cliente
            else if (this.MainWindowViewClientes.GrdListaClientes.CurrentCell.ColumnIndex == 7)
            {
                this.EliminarCliente();
            }
            else if (this.MainWindowViewClientes.GrdListaClientes.CurrentCell.ColumnIndex == 8)
            {
                string DNI = (string)this.MainWindowViewClientes.GrdListaClientes.CurrentRow.Cells[2].Value;

                GestionDeHoteles.GUI.MainWindow main = new GestionDeHoteles.GUI.MainWindow(new GestionDeHoteles.XML.XMLBrowser(), 1280, 720);
                main.Show();
                main.setGraficoCliente(DNI);
                Gtk.Application.Run();
            }
            else if (this.MainWindowViewClientes.GrdListaClientes.CurrentCell.ColumnIndex == 9)
            {
                string DNIBusqueda = (string)this.MainWindowViewClientes.GrdListaClientes.CurrentRow.Cells[2].Value;

                BusquedasHotel.View.MainWindow ventana = new BusquedasHotel.View.MainWindow();
                //this.MainWindowViewClientes.Hide();
                ventana.Show();
                ventana.FiltrarPorPersona(DNIBusqueda);

                ventana.ActualizaConFiltroPorPersona();
                this.MainWindowViewClientes.pnlPpal.Controls.Add(this.MainWindowViewClientes.pnlBusquedasPpal);

                ventana.ResizeWindow();
                //this.ModificarCliente(DNI);
            }

            this.MainWindowViewClientes.GrdListaClientes.Enabled = true;
        }