예제 #1
0
        private bool DoEdit(int _id)
        {
            bool result = false;

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

            //编写编辑操作Begin
            model.Icon        = txtIcon.Text;
            model.Rule        = txtRule.Text;
            model.Description = txtDescription.Text;
            model.ChildCol    = Convert.ToInt32(txtChildCol.Text);
            model.ParentId    = int.Parse(ddlParentId.SelectedValue);
            model.Show        = int.Parse(rblShow.SelectedValue);
            model.Url         = txtUrl.Text;
            model.Name        = txtName.Text;
            model.SortId      = Convert.ToInt32(txtSortId.Text);
            //编写编辑操作End

            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改管理员:" + model.Name); //记录日志
                result = true;
            }

            return(result);
        }
예제 #2
0
        private void ShowInfo(int _id)
        {
            BLL.Forum_Board   bll   = new BLL.Forum_Board();
            Model.Forum_Board model = bll.GetModel(_id);
            //编写赋值操作Begin

            txtIcon.Text        = model.Icon;
            txtRule.Text        = model.Rule;
            txtDescription.Text = model.Description;
            txtChildCol.Text    = model.ChildCol.ToString();

            ddlParentId.SelectedValue = model.ParentId.ToString();
            rblShow.SelectedValue     = model.Show.ToString();
            txtUrl.Text    = model.Url;
            txtSortId.Text = model.SortId.ToString();
            txtName.Text   = model.Name;


            //编写赋值操作End
        }