Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddRoomTypeUI addRoomTypeUI = new AddRoomTypeUI();

            if (DialogResult.Yes.Equals(addRoomTypeUI.ShowDialog()))
            {
                this.roomTypesTableAdapter.Fill(this.apartmentDataSet.RoomTypes);
            }
        }
Пример #2
0
        private void dgvRoomTypeList_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }

            AddRoomTypeUI AddRoomUI = new AddRoomTypeUI();

            AddRoomUI.RoomTypeID = Convert.ToInt32(((DataRowView)fKRoomTypesCustomerTypesBindingSource[e.RowIndex]).Row["RoomTypeID"]);
            if (DialogResult.Yes.Equals(AddRoomUI.ShowDialog()))
            {
                this.roomTypesTableAdapter.Fill(this.apartmentDataSet.RoomTypes);
            }
        }