Ejemplo n.º 1
0
        private void btnPlaceDetails_Click(object sender, EventArgs e)
        {
            int         placeIndex = dgvPlaceTable.CurrentCell.RowIndex;
            PlaceEntity place      = AllPlaces.ElementAt(placeIndex);
            CRUD_Place  crudPlace  = new CRUD_Place(place);

            crudPlace.makeReadOnly();
            crudPlace.Show();
        }
Ejemplo n.º 2
0
        private void btnPlaceAdd_Click(object sender, EventArgs e)
        {
            PlaceEntity place     = new PlaceEntity();
            CRUD_Place  crudPlace = new CRUD_Place(place);

            crudPlace.ShowDialog();

            if (crudPlace.DialogResult == DialogResult.OK)
            {
                AllPlaces.Add(place);
                dgvPlaceTable.Invalidate();
            }
        }
Ejemplo n.º 3
0
        private void btnPlaceEdit_Click(object sender, EventArgs e)
        {
            int         placeIndex = dgvPlaceTable.CurrentCell.RowIndex;
            PlaceEntity place      = AllPlaces.ElementAt(placeIndex);
            CRUD_Place  crudPlace  = new CRUD_Place(place);

            crudPlace.editing = true;
            crudPlace.ShowDialog();

            if (crudPlace.DialogResult == DialogResult.OK)
            {
                dgvPlaceTable.InvalidateRow(placeIndex);
            }
        }