コード例 #1
0
        public IActionResult Pull([FromBody] Model model)
        {
            var acls     = new WorkspaceAccessControlLists(this.allors.Session.GetUser());
            var response = new PullResponseBuilder(acls, this.TreeService);

            var organisationContactRelationship = (OrganisationContactRelationship)this.allors.Session.Instantiate(model.Id);

            response.AddObject("organisationContactRelationship", organisationContactRelationship);

            response.AddObject("contact", organisationContactRelationship.Contact);

            var locales = new Locales(this.allors.Session).Extent();

            response.AddCollection("locales", locales);

            var genders = new GenderTypes(this.allors.Session).Extent();

            response.AddCollection("genders", genders);

            var salutations = new Salutations(this.allors.Session).Extent();

            response.AddCollection("salutations", salutations);

            var contactKinds = new OrganisationContactKinds(this.allors.Session).Extent();

            response.AddCollection("organisationContactKinds", contactKinds);

            return(this.Ok(response.Build()));
        }
コード例 #2
0
        public async Task <IActionResult> Pull()
        {
            var response = new PullResponseBuilder(this.Session.GetUser());
            var people   = new People(this.Session).Extent().ToArray();

            response.AddCollection("people", people);
            return(this.Ok(response.Build()));
        }
コード例 #3
0
        public ActionResult Pull()
        {
            var response = new PullResponseBuilder(this.AllorsUser);

            response.AddObject("object", this.AllorsUser);
            response.AddCollection("collection", new Organisations(this.AllorsSession).Extent());
            return(this.JsonSuccess(response.Build()));
        }
コード例 #4
0
        public async Task <IActionResult> Pull()
        {
            var acls     = new WorkspaceAccessControlLists(this.Session.GetUser());
            var response = new PullResponseBuilder(acls, this.TreeService);
            var people   = new People(this.Session).Extent().ToArray();

            response.AddCollection("people", people);
            return(this.Ok(response.Build()));
        }
コード例 #5
0
        public IActionResult Pull()
        {
            var user     = this.Session.GetUser();
            var response = new PullResponseBuilder(user);

            response.AddObject("object", user);
            response.AddCollection("collection", new Organisations(this.Session).Extent());
            return(this.Ok(response.Build()));
        }
コード例 #6
0
        public IActionResult Pull()
        {
            var acls     = new WorkspaceAccessControlLists(this.Session.GetUser());
            var response = new PullResponseBuilder(acls, this.TreeService);

            response.AddObject("object", acls.User);
            response.AddCollection("collection", new Organisations(this.Session).Extent());
            return(this.Ok(response.Build()));
        }
コード例 #7
0
        public ActionResult Pull()
        {
            var reponse = new PullResponseBuilder(this.AllorsUser);

            var people = new People(this.AllorsSession).Extent();

            reponse.AddCollection("people", people);

            return(this.JsonSuccess(reponse.Build()));
        }
コード例 #8
0
        public ActionResult Pull()
        {
            var response = new PullResponseBuilder(this.AllorsUser);

            var organisations = new Organisations(this.AllorsSession).Extent();

            response.AddCollection("organisations", organisations);

            return(this.JsonSuccess(response.Build()));
        }
コード例 #9
0
        public ActionResult Pull(string criteria)
        {
            var response = new PullResponseBuilder(this.AllorsUser);

            var persons = new People(this.AllorsSession).Extent();

            persons.Filter.AddLike(M.Person.UserName.RoleType, criteria + "%");

            response.AddCollection("results", persons.Take(100));

            return(this.JsonSuccess(response.Build()));
        }
コード例 #10
0
        public ActionResult Pull(string id)
        {
            var response = new PullResponseBuilder(this.AllorsUser);

            var organisation = this.AllorsSession.Instantiate(id);

            response.AddObject("organisation", organisation, Tree);

            response.AddCollection("people", new People(this.AllorsSession).Extent(), PeopleTree);

            return(this.JsonSuccess(response.Build()));
        }
コード例 #11
0
        public ActionResult Pull(string criteria)
        {
            var response = new PullResponseBuilder(this.AllorsUser);

            var people = new People(this.AllorsSession).Extent();
            var or     = people.Filter.AddOr();

            or.AddLike(M.Person.LastName, criteria + "%");
            or.AddLike(M.Person.FirstName, criteria + "%");

            response.AddCollection("results", people.Take(100));

            return(this.JsonSuccess(response.Build()));
        }
コード例 #12
0
        public JsonResult Pull()
        {
            var response = new PullResponseBuilder(this.AllorsUser);

            var me = (Person)this.AllorsUser;

            response.AddObject("me", me, M.Person.AppHomeTree);

            var onlinePeople = new People(this.AllorsSession).Extent();

            onlinePeople.Filter.AddEquals(M.Person.IsOnline, true);
            response.AddCollection("onlinePeople", onlinePeople);

            return(this.JsonSuccess(response.Build()));
        }