コード例 #1
0
        public PosMapBlock GetDefaultPosMapBlock()
        {
            var ret = _dbService.GetMapScheme(true);

            if (ret.Rows.Count > 0)
            {
                _posMapBlock = PosMapBlockSerialize.Deserialize(ret.Rows[0]["MapContent"].ToString());
            }
            return(_posMapBlock);
        }
コード例 #2
0
        public PosMapBlock GetPosMapBlock(string schemeName)
        {
            var posMap = new PosMapBlock();
            var ret    = _dbService.GetMapScheme(schemeName);

            if (ret.Rows.Count > 0)
            {
                posMap = PosMapBlockSerialize.Deserialize(ret.Rows[0]["MapContent"].ToString());
            }
            return(posMap);
        }
コード例 #3
0
        public void LoadMapScheme(string content)
        {
            var posMap = PosMapBlockSerialize.Deserialize(content);

            InsertScheme(posMap.SchemeName, posMap.BoardRows, posMap.BoardCols, posMap.SeatRows, posMap.SeatCols);
            _dbService.UpdateMapScheme(posMap.SchemeName, content);
            var ret = _dbService.GetMapScheme(true);

            if (ret.Rows.Count <= 0)
            {
                SubmitMap(posMap.SchemeName, true);
            }
        }