我的后台管理页2

操作员列表

公告管理
ID 标题 添加时间 选择
<%# Eval("ID") %>  <%# Eval("Title") %> <%# Eval("AddTime") %> " />
/***********************************************全局***********************************************/ BODY { font: 12px Tahoma, Verdana; background:#FFFFFF; width:98%; margin: 0 auto; } p { margin:3px; } .Button { border:solid 1px #87A3C1; margin:1px; background:#FFFFFF url('../Images/button_bg.gif'); line-height:18px; height:21px; font-size:12px; padding:1px } body, table, input, select{font: 12px Tahoma, Verdana;line-height : normal;} /***********************************************全局***********************************************/ .ContentFont{ font: 15px Tahoma, Verdana; } /**************************************************超链接**************************************************/ A:link { TEXT-DECORATION: none; COLOR: #000000 } A:visited { TEXT-DECORATION: none; COLOR: #000000 } A:hover { TEXT-DECORATION: none; COLOR: #FF0000 } /**************************************************超链接**************************************************/ /***********************************************TABLE表格布局***********************************************/ /**Table边式样**/ .Normal_Table { border:#A8C5E4 1px solid; } /**论坛位置导航栏**/ .Table_Lead { background-image: url('table_lead.gif'); color : #6E6E6E; font-weight:bold } .Table_Lead A:link { TEXT-DECORATION: none; COLOR: #6E6E6E; } .Table_Lead A:visited { TEXT-DECORATION: none; COLOR: #6E6E6E; } .Table_Lead A:hover { TEXT-DECORATION: none; COLOR: #FF0000 } /**顶部深色,粗体字**/ .Table_Title { background-color : #68A6E4; color : #FFFFFF; font-weight:bold; } .Table_Title A:link { TEXT-DECORATION: none; COLOR: #FFFFFF } .Table_Title A:visited { TEXT-DECORATION: none; COLOR: #FFFFFF } .Table_Title A:hover { TEXT-DECORATION: none; COLOR: #FFFFFF } /**顶部深色**/ .Table_TitleSmallFont { background-color : #68A6E4; color : #FFFFFF } /**表眉**/ .Table_Header { background-color : #CCE7FD } /**中部**/ .Table_Middle { background-color : #EFF4F8 } /**底部**/ .Table_Footer { background-color : #E4F0FA } /**被屏式样**/ .PostHidden { height:30px; line-height:30px; width:250px; border: 1px solid #75BEFA; border-top:3px double #75BEFA; text-align : center; color:#00008B; margin :5px 0px 0px 10px; background-color : #F6F4EB; float:right; font: 12px Tahoma, Verdana; } /**金币购买**/ .PostBuy { height:60px; line-height:30px; width:250px; border: 1px solid #75BEFA; border-top:3px double #75BEFA; text-align : center; color:#00008B; margin :5px 0px 0px 10px; background-color : #F6F4EB; float:right; font: 12px Tahoma, Verdana; } /**金币提问**/ .PostAsk { height:30px; line-height:30px; width:250px; border: 1px solid #75BEFA; border-top:3px double #75BEFA; text-align : center; color:#00008B; margin :5px 0px 0px 10px; background-color : #F6F4EB; float:right; font: 12px Tahoma, Verdana; } /**权限帖**/ .PostRight { height:30px; line-height:30px; width:150px; border: 1px solid #75BEFA; border-top:3px double #75BEFA; text-align : center; color:#00008B; margin :5px 0px 0px 10px; background-color : #F6F4EB; float:right; font: 12px Tahoma, Verdana; } /**帖子被编辑**/ .PostEdit { height:30px; line-height:30px; width:300px; border: 1px solid #75BEFA; border-top:3px double #75BEFA; text-align : center; color:#00008B; margin :5px 0px 0px 10px; background-color : #F6F4EB; font: 12px Tahoma, Verdana; float:right; } /**最佳答案**/ .GoodAnswer { height:30px; line-height:30px; width:150px; border: 1px solid #75BEFA; border-top:3px double #75BEFA; text-align : center; color:#00008B; margin :5px 0px 0px 10px; background-color : #F6F4EB; float:right; font: 12px Tahoma, Verdana; } /**提取的最佳答案显示式样**/ .AnswerContent { margin:5px 2px; border:1px solid #CCCCCC; padding:5px; background:#FDFDDF; font: 12px Tahoma, Verdana; } /**引用式样**/ .Quote { margin:5px 20px; border:1px solid #CCCCCC; padding:5px; background:#F3F3F3; font: 12px Tahoma, Verdana; } /**代码式样**/ .Code { margin:5px 20px; border:1px solid #CCCCCC; padding:5px; background:#FDFDDF; font: 12px Tahoma, Verdana; } /**需回复可见内容式样**/ .NeedReply { margin:5px 3px; border:1px solid #CCCCCC; padding:5px; background:#FDFDDF; font: 12px Tahoma, Verdana; } /**需金币购买内容式样**/ .NeedBuy { margin:5px 3px; border:1px solid #CCCCCC; padding:5px; background:#FDFDDF; font: 12px Tahoma, Verdana; } /***********************************************TABLE表格布局***********************************************/ /***********************************************分页页码式样***********************************************/ /**Table边式样**/ .Pager_Table { BORDER: #A8C5E4 1px solid; background-color:#E1E1E1 } .Pager_Left { background-color:#68A6E4; color:#FFFFFF;font-size:12px; padding:3px 4px; font-weight:bold; } .Pager_Middle { background-color:#FFFFFF; border-style:solid; border-color:#FFFFFF; font-size:12px; padding:0px 3px } .Pager_Right { background-color:#FFFFFF; font-size:12px } .Pager_Right input { border : 1px solid #D9E3EE; background-color : #FFFFFF; height : 18px; color:#0000FF } .Pager_Current { color:Red; } /***********************************************分页页码式样***********************************************/ /***********************************************颜色代码***********************************************/ .Red { color:Red; } .Blue { color:Blue; } .White { color:White; } /***********************************************颜色代码***********************************************/ /***********************************************下拉菜单***********************************************/ .menuskin { POSITION: absolute; VISIBILITY: hidden; height:1px; width:auto; overflow: visible; BORDER: #B7B7D0 1px solid; BACKGROUND-IMAGE: url('menubg.gif'); z-index:100; background-color:#ECEDEF; filter: Alpha(Opacity=95); padding-bottom:8px; } .menuskininner { PADDING-LEFT:32px; padding-right:2px; padding-top:2px; } .menuitems { PADDING: 1px 1px; MARGIN: 2px; font-size:9pt; line-height:14pt; } .mouseoverstyle { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; BORDER-RIGHT: #0B008B 1px solid; BORDER-TOP: #0B008B 1px solid; BORDER-LEFT: #0B008B 1px solid; BORDER-BOTTOM: #0B008B 1px solid; BACKGROUND-COLOR: #FFEEC2 } .menuskin A { PADDING-LEFT:4px; PADDING-RIGHT:4px; font-weight:normal; } .menuskin A:link { TEXT-DECORATION: none; COLOR: #000000 } .menuskin A:visited { TEXT-DECORATION: none; COLOR: #000000 } .menuskin A:hover { TEXT-DECORATION: none; COLOR: #FF0000 } /***********************************************下拉菜单***********************************************/body { } 

 

oldstyle.css

 




    添加管理
   


   


       

                            align="center">
               
                   
               
               
                   
                   
               
               
                   
                   
               
               
                   
                   
               
               
                   
               
           

                        添加公告

                         公告位置:

                         

                         公告标题:

                         
                                                    Display="Dynamic" ErrorMessage="请填写标题">

                         公告内容:

                         

       

   


 

。cs

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using YHZB.Model;

public partial class Admin_Admin_BulltinAdd : System.Web.UI.Page
{
    YHZB.BLL.tbl_Bulletin BulltinBLL = new YHZB.BLL.tbl_Bulletin();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindData();
        }
    }
    private void BindData()
    {
        if (Requests.GetIntQueryString("ID") != 0)
        {
            YHZB.Model.tbl_Bulletin model = BulltinBLL.GetModel(Requests.GetIntQueryString("ID"));
            Title.Text = model.BulTitle;
            FCKeditor1.Value = model.BulContent;
            TxtPerson.Text = model.BulPerName;
        }
    }

    protected void SubmitButton_Click(object sender, EventArgs e)
    {
        YHZB.Model.tbl_Bulletin bulinfo = new tbl_Bulletin();
        bulinfo.BulID = Requests.GetIntQueryString("ID");
        if (bulinfo.BulID > 0)
        {
            bulinfo = BulltinBLL.GetModel(Requests.GetIntQueryString("ID"));
            bulinfo.BulTitle = Title.Text.Trim();
            bulinfo.BulContent = FCKeditor1.Value;
            bulinfo.BulPerName = TxtPerson.Text.Trim();

            //添加操作日志
            YHZB.Model.tbl_Log log = new tbl_Log();
            log.LogType = 2;
            log.LogUserName = User.Identity.Name;
            log.LogContent = "修改公告信息ID(" + bulinfo.BulID + ")成功!";
            log.Define1 = Context.Request.UserHostAddress;
            log.LogTime = DateTime.Now;
            new YHZB.BLL.tbl_Log().Add(log);

            BulltinBLL.Update(bulinfo);
            Response.Redirect("Admin_Bulltin.aspx");
        }
        else
        {
            bulinfo.BulTitle = Title.Text.Trim();
            bulinfo.BulContent = FCKeditor1.Value;
            bulinfo.BulPerName = TxtPerson.Text.Trim();
            bulinfo.BulAddTime = DateTime.Now;
            int id=BulltinBLL.Add(bulinfo);
            //添加操作日志
            YHZB.Model.tbl_Log info = new tbl_Log();
            info.LogType = 2;
            info.LogUserName = User.Identity.Name;
            info.LogContent = "添加招标信息ID(" + id.ToString() + ")成功!";
            info.Define1 = Context.Request.UserHostAddress;
            info.LogTime = DateTime.Now;
            new YHZB.BLL.tbl_Log().Add(info);
            Response.Redirect("Admin_Bulltin.aspx");

        }
    }
}

 

