예제 #1
0
        //客房
        private void btnRoom_Click(object sender, EventArgs e)
        {
            //BathDBDataContext db_new = new BathDBDataContext(LogIn.connectionString);
            if (!dao.get_authority(LogIn.m_User, "包房管理"))
            {
                BathClass.printErrorMsg("权限不够!");
                return;
            }

            RoomViewForm rmvForm = new RoomViewForm();

            rmvForm.ShowDialog();
        }
예제 #2
0
        //包厢管理
        private void btnRoom_Click(object sender, EventArgs e)
        {
            var db = new BathDBDataContext(LogIn.connectionString);

            if (!BathClass.getAuthority(db, LogIn.m_User, "客房管理"))
            {
                GeneralClass.printErrorMsg("不具有权限");
                return;
            }

            if (MConvert <bool> .ToTypeOrDefault(db.Options.FirstOrDefault().启用客房面板, false))
            {
                RoomViewForm rvForm = new RoomViewForm();
                rvForm.ShowDialog();
            }
            else
            {
                var form = new CabViewForm();
                form.ShowDialog();
            }
        }
예제 #3
0
        //客房
        private void btnRoom_Click(object sender, EventArgs e)
        {
            BathDBDataContext db_new = new BathDBDataContext(LogIn.connectionString);

            if (!BathClass.getAuthority(db_new, LogIn.m_User, "包房管理"))
            {
                BathClass.printErrorMsg("权限不够!");
                return;
            }

            if (BathClass.ToBool(db_new.Options.FirstOrDefault().启用客房面板))
            {
                RoomViewForm rvForm = new RoomViewForm();
                rvForm.ShowDialog();
            }
            else
            {
                var form = new CabViewForm();
                form.ShowDialog();
            }
            RoomViewForm rmvForm = new RoomViewForm();

            rmvForm.ShowDialog();
        }