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(); } }
private void btnReturn_Click(object sender, EventArgs e) { this.Hide(); FormExpert form = new FormExpert(); form.ShowDialog(); this.Close(); }