Beispiel #1
0
        //[AuthCheck(Module = WebModule.Bim, Right = SystemRight.Add)]
        public ActionResult AddCustom(string externalId, string propertyKey, string propertyValue)
        {
            Result <int> result = new Result <int>();

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                var bim = proxy.GetBimModel(externalId.Split('_')[0].ToLongReq());

                EPM_CustomProperty model = new EPM_CustomProperty();
                model.externalId    = externalId.Split('_')[1];
                model.BimId         = externalId.Split('_')[0].ToLongReq();
                model.PropertyKey   = propertyKey;
                model.PropertyValue = propertyValue;
                model.PropertyType  = "custom";
                model.ProjectId     = bim.Data.ProjectId;
                model.ProjectName   = bim.Data.ProjectName;
                model.IsDelete      = false;
                result = proxy.AddCustomProperty(model);
            }
            return(Json(result.ToResultView()));
        }