Beispiel #1
0
        private void ShowInfo(int _id)
        {
            BLL.article_nav_BLL bll   = new BLL.article_nav_BLL();
            Model.article_nav   model = bll.GetModel(_id);
            txtNavTitle.Text         = model.n_title;
            rblIsState.SelectedValue = model.n_state.ToString();
            txtNavSequence.Text      = model.n_sequence.ToString();
            txtNavUrl.Text           = model.n_url;

            txtNavDesc.Text = model.n_desc;
        }
Beispiel #2
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page             = DTRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            BLL.article_nav_BLL bll = new BLL.article_nav_BLL();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();
            //綁定頁碼
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("nav_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Beispiel #3
0
        private bool DoAdd()
        {
            bool result = true;

            Model.article_nav   model = new Model.article_nav();
            BLL.article_nav_BLL bll   = new BLL.article_nav_BLL();

            model.n_state    = int.Parse(rblIsState.SelectedValue);
            model.n_title    = txtNavTitle.Text.Trim();
            model.n_sequence = int.Parse(txtNavSequence.Text.Trim());
            model.n_url      = txtNavUrl.Text.Trim();
            model.n_desc     = txtNavDesc.Text.Trim();


            if (bll.Add(model) < 1)
            {
                result = false;
            }
            return(result);
        }
Beispiel #4
0
        private bool DoEdit(int _id)
        {
            bool result = true;

            BLL.article_nav_BLL bll   = new BLL.article_nav_BLL();
            Model.article_nav   model = bll.GetModel(_id);



            model.n_state = int.Parse(rblIsState.SelectedValue);

            model.n_title    = txtNavTitle.Text.Trim();
            model.n_url      = txtNavUrl.Text.Trim();
            model.n_sequence = int.Parse(txtNavSequence.Text.Trim());
            model.n_desc     = txtNavDesc.Text;
            if (!bll.Update(model))
            {
                result = false;
            }

            return(result);
        }