Ejemplo n.º 1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitData()
        {
            DataTable dtDic = dictManager.GetDict();

            if (dtDic.Rows.Count > 0)
            {
                ////网点马厩绑定
                drpDic.DataSource     = dtDic;
                drpDic.DataTextField  = "Name";
                drpDic.DataValueField = "ID";
                drpDic.DataBind();
                drpDic.Items.Insert(0, new ListItem("--------请选择--------", "-1"));
            }


            Hashtable ht = dictManager.GetDicItemByID(_key);

            if (ht.Count > 0 && ht != null)
            {
                this.txtName.Text      = ht["NAME"].ToString();
                this.txtCityCode.Text  = ht["CITYCODE"].ToString();
                this.txtZipCode.Text   = ht["ZIPCODE"].ToString();
                this.txtLongitude.Text = ht["LONGITUDE"].ToString();
                this.txtLatitude.Text  = ht["LATITUDE"].ToString();
                this.txtRemark.Text    = ht["REMARK"].ToString();

                if (ht["DELETEMARK"].ToString().Equals("1"))
                {
                    this.radOK.Checked = true;
                    this.radNo.Checked = false;
                }
                else
                {
                    this.radOK.Checked = false;
                    this.radNo.Checked = true;
                }
                this.txtSort.Text         = ht["SORT"].ToString();
                this.drpDic.SelectedValue = ht["DICTID"].ToString();
            }
        }