public AddProjectForm(DataSetProyectos.obrasRow obra)
        {
            InitializeComponent();

            _obra = obra;

            txt_nombre.Text       = obra.nombre;
            txt_codigo.Text       = obra.codigo;
            txt_localizacion.Text = obra.localizacion;

            cmb_TipoHotel.SelectedIndex       = 0;
            cmb_TipoAlojamiento.SelectedIndex = 0;
        }
        private void gridView1_PopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e)
        {
            GridView _grid = gridControl1.FocusedView as GridView;

            obra = _grid.FocusedRowHandle == -2147483646 ? obrasTableAdapter1.GetDataByID(int.Parse(gridView1.GetRowCellValue(0, "idobra").ToString())).FirstOrDefault() : obrasTableAdapter1.GetDataByID(int.Parse(gridView1.GetRowCellValue(_grid.FocusedRowHandle, "idobra").ToString())).FirstOrDefault();

            switch (e.MenuType)
            {
            case GridMenuType.Row:
                var menu = e.Menu as GridViewMenu;
                menu.Items.Clear();
                menu.Items.Add(CreateItem("Modificar"));
                break;
            }
        }