示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         PaducnSoft.DAL.ay_prodclass dal_class = new PaducnSoft.DAL.ay_prodclass();
         DataSet          ds        = dal_class.GetList("");
         DropDownListHelp ddlHelper = new DropDownListHelp();
         this.ddlbClassID.Items.Clear();
         ddlHelper.createDropDownTree(ds.Tables[0], "bParent", "0", "bId", "bName", "bId", this.ddlbClassID);
         this.ddlbClassID.Items.Insert(0, new ListItem("--全部分类--", "0"));
         BindDataList();
     }
 }
示例#2
0
        protected void InitControls()
        {
            this.bTitle.Text = "";

            PaducnSoft.DAL.ay_prodclass dal_class = new PaducnSoft.DAL.ay_prodclass();
            DataSet          ds        = dal_class.GetList("");
            DropDownListHelp ddlHelper = new DropDownListHelp();

            this.bClassID.Items.Clear();
            ddlHelper.createDropDownTree(ds.Tables[0], "bParent", "0", "bId", "bName", "bId", this.bClassID);
            this.bClassID.Items.Insert(0, new ListItem("----选择分类----", "0"));
            this.bKeywords.Text  = "";
            this.bPic.Text       = "";
            this.bIsNew.Checked  = false;
            this.bIsTop.Checked  = false;
            this.bIsBest.Checked = false;
            this.bIsPass.Checked = true;
            this.bClick.Text     = "0";
            this.bContent.Text   = "";
            ScriptManager1.SetFocus(this.bTitle);
        }
示例#3
0
        private void ShowInfo(int bId)
        {
            PaducnSoft.DAL.ay_prodclass dal_class = new PaducnSoft.DAL.ay_prodclass();
            DataSet          ds        = dal_class.GetList("");
            DropDownListHelp ddlHelper = new DropDownListHelp();

            this.bClassID.Items.Clear();
            ddlHelper.createDropDownTree(ds.Tables[0], "bParent", "0", "bId", "bName", "bId", this.bClassID);
            this.bClassID.Items.Insert(0, new ListItem("----选择分类----", "0"));

            PaducnSoft.Model.ay_products model = dal.GetModel(bId);
            this.bId.Value              = model.bId.ToString();
            this.bTitle.Text            = model.bTitle;
            this.bClassID.SelectedValue = model.bClassID.ToString();
            this.bKeywords.Text         = model.bKeywords;
            this.bPic.Text              = model.bPic;
            this.bClick.Text            = model.bClick.ToString();
            this.bContent.Text          = Server.HtmlDecode(model.bContent);
            this.bIsNew.Checked         = model.bIsNew.ToString() == "1" ? true : false;
            this.bIsTop.Checked         = model.bIsTop.ToString() == "1" ? true : false;
            this.bIsBest.Checked        = model.bIsBest.ToString() == "1" ? true : false;
            this.bIsPass.Checked        = model.bIsPass.ToString() == "1" ? true : false;
        }