Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            OrderSlip os = new OrderSlip();

            os.FormClosed += new FormClosedEventHandler(FormClosed);
            os.Show();
            this.Hide();
        }
Example #2
0
        public ViewOrder(OrderSlip ss)
        {
            InitializeComponent();

            toRevise = ss;

            string dbHost = "localhost"; //資料庫位址
            string dbPort = "3306";      //資料庫的port
            string dbUser = "******";      //資料庫使用者帳號
            string dbPass = "******";      //資料庫使用者密碼
            string dbName = "Seminar";   //資料庫名稱

            string connStr = "server=" + dbHost + ";port=" + dbPort + ";uid=" + dbUser + ";pwd=" + dbPass + ";database=" + dbName;

            conn    = new MySqlConnection(connStr);
            command = conn.CreateCommand();
        }