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 EmployeesRead : 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="EmployeeID">主键</param>
        private void ShowInfo(int EmployeeID){      
            KuGo.Model.Employees model = new KuGo.BLL.EmployeesBLL().GetModel(EmployeeID);
            if(model!=null){
              this.EmployeeIDLabel.Text = model.EmployeeID.ToString();               
              this.LastNameLabel.Text = model.LastName.ToString();               
              this.FirstNameLabel.Text = model.FirstName.ToString();               
              this.TitleLabel.Text = model.Title.ToString();               
              this.TitleOfCourtesyLabel.Text = model.TitleOfCourtesy.ToString();               
              this.BirthDateLabel.Text = model.BirthDate.ToString();               
              this.HireDateLabel.Text = model.HireDate.ToString();               
              this.AddressLabel.Text = model.Address.ToString();               
              this.CityLabel.Text = model.City.ToString();               
              this.RegionLabel.Text = model.Region.ToString();               
              this.PostalCodeLabel.Text = model.PostalCode.ToString();               
              this.CountryLabel.Text = model.Country.ToString();               
              this.HomePhoneLabel.Text = model.HomePhone.ToString();               
              this.ExtensionLabel.Text = model.Extension.ToString();               
              this.PhotoLabel.Text = model.Photo.ToString();               
              this.NotesLabel.Text = model.Notes.ToString();               
              this.ReportsToLabel.Text = model.ReportsTo.ToString();               
              this.PhotoPathLabel.Text = model.PhotoPath.ToString();               
              
            }
        }
    }
  }