//构造函数 public RoomForm(BathDBDataContext dc, Room room, RoomManagementForm rm) { db = dc; m_rmForm = rm; if (room != null) { newRoom = false; m_Room = room; } InitializeComponent(); }
//客房管理 private void btnRoomManage_Click(object sender, EventArgs e) { var db = new BathDBDataContext(LogIn.connectionString); if (!BathClass.getAuthority(db, LogIn.m_User, "客房管理")) { GeneralClass.printErrorMsg("权限不够,不能访问!"); return; } RoomManagementForm roomForm = new RoomManagementForm(); roomForm.ShowDialog(); }