Esempio n. 1
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");
            }
        }
Esempio n. 2
0
        public ProcessForm(Model.RestApp restApp, Model.Entity.ProcessDefinition processDefinition)
        {
            InitializeComponent();

            this.restApp           = restApp;
            this.processDAO        = new Model.DAO.ProcessDAO(restApp);
            this.processDefinition = processDefinition;

            fillListBoxProcess();
        }