Пример #1
0
        private bool DoEdit(int _id)
        {
            bool result = false;

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

            //编写编辑操作Begin

            model.ViewIpField         = Convert.ToInt32(txtViewIpField.Text);
            model.AttachmentExtension = txtAttachmentExtension.Text;
            model.DayAttachmentSize   = Convert.ToInt32(txtDayAttachmentSize.Text);
            model.PostIntervalSecond  = Convert.ToInt32(txtPostIntervalSecond.Text);
            model.Search     = Convert.ToInt32(rblSearch.SelectedValue);
            model.MemberList = Convert.ToInt32(rblMemberList.SelectedValue);
            model.PostCheck  = Convert.ToInt32(ddlPostCheck.SelectedValue);

            model.Cost          = Convert.ToInt32(rblCost.SelectedValue);
            model.CostMax       = Convert.ToDecimal(txtCostMax.Text);
            model.PostUpdateLog = Convert.ToInt32(ddlPostUpdateLog.SelectedValue);
            //编写编辑操作End

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

            return(result);
        }
Пример #2
0
        private void ShowInfo(int _id)
        {
            BLL.Forum_GroupExtended   bll   = new BLL.Forum_GroupExtended();
            Model.Forum_GroupExtended model = bll.GetModel(_id);
            //编写赋值操作Begin

            txtViewIpField.Text         = model.ViewIpField.ToString();
            txtAttachmentExtension.Text = model.AttachmentExtension;
            txtDayAttachmentSize.Text   = model.DayAttachmentSize.ToString();
            txtPostIntervalSecond.Text  = model.PostIntervalSecond.ToString();
            rblSearch.SelectedValue     = model.Search.ToString();
            rblMemberList.SelectedValue = model.MemberList.ToString();
            ddlPostCheck.SelectedValue  = model.PostCheck.ToString();
            rblCost.SelectedValue       = model.Cost.ToString();
            txtCostMax.Text             = model.CostMax.ToString();
            ddlPostUpdateLog.Text       = model.PostUpdateLog.ToString();

            //编写赋值操作End
        }