Exemplo n.º 1
0
        private void cmdCreateTemplate_Click(object sender, EventArgs e)
        {
            var clientApi = new CloonyClient();

            clientApi.Login();
            clientApi.GetOrgSet();
            clientApi.GetOrgInfo();

            //clientApi.CreateAssignmentTemplate();
        }
Exemplo n.º 2
0
        private void cmdGetTimeLine_Click(object sender, EventArgs e)
        {
            string clientCode = "TEST001";

            var clientApi = new CloonyClient();

            clientApi.Login();
            clientApi.GetOrgSet();
            clientApi.GetOrgInfo();

            var clientList = clientApi.GetClientList(clientCode);

            var client = clientList.Data.FirstOrDefault(c => c.contactCode != null && c.contactCode == clientCode);

            var timeline = clientApi.GetTimeline(client.contactId);

            var step = timeline.timeline.FirstOrDefault(s => s.taskState == "0");

            if (step != null)
            {
                clientApi.UpdateStep(step);
            }
        }