Example #1
0
 private void InitData()
 {
     ad = ds.GetModel(id);
     if (null != ad)
     {
         ddlType.SelectedValue = ad.Type.ToString();
         txtTitle.Text         = ad.Title;
         string[] pics = ad.Pics.Split('|');
         txtPic1.Text = (pics.Length > 0) ? pics[0] : "";
         txtPic2.Text = (pics.Length > 1) ? pics[1] : "";
         string[] urls = ad.Urls.Split('|');
         txtUrl1.Text       = (urls.Length > 0) ? urls[0] : "";
         txtUrl2.Text       = (urls.Length > 1) ? urls[1] : "";
         txtMemo.Text       = ad.Remark;
         chkEnabled.Enabled = (ad.IsEnabled.Value == 1) ? true : false;
     }
 }