public bool MoveUnit(string unitId, string row, string col)
        {
            string funMsg = "function: MoveUnit(string unitId, string row, string col)" + FileUtility.NewLine + _ClassMsg;

            try
            {
                string buildId = this.GetCentaUnitById <CentaUnitType>(unitId).BuildId;
                PreviewService.RefreshLog(buildId);
                int effected = _DbService.MoveUnit(unitId, row, col);
                return(effected > 0);
            }
            catch (Exception ex)
            {
                string exMsg = "Exception: " + ex.Message + FileUtility.NewLine + funMsg;
                throw new Exception(exMsg, ex.InnerException);
            }
        }
        public bool AddUnit(string buildId, string floor, string room, decimal area, string countf, string countt, string countw, string direction)
        {
            string funMsg = "function: AddUnit(string buildId, string floor, string room, decimal area, string countf, string countt,string countw,string direction)" + FileUtility.NewLine + _ClassMsg;

            try
            {
                int effected = 0;
                if (string.IsNullOrEmpty(buildId) || (string.IsNullOrEmpty(floor) && string.IsNullOrEmpty(room)))
                {
                    return(false);
                }
                PreviewService.RefreshLog(buildId);
                if (string.IsNullOrEmpty(floor))
                {
                    IList <string> y_axis = GetUnitFloorByBuild(buildId);
                    foreach (var item in y_axis)
                    {
                        if (!IsExistUnit(buildId, item, room + "室"))
                        {
                            effected = _DbService.AddUnit(buildId, item.Replace("楼", ""), room, area, countf, countt, countw, direction);
                        }
                    }
                }
                else if (string.IsNullOrEmpty(room))
                {
                    IList <string> x_axis = GetUnitRoomByBuild(buildId);
                    foreach (var item in x_axis)
                    {
                        if (!IsExistUnit(buildId, floor + "楼", item))
                        {
                            effected = _DbService.AddUnit(buildId, floor, item.Replace("室", ""), area, countf, countt, countw, direction);
                        }
                    }
                }
                else
                {
                    effected = _DbService.AddUnit(buildId, floor, room, area, countf, countt, countw, direction);
                }
                return(effected > 0);
            }
            catch (Exception ex)
            {
                string exMsg = "Exception: " + ex.Message + FileUtility.NewLine + funMsg;
                throw new Exception(exMsg, ex.InnerException);
            }
        }
        public bool MergeUnit(string unitCollection, int merge)
        {
            string funMsg = "function: Merge(string unitCollection, int merge)" + FileUtility.NewLine + _ClassMsg;

            try
            {
                string[] unitId  = unitCollection.Split(new string[] { AppSettings.FirstSplit }, StringSplitOptions.RemoveEmptyEntries);
                string   buildId = this.GetCentaUnitById <CentaUnitType>(unitId[merge]).BuildId;
                PreviewService.RefreshLog(buildId);
                int effected = _DbService.MergeUnit(unitId[merge]);
                return(effected > 0);
            }
            catch (Exception ex)
            {
                string exMsg = "Exception: " + ex.Message + FileUtility.NewLine + funMsg;
                throw new Exception(exMsg, ex.InnerException);
            }
        }