示例#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()));
        }
        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()));
        }
        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()));
        }
        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()));
        }