Esempio n. 1
0
        public Visitor_Profile_usercontrol( )
        {
            // string id,username;
            InitializeComponent();
            Visitor_save_button.Visible = false;
            LogIn_form    log = new LogIn_form();
            SqlConnection con = new SqlConnection("Data Source=DESKTOP-GO15J7J;Initial Catalog=ZooMS;Integrated Security=True");

            con.Open();
            SqlCommand cmd = new SqlCommand("View_Visitor_Profile", con)
            {
                CommandType = CommandType.StoredProcedure
            };

            cmd.Parameters.AddWithValue("Visitor_ID", Program.VisID);
            SqlDataReader readData = cmd.ExecuteReader();

            while (readData.Read())
            {
                Visitor_name_txtbox.Text  = readData["Vis_Name"].ToString();
                Visitor_Email_txtbox.Text = readData["Vis_Email"].ToString();
                Visitor_pass_txtbox.Text  = readData["Vis_Password"].ToString();
            }
            con.Close();
        }
Esempio n. 2
0
        public void Visitor_btn_Click(object sender, EventArgs e)
        {
            LogIn_form openform = new LogIn_form();

            openform.Show();
            Visible = false;
        }