Esempio n. 1
0
        private void ShowInfo(int bId)
        {
            this.bClassID.Items.Clear();
            PaducnSoft.DAL.ay_caseclass dal_class = new PaducnSoft.DAL.ay_caseclass();
            DataSet dsClass = dal_class.GetList("");

            this.bClassID.DataTextField  = "bName";
            this.bClassID.DataValueField = "bId";
            this.bClassID.DataSource     = dsClass;
            this.bClassID.DataBind();
            this.bClassID.Items.Insert(0, new ListItem("----选择分类----", "0"));

            PaducnSoft.Model.ay_case model = dal.GetModel(bId);
            this.bId.Value              = model.bId.ToString();
            this.bTitle.Text            = model.bTitle;
            this.bClassID.SelectedValue = model.bClassID.ToString();
            this.bTypeID.SelectedValue  = model.bTypeID.ToString();
            this.bUrl.Text              = model.bUrl;
            this.bKeywords.Text         = model.bKeywords;
            this.bPic.Text              = model.bPic;
            this.bClick.Text            = model.bClick.ToString();
            this.bContent.Text          = Server.HtmlDecode(model.bContent);
            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;
            if (model.bTypeID.ToString() == "1")
            {
                this.pnlTypeID0.Visible = true;
                this.pnlTypeID1.Visible = false;
            }
        }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.ddlbClassID.Items.Clear();
         PaducnSoft.DAL.ay_caseclass dal_class = new PaducnSoft.DAL.ay_caseclass();
         DataSet dsClass = dal_class.GetList("");
         this.ddlbClassID.DataTextField  = "bName";
         this.ddlbClassID.DataValueField = "bId";
         this.ddlbClassID.DataSource     = dsClass;
         this.ddlbClassID.DataBind();
         this.ddlbClassID.Items.Insert(0, new ListItem("--全部分类--", "0"));
         BindDataList();
     }
 }
Esempio n. 3
0
        protected void InitControls()
        {
            this.bTitle.Text = "";
            this.bClassID.Items.Clear();
            PaducnSoft.DAL.ay_caseclass dal_class = new PaducnSoft.DAL.ay_caseclass();
            DataSet dsClass = dal_class.GetList("");

            this.bClassID.DataTextField  = "bName";
            this.bClassID.DataValueField = "bId";
            this.bClassID.DataSource     = dsClass;
            this.bClassID.DataBind();
            this.bClassID.Items.Insert(0, new ListItem("----选择分类----", "0"));
            this.bTypeID.SelectedValue = "0";
            this.bUrl.Text             = "";
            this.bKeywords.Text        = "";
            this.bPic.Text             = "";
            this.bIsTop.Checked        = false;
            this.bIsBest.Checked       = false;
            this.bIsPass.Checked       = true;
            this.bClick.Text           = "0";
            this.bContent.Text         = "";
            ScriptManager1.SetFocus(this.bTitle);
        }