예제 #1
0
        //判断台次名是否存在
        public bool IsExistBed(string bed, HIS.Model.SS_ROOM room)
        {
            string bedName  = room.ROOMNO + "间" + bed + "台";
            string strWhere = Tables.ss_roombed.NAME + oleDb.EuqalTo() + "'" + bedName + "'";

            return(BindEntity <HIS.Model.SS_ROOMBED> .CreateInstanceDAL(oleDb).Exists(strWhere));
        }
예제 #2
0
        //保存房间名
        public bool SaveNewRoom(string roomno)
        {
            HIS.Model.SS_ROOM room = new HIS.Model.SS_ROOM();
            room.ROOMNO   = roomno;
            room.ROOMNAME = roomno + "间";
            string[] pywb = GWMHIS.BussinessLogicLayer.Classes.PublicStaticFun.GetPyWbCode(room.ROOMNAME);
            room.PYM = pywb[0];
            room.WBM = pywb[1];
            try
            {
                BindEntity <HIS.Model.SS_ROOM> .CreateInstanceDAL(oleDb).Add(room);

                return(true);
            }
            catch (System.Exception e)
            {
                throw new Exception(e.Message);
            }
        }
예제 #3
0
        //增加台次
        public bool  AddBeds(HIS.Model.SS_ROOM room, string tcno)
        {
            try
            {
                HIS.Model.SS_ROOMBED bed = new HIS.Model.SS_ROOMBED();
                bed.ROOMID   = room.ROOMID;
                bed.USE_FLAG = 0;
                bed.NAME     = room.ROOMNO + "间" + tcno + "台";
                string[] pywb = GWMHIS.BussinessLogicLayer.Classes.PublicStaticFun.GetPyWbCode(bed.NAME);
                bed.PYM = pywb[0];
                bed.WBM = pywb[1];
                BindEntity <HIS.Model.SS_ROOMBED> .CreateInstanceDAL(oleDb).Add(bed);

                return(true);
            }
            catch (System.Exception e)
            {
                throw new Exception(e.Message);
            }
        }