Beispiel #1
0
        private void label22_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            frmlogin frm1 = new frmlogin();

            frm1.Visible = true;
        }
Beispiel #2
0
        private void labelback1_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmlogin frm1 = new frmlogin();

            frm1.Show();
        }
Beispiel #3
0
        private void InquireBtn_Click(object sender, EventArgs e)
        {
            Connection conObj = new Connection();

            string connetionString = "Data Source = DESKTOP - VLM6UA1; Initial Catalog = RMS; Integrated Security = True; Connect Timeout = 30";

            using (SqlConnection cnn = new SqlConnection(connetionString))
            {
                string sql = "insert into INQUIRY ([StNo],[firstName], [lastName],[contactNo],[email]) values(@StNo,@first,@last,@contact,@email)";
                conObj.connect();
                using (SqlCommand cmd = new SqlCommand(sql, conObj.connect()))
                {
                    frmlogin frmobj = new frmlogin();
                    cmd.Parameters.AddWithValue("@StNo", lblStNo.Text);
                    cmd.Parameters.AddWithValue("@first", txtFirstName.Text);
                    cmd.Parameters.AddWithValue("@last", txtLastName.Text);
                    cmd.Parameters.AddWithValue("@contact", txtContactNo.Text);
                    cmd.Parameters.AddWithValue("@email", txtEmail.Text);
                    cmd.ExecuteNonQuery();
                    MessageBox.Show("Inquiry Made successfully", "INQUIRY", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }