Esempio n. 1
0
        private void signOutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Login_page n = new Login_page();

            n.MdiParent = this;
            n.Show();
            this.Close();
        }
Esempio n. 2
0
        private void linkLabel1_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Login_page n = new Login_page();

            n.Show();
            this.Close();
            Lib_home lib = new Lib_home();

            lib.Close();
        }
Esempio n. 3
0
        private void up_Load(object sender, EventArgs e)
        {
            Login_page ob = new Login_page();

            con.Open();
            SqlCommand cmd1 = new SqlCommand("select U_pic from user_table where U_name=@U_name", con);

            cmd1.Parameters.Add("@U_name", SqlDbType.NVarChar, 50).Value = d;
            SqlDataReader dr1 = cmd1.ExecuteReader();
            string        url;

            if (dr1.HasRows)
            {
                dr1.Read();
                try
                {
                    url = dr1.GetValue(0).ToString();
                    ad_pic.BackgroundImage = Image.FromFile(url);
                    //this is for adding initial address in ad_pic
                }
                catch
                {
                }
                cmd1.Dispose();
                dr1.Dispose();
                SqlCommand cmd = new SqlCommand("select * from user_table where U_name=@U_name", con);
                cmd.Parameters.Add("@U_name", SqlDbType.NVarChar, 50).Value = d;

                SqlDataReader dr = cmd.ExecuteReader();
                if (dr.HasRows)
                {
                    dr.Read();
                    textBox5.Text     = dr.GetValue(1).ToString();
                    textBox4.Text     = dr.GetValue(2).ToString();
                    textBox1.Text     = dr.GetValue(4).ToString();
                    richTextBox1.Text = dr.GetValue(5).ToString();
                    textBox6.Text     = dr.GetValue(6).ToString();
                    textBox7.Text     = dr.GetValue(7).ToString();
                    textBox8.Text     = dr.GetValue(8).ToString();
                    textBox3.Text     = dr.GetValue(9).ToString();
                    textBox2.Text     = dr.GetValue(10).ToString();
                    //customeremail.Text = dr.GetValue(11).ToString();
                }
                cmd.Dispose();
                dr.Dispose();
                con.Close();
                //SqlCommand cmd = new SqlCommand("
            }
        }