Beispiel #1
0
        private bool DoAdd()
        {
            Model.Forum_GroupExtended model = new Model.Forum_GroupExtended();
            BLL.Forum_GroupExtended   bll   = new BLL.Forum_GroupExtended();
            //编写添加操作Begin
            //model.GroupId = txtGroupId.Text;
            //model.ViewIpField = txtViewIpField.Text;
            //model.AttachmentExtension = txtAttachmentExtension.Text;
            //model.DayAttachmentSize = txtDayAttachmentSize.Text;
            //model.PostIntervalSecond = txtPostIntervalSecond.Text;
            //model.Search = txtSearch.Text;
            //model.MemberList = txtMemberList.Text;
            //model.PostCheck = txtPostCheck.Text;
            //model.Cost = txtCost.Text;
            //model.CostMax = txtCostMax.Text;
            //model.PostUpdateLog = txtPostUpdateLog.Text;
            //编写添加操作End

            //if (bll.Add(model) > 0)
            //{
            //    AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加dt_Forum_GroupExtended:"
            //        + model.user_name); //记录日志
            //    return true;
            //}
            return(false);
        }
Beispiel #2
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);
        }
Beispiel #3
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
        }