コード例 #1
0
        protected void cmdOrder_Click(object sender, System.EventArgs e)
        {
            this.CustomerPanel.Visible    = true;
            this.NonCustomerPanel.Visible = true;

            // 고객코드 받기
            string strOrderID  = this.txtOrderID.Text;
            string strPassword = this.txtPassword.Text;

            // 주문 클래스의 인스턴스 생성
            OrdersDB orderHistory = new OrdersDB();

            // 주문 내역 출력
            MyList.DataSource = orderHistory.GetNonCustomerOrders(strOrderID, strPassword);
            MyList.DataBind();

            // 주문 내역이 없을시
            if (MyList.Items.Count == 0)
            {
                MyError.Text   = "주문 내역이 없습니다.";
                MyList.Visible = false;
            }
        }