void MostrarDetalles(object sender, EventArgs e)
 {
     if (ProyectoController.IsNewProject(obra.idobra))
     {
         Form _addProject = new AddProjectForm(obra);
         _addProject.ShowDialog();
     }
     else
     {
         var  _proyecto          = ProyectoController.UpdateProyecto(obra);
         Form _projectManagement = new ProjectManagementForm(_proyecto);
         _projectManagement.ShowDialog();
     }
 }
Beispiel #2
0
        private void btn_updateProject_Click(object sender, EventArgs e)
        {
            _proyecto.Cod                 = txt_codigo.Text;
            _proyecto.Nombre              = txt_nombre.Text;
            _proyecto.Localizacion        = txt_Localizacion.Text;
            _proyecto.Tipo_Alojamiento    = txt_tipoAlojamiento.Text;
            _proyecto.Subtipo_Alojamiento = txt_subtipoAlojamiento.Text;
            _proyecto.Tipo_Hotel          = txt_TipoHotel.Text;
            _proyecto.Cant_Habitaciones   = Convert.ToInt32(numeric_cantHabitaciones.Value);
            _proyecto.Categoria           = Convert.ToInt32(numeric_Categoria.Value);
            _proyecto.Maxima_Altura       = Convert.ToInt32(numeric_MaximaAltura.Value);

            ProyectoController.UpdateProyecto(_proyecto);

            GenerateTable();
        }