public PosMapBlock GetDefaultPosMapBlock() { var ret = _dbService.GetMapScheme(true); if (ret.Rows.Count > 0) { _posMapBlock = PosMapBlockSerialize.Deserialize(ret.Rows[0]["MapContent"].ToString()); } return(_posMapBlock); }
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); }
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); } }