示例#1
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            SignUp_Page sign = new SignUp_Page();

            sign.Show();
            linkLabel1.LinkVisited = true;
        }
示例#2
0
 public void Insert(TextBox name, TextBox adress, TextBox email, TextBox user, TextBox password, Label date)
 {
     ctrl(user);
     if (state == true)
     {
         SqlCommand komut = new SqlCommand("Insert into Customer (Name,Adress,Email,Username,Password,Register_Time) Values(@name,@address,@email,@user, @pass,@time)", baglan);
         komut.Parameters.AddWithValue("@name", name.Text);
         komut.Parameters.AddWithValue("@address", adress.Text);
         komut.Parameters.AddWithValue("@email", email.Text);
         komut.Parameters.AddWithValue("@User", user.Text);
         komut.Parameters.AddWithValue("@pass", password.Text.ToString());
         komut.Parameters.AddWithValue("@time", Convert.ToDateTime(date.Text));
         if (baglan.State == System.Data.ConnectionState.Closed)
         {
             baglan.Open();
         }
         komut.ExecuteNonQuery();
         baglan.Close();
         MessageBox.Show("Successful Registration");
         name.Text     = "";
         adress.Text   = "";
         email.Text    = "";
         user.Text     = "";
         password.Text = "";
         Customer_Page cstmr = new Customer_Page();
         cstmr.Show();
         SignUp_Page sign = new SignUp_Page();
         sign.Hide();
     }
     else
     {
         MessageBox.Show("There is another user with the same username", "Warning !", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         baglan.Close();
     }
 }