Exemple #1
0
        private void customerInformationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            panel1.Controls.Clear();
            frmCusInfo frm = new frmCusInfo(cusID);

            frm.TopLevel = false;
            panel1.Controls.Add(frm);
            frm.Show();
        }
Exemple #2
0
        private void frmParent_Load(object sender, EventArgs e)
        {
            SqlConnection conn = LaundryServiceConn.GetConnection();
            SqlCommand    scmd = new SqlCommand("select * from customer where [CUS_ID]=@cusId", conn);

            scmd.Parameters.Clear();
            scmd.Parameters.AddWithValue("@cusId", cusID);
            conn.Open();
            SqlDataReader reader = null;

            reader = scmd.ExecuteReader();
            while (reader.Read())
            {
                this.Text = "Customer : " + reader["CUS_NAME"].ToString();
            }
            conn.Close();
            panel1.Controls.Clear();
            frmCusInfo frm = new frmCusInfo(cusID);

            frm.TopLevel = false;
            panel1.Controls.Add(frm);
            frm.Show();
        }