Example #1
0
 private void fillListBoxProcess(Model.Entity.ProcessDefinitions processDefinitionsList)
 {
     foreach (var each in processDefinitionsList.data)
     {
         this.listBoxProcess.Items.Add(each);
     }
 }
Example #2
0
        private void buttonSubmit_Click(object sender, EventArgs e)
        {
            Model.RestApp                   restApp                = null;
            Model.DAO.ProcessDAO            processDAO             = null;
            Model.Entity.ProcessDefinitions processDefinitionsList = null;

            if (!textBoxUsername.Text.Equals("") || !textBoxPassword.Text.Equals(""))
            {
                restApp = new Model.RestApp(textBoxUsername.Text, textBoxPassword.Text);
            }

            if (restApp != null)
            {
                processDAO = new Model.DAO.ProcessDAO(restApp);
            }

            if (processDAO != null)
            {
                processDefinitionsList = processDAO.getProcessDefinitions();
            }

            if (processDefinitionsList != null)
            {
                Console.WriteLine("Good");
                ProcessDefForm processForm = new ProcessDefForm(restApp, processDefinitionsList);
                processForm.Show();

                this.Hide();
            }
            else
            {
                Console.WriteLine("Wrong Username or Password");
            }
        }
Example #3
0
        public ProcessDefForm(Model.RestApp restApp, Model.Entity.ProcessDefinitions processDefinitionsList)
        {
            InitializeComponent();

            this.restApp = restApp;

            fillListBoxProcess(processDefinitionsList);
        }