示例#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();
        }
示例#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();
            }
        }
示例#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);
            }
        }