list.cs

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Admin_Admin_Bulltin : System.Web.UI.Page
{
    YHZB.BLL.tbl_Bulletin BulBLL = new YHZB.BLL.tbl_Bulletin();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            AspNetPager1.RecordCount = BulBLL.GetList("").Tables[0].Rows.Count;
            BindData();
        }
    }

    private void BindData()
    {
        bulList.DataSource = BulBLL.GetList(AspNetPager1.PageSize,AspNetPager1.CurrentPageIndex, "").Tables[0];
        bulList.DataBind();
    }


    protected void DeleteButton_Click(object sender, EventArgs e)
    {
        string bud = string.Empty;
        bud = YHZB.Model.Requests.GetIntsForm("SelectID");
        if (bud != "0")
        {
            //添加操作日志
            YHZB.Model.tbl_Log info = new YHZB.Model.tbl_Log();
            info.LogType = 2;
            info.LogUserName = User.Identity.Name;
            info.LogContent = "删除公告信息ID(" + bud + ")成功!";
            info.Define1 = Context.Request.UserHostAddress;
            info.LogTime = DateTime.Now;
            new YHZB.BLL.tbl_Log().Add(info);

            foreach (string str in bud.Split(new char[] { ',' }))
            {
                BulBLL.Delete(Convert.ToInt32(str));
            }
            BindData();
        }
    }

    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        BindData();
    }
}

你可能感兴趣的:(我的后台管理页2)