public JsonResult FormSubmit(string id, string orgId, string name, double lon, double lat)
        {
            var cabinet = new Cabinet
            {
                IsDel = (short)DeleteStatus.No,
                Lat   = lat,
                Lon   = lon,
                Name  = name,
                OrgId = orgId
            };
            var data   = false;
            var module = new CabinetModule(CurrentUser);

            if (string.IsNullOrWhiteSpace(id))
            {
                data = module.Add(cabinet);
            }

            if (!string.IsNullOrWhiteSpace(id))
            {
                cabinet.Id = id;
                data       = module.Modify(cabinet, t => t.Id == id);
            }

            return(Json(new { code = 0, msg = "Ok", data = data }, "text/html"));
        }
        public JsonResult Remove(string id)
        {
            var data   = false;
            var module = new CabinetModule(CurrentUser);

            data = module.Remove(t => t.Id == id);
            return(Json(new { code = 0, msg = "Ok", data = data }));
        }
        public JObject GetData(string orgId, string name, int page, int rows)
        {
            var count  = 0;
            var module = new CabinetModule(CurrentUser);
            var items  = module.Page(orgId, name, page, rows, out count);
            var json   = TableCabinetDataModel.Model.GetJson(items, count, TableCabinetHeaderModel.Header);

            return(json);
        }
        public JsonResult Tree(string orgId)
        {
            var module = new CabinetModule(CurrentUser);
            var items  = module.FeatchAll(orgId).Select(t => new ComboTreeModel
            {
                children = new ComboTreeModel[0],
                id       = t.Id,
                text     = t.Name
            });

            return(Json(items, JsonRequestBehavior.AllowGet));
        }