Esempio n. 1
0
        public void BatchChangeBedEnable(List <int> ids, bool bEnable)
        {
            CommonDAL dal = new CommonDAL();

            if (!bEnable)
            {
                //不能禁用已被入住房间
                List <int> lUsed = dal.CheckBedCheckins(ids);
                if (lUsed.Count > 0)
                {
                    var       sUsed   = string.Join(",", lUsed);
                    var       sPrompt = string.Format("床位已有入住,不能禁用: {0}", sUsed);
                    Exception e       = new Exception(sPrompt);
                    throw e;
                }
            }

            dal.ChangeBedEnable(ids, bEnable);
        }