예제 #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()));
        }
        public ActionResult Pull(string existingCallId)
        {
            var response = new PullResponseBuilder(this.AllorsUser);

            var me = (Person)this.AllorsUser;

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

            var existingCall = this.AllorsSession.Instantiate(existingCallId);

            response.AddObject("existingCall", existingCall, M.Call.MainTree);

            return(this.JsonSuccess(response.Build()));
        }
예제 #3
0
        public ActionResult Pull()
        {
            var response = new PullResponseBuilder(this.AllorsUser);

            response.AddObject("person", this.AllorsUser);
            return(this.JsonSuccess(response.Build()));
        }
예제 #4
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 ActionResult Pull()
        {
            var response     = new PullResponseBuilder(this.AllorsUser);
            var organisation = new Organisations(this.AllorsSession).FindBy(M.Organisation.Owner, this.AllorsUser);

            response.AddObject("root", organisation, M.Organisation.AngularShareholders);
            return(this.JsonSuccess(response.Build()));
        }
예제 #6
0
        public IActionResult Pull()
        {
            var response     = new PullResponseBuilder(this.Session.GetUser());
            var organisation = new Organisations(this.Session).FindBy(M.Organisation.Owner, this.Session.GetUser());

            response.AddObject("root", organisation, M.Organisation.AngularEmployees);
            return(this.Ok(response.Build()));
        }
예제 #7
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()));
        }
예제 #8
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()));
        }
        public IActionResult Pull()
        {
            var acls         = new WorkspaceAccessControlLists(this.Session.GetUser());
            var response     = new PullResponseBuilder(acls, this.TreeService);
            var organisation = new Organisations(this.Session).FindBy(M.Organisation.Owner, this.Session.GetUser());

            response.AddObject("root", organisation, M.Organisation.AngularShareholders);
            return(this.Ok(response.Build()));
        }
예제 #10
0
        public ActionResult Pull(string id)
        {
            var response = new PullResponseBuilder(this.AllorsUser);

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

            response.AddObject("person", person, tree);

            return(this.JsonSuccess(response.Build()));
        }
예제 #11
0
        public IActionResult Pull([FromBody] Model model)
        {
            var response = new PullResponseBuilder(this.allors.Session.GetUser());

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

            response.AddObject("person", person);

            return(this.Ok(response.Build()));
        }
예제 #12
0
        public IActionResult Pull([FromBody] Model model)
        {
            var acls     = new WorkspaceAccessControlLists(this.allors.Session.GetUser());
            var response = new PullResponseBuilder(acls, this.TreeService);

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

            response.AddObject("person", person);

            return(this.Ok(response.Build()));
        }
예제 #13
0
        public async Task <IActionResult> Pull([FromBody] TestUnitSamplesParams @params)
        {
            try
            {
                var unitSample = new UnitSamples(this.Session).Extent().First;
                if (unitSample == null)
                {
                    unitSample = new UnitSampleBuilder(this.Session).Build();
                    this.Session.Commit();
                }

                var acls            = new WorkspaceAccessControlLists(this.Session.GetUser());
                var responseBuilder = new PullResponseBuilder(acls, this.TreeService);

                switch (@params.Step)
                {
                case 0:
                    unitSample.RemoveAllorsBinary();
                    unitSample.RemoveAllorsBoolean();
                    unitSample.RemoveAllorsDateTime();
                    unitSample.RemoveAllorsDecimal();
                    unitSample.RemoveAllorsDouble();
                    unitSample.RemoveAllorsInteger();
                    unitSample.RemoveAllorsString();
                    unitSample.RemoveAllorsUnique();

                    break;

                case 1:
                    unitSample.AllorsBinary   = new byte[] { 1, 2, 3 };
                    unitSample.AllorsBoolean  = true;
                    unitSample.AllorsDateTime = new DateTime(1973, 3, 27, 0, 0, 0, DateTimeKind.Utc);
                    unitSample.AllorsDecimal  = 12.34m;
                    unitSample.AllorsDouble   = 123d;
                    unitSample.AllorsInteger  = 1000;
                    unitSample.AllorsString   = "a string";
                    unitSample.AllorsUnique   = new Guid("2946CF37-71BE-4681-8FE6-D0024D59BEFF");

                    break;
                }

                this.Session.Commit();

                responseBuilder.AddObject("unitSample", unitSample);
                var pullResponse = responseBuilder.Build();

                return(this.Ok(pullResponse));
            }
            catch (Exception e)
            {
                return(this.BadRequest(e.Message));
            }
        }
예제 #14
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()));
        }
예제 #15
0
        public ActionResult Pull(int step)
        {
            try
            {
                var unitSample = new UnitSamples(this.AllorsSession).Extent().First;
                if (unitSample == null)
                {
                    unitSample = new UnitSampleBuilder(this.AllorsSession).Build();
                    this.AllorsSession.Commit();
                }

                var responseBuilder = new PullResponseBuilder(this.AllorsUser);

                switch (step)
                {
                case 0:
                    unitSample.RemoveAllorsBinary();
                    unitSample.RemoveAllorsBoolean();
                    unitSample.RemoveAllorsDateTime();
                    unitSample.RemoveAllorsDecimal();
                    unitSample.RemoveAllorsDouble();
                    unitSample.RemoveAllorsInteger();
                    unitSample.RemoveAllorsString();
                    unitSample.RemoveAllorsUnique();

                    break;

                case 1:
                    unitSample.AllorsBinary   = new byte[] { 1, 2, 3 };
                    unitSample.AllorsBoolean  = true;
                    unitSample.AllorsDateTime = new DateTime(1973, 3, 27, 0, 0, 0, DateTimeKind.Utc);
                    unitSample.AllorsDecimal  = 12.34m;
                    unitSample.AllorsDouble   = 123d;
                    unitSample.AllorsInteger  = 1000;
                    unitSample.AllorsString   = "a string";
                    unitSample.AllorsUnique   = new Guid("2946CF37-71BE-4681-8FE6-D0024D59BEFF");

                    break;
                }

                this.AllorsSession.Commit();

                responseBuilder.AddObject("unitSample", unitSample);

                return(this.JsonSuccess(responseBuilder.Build()));
            }
            catch (Exception e)
            {
                return(this.JsonError(e.Message));
            }
        }
예제 #16
0
 public IActionResult Pull()
 {
     try
     {
         var response     = new PullResponseBuilder(this.Session.GetUser());
         var organisation = new Organisations(this.Session).FindBy(M.Organisation.Owner, this.Session.GetUser());
         response.AddObject("root", organisation, M.Organisation.AngularShareholders);
         return(this.Ok(response.Build()));
     }
     catch (Exception e)
     {
         return(this.BadRequest(e.Message));
     }
 }
예제 #17
0
        public ActionResult Pull()
        {
            var user            = (Person)this.allors.Session.GetUser();
            var responseBuilder = new PullResponseBuilder(user, this.treeService);

            var userTree = new Node[]
            {
                new Node(M.Person.Addresses),
            };

            responseBuilder.AddObject("user", user, userTree);

            return(this.Ok(responseBuilder.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()));
        }