private void btnAdd_Click(object sender, EventArgs e) { using (FormEditRoom form = new FormEditRoom(null, mListData_Flat)) { if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { mRoom = form.mRoom; DoRefresh(); } } }
private void mListViewData_MouseDoubleClick(object sender, MouseEventArgs e) { Room data = mListViewData.SelectedObject as Room; if (data != null && data.RoomID > 0) { using (FormEditRoom form = new FormEditRoom(data, mListData_Flat)) { if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { mRoom = form.mRoom; DoRefresh(); } } } }