Beispiel #1
0
        public IHttpActionResult NewSystemUserExternal(MultiDataModel dataModel)
        {
            BoardSystemUserExternal data = JsonConvert.DeserializeObject <BoardSystemUserExternal>(dataModel.String1);
            var result = SystemUserBL.AddSystemUserExternal(data.EntityPerson, data.EntityProfessional, data.EntitySystemUser, data.ListEntityProtocolSystemUser, dataModel.Int1, dataModel.Int2);

            return(Ok(result));
        }
Beispiel #2
0
        public JsonResult NewSystemUserExternal(BoardSystemUserExternal data)
        {
            Api API = new Api();

            data.EntitySystemUser.i_SystemUserId = data.EntitySystemUser.i_SystemUserId == null ? -1 : data.EntitySystemUser.i_SystemUserId;
            Dictionary <string, string> arg = new Dictionary <string, string>()
            {
                { "String1", JsonConvert.SerializeObject(data) },
                { "Int1", ViewBag.USER.SystemUserId.ToString() },
                { "Int2", ViewBag.USER.NodeId.ToString() },
            };

            var result = API.Post <MessageCustom>("SystemUser/NewSystemUserExternal", arg);

            return(new JsonResult {
                Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }