protected void Page_Load(object sender, System.EventArgs e)
    {
        // 在此处放置用户代码以初始化页面
        if (!Page.IsPostBack)
        {
            #region 获取页面参数
            ViewState["ID"] = Request.QueryString["ID"] != null ? int.Parse(Request.QueryString["ID"]) : 0;
            #endregion

            BindDropDown();

            if ((int)ViewState["ID"] != 0)
            {
                //修改
                BindData();
            }
            else
            {
                //新增
                ViewState["ClientID"] = 0;

                CM_WareHouse m = new CM_WareHouse();
                m.ActiveState = 1;
                m.Client = (int)Session["OwnerClient"];

                CM_Client c = new CM_ClientBLL(m.Client).Model;
                if (c != null)
                {
                    m.OfficialCity = c.OfficialCity;
                    m.Address = c.Address;
                    m.TeleNum = c.TeleNum;
                }

                pl_detail.BindData(m);
            }
        }
    }
 public WareHouse(CM_WareHouse m)
 {
     ID = m.ID;
     Code = m.Code;
     Name = m.Name;
     TeleNum = m.TeleNum;
     Address = m.Address;
     Keeper = m.Keeper;
     Mobile = m.Mobile;
     Classify = m.Classify;
 }