using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace KuGo.Web.Admin
{
        public partial class OrdersRead : Page
        {
            
            protected void Page_Load(object sender, EventArgs e){
            if (!Page.IsPostBack){
              if (Request.Params["id"] != null && Request.Params["id"].Trim() != ""){
                string strId = Request.Params["id"];
                
                int id = Convert.ToInt32(strId);
                                   
                ShowInfo(id);
              }
            }
        }

        /// <summary>
        /// 显示一条 数据
        /// </summary>
        /// <param name="OrderID">主键</param>
        private void ShowInfo(int OrderID){      
            KuGo.Model.Orders model = new KuGo.BLL.OrdersBLL().GetModel(OrderID);
            if(model!=null){
              this.OrderIDLabel.Text = model.OrderID.ToString();               
              this.CustomerIDLabel.Text = model.CustomerID.ToString();               
              this.EmployeeIDLabel.Text = model.EmployeeID.ToString();               
              this.OrderDateLabel.Text = model.OrderDate.ToString();               
              this.RequiredDateLabel.Text = model.RequiredDate.ToString();               
              this.ShippedDateLabel.Text = model.ShippedDate.ToString();               
              this.ShipViaLabel.Text = model.ShipVia.ToString();               
              this.FreightLabel.Text = model.Freight.ToString();               
              this.ShipNameLabel.Text = model.ShipName.ToString();               
              this.ShipAddressLabel.Text = model.ShipAddress.ToString();               
              this.ShipCityLabel.Text = model.ShipCity.ToString();               
              this.ShipRegionLabel.Text = model.ShipRegion.ToString();               
              this.ShipPostalCodeLabel.Text = model.ShipPostalCode.ToString();               
              this.ShipCountryLabel.Text = model.ShipCountry.ToString();               
              
            }
        }
    }
  }