Esempio n. 1
0
        public void Connect()
        {
            if (state == "Admin")
            {
                this.Hide();
                MainForm form = new MainForm();
                form.ShowDialog();
                this.Close();
            }
            if (state == "Customer")
            {
                this.Hide();
                FormCustomer form = new FormCustomer();

                NameString = drsUser[0]["Surname"].ToString() + " " + drsUser[0]["Name"].ToString();
                form.Text = NameString;
                DataPerson= drsUser[0]["Surname"].ToString() + " " + drsUser[0]["Name"].ToString();
                form.ShowDialog();
                this.Close();
            }
            if (state == "Expert")
            {
                this.Hide();
                FormExpert form = new FormExpert();
                NameString = drsUser[0]["Surname"].ToString() + " " + drsUser[0]["Name"].ToString();
                form.Text = NameString;
                form.ShowDialog();
                this.Close();
            }

        }
Esempio n. 2
0
        private void btnReturn_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormCustomer form = new FormCustomer();

            form.ShowDialog();
            this.Close();
        }