<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title>無標(biāo)題頁(yè)</title>
               <link href="../images/style/style.css"  type="text/css" rel="stylesheet">
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <table bgcolor="#c4d8ed" border="0" cellpadding="0" cellspacing="0" width="100%">
                <tbody>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <table align="center" border="1" cellpadding="4" cellspacing="1" class="toptable grid fixed">
                                <tbody>
                                    <tr>
                                        <td class="category" style="height: 17px">
                                        </td>
                                        <td align="center" class="category" style="height: 17px">
                                            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <br />
                            <div>
                                &nbsp;</div>
                            <table align="center" border="1" cellpadding="4" cellspacing="1" class="toptable grid fixed"
                                style="color: #0000ff">
                                <tbody>
                                    <tr>
                                        <td align="center" colspan="1" style="height: 41px">
                                        </td>
                                        <td align="center" colspan="6" style="height: 41px; text-align: center">
                                            <strong>編輯分類</strong></td>
                                    </tr>
                                    <tr>
                                        <td align="right" colspan="1" style="height: 39px">
                                            名稱:</td>
                                        <td align="left" colspan="6" style="height: 39px">
                                            <asp:TextBox ID="TbName" runat="server" Width="441px"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td align="right" colspan="1" style="height: 53px">
                                            備注:</td>
                                        <td align="left" colspan="6" style="height: 53px">
                                            <asp:TextBox ID="TbIntro" runat="server" Height="145px" TextMode="MultiLine" Width="631px"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td align="center" style="height: 29px">
                                        </td>
                                        <td align="center" style="height: 29px">
                                            </td>
                                        <td colspan="5" style="height: 29px">
                                            &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<asp:Button ID="BtEdit" runat="server" OnClick="BtVerfly_Click"
                                                Text="編輯" />
                                            &nbsp; &nbsp;
                                            <asp:Button ID="BtDel" runat="server" OnClick="BtDel_Click" Text="關(guān)閉" />
                                            &nbsp;&nbsp; &nbsp; &nbsp;&nbsp;<span class="t2"></span></td>
                                    </tr>
                                    <tr>
                                        <td colspan="1">
                                        </td>
                                        <td colspan="6">
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <div>
                            </div>
                        </td>
                        <td>
                        </td>
                    </tr>
                </tbody>
            </table>
       
        </div>
        </form>
    </body>
    </html>

    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;

    namespace domain.UI.images.News
    {
        public partial class TypeEdit : domain.BLL.AdminPage
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                this.BtDel.Attributes["onclick"] = "window.close()";
                if (!Page.IsPostBack)
                {
                   //Power(this.U_Account, this.MIDS[Convert.ToInt32(domain.BLL.ModelList.系統(tǒng)設(shè)置)]);
                    BindUpdate();
                }
            }
         
            public void BindUpdate()
            {
                string action = this.GetRequest("action");
                if (action == "upd")
                {
                    string sql = string.Format("select * from [newssort] where column_id='{0}'", this.GetRequest("id"));
                    DataTable dt = this.Db.GetTable(sql);
                    if (dt != null)
                    {
                        this.TbName.Text = Convert.ToString(dt.Rows[0]["column_name"]);
                        this.TbIntro.Text = Convert.ToString(dt.Rows[0]["column_intro"]);
                    }
                }
            }
            protected void BtVerfly_Click(object sender, EventArgs e)
            {
                string action = this.GetRequest("action");
                string name = this.TbName.Text.Trim();
                string intro = this.TbIntro.Text.Trim();
                string parentid = this.GetRequest("parentid");
                parentid = parentid.Length < 1 ? ("0") : (parentid);
                string depth = this.GetRequest("depth");


                string message = "";
                string sql = "";
                switch (action)
                {
                    case "add":
                        message = "添加";
                        int depthint = Convert.ToInt32(depth) + 1;
                        if (depthint >= 4)
                        {
                            this.ShowMessage("該類沒有子類", "");
                            return;
                        }
                        sql = string.Format("insert into newssort([column_id],[column_name],[parent_id],[column_depth],[Column_Order],[column_intro]) select '{0}','{1}','{2}',{3},max(column_order)+1,'{4}' from newssort", System.Guid.NewGuid().ToString().Replace("-", "").ToUpper().Substring(1, 6), name, parentid, depthint, intro);
                        break;
                    case "upd":
                        message = "修改";
                        sql = string.Format("update [newssort] set Column_Name='{0}',Column_Intro='{1}' where [column_ID]='{2}'", name, intro, this.GetRequest("id"));
                        break;
                    default:
                        break;
                }
                if (this.Db.GetState(sql))
                {
                    this.ShowMessage("成功" + message, "window.opener.location.reload()");
                }
                else
                {
                    this.ShowMessage("操作失敗請(qǐng)聯(lián)系管理員!!!", "");
                }

            }

            protected void BtDel_Click(object sender, EventArgs e)
            {
                // Response.Write(this.Script());
            }
        }
    }

     

    posted on 2009-06-03 15:07 sanmao 閱讀(100) 評(píng)論(0)  編輯  收藏

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
    博客園   IT新聞   Chat2DB   C++博客   博問  
     

    常用鏈接

    留言簿(5)

    隨筆分類

    隨筆檔案

    搜索

    •  

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 毛色毛片免费观看| 最新国产成人亚洲精品影院| 成人免费淫片在线费观看| 久久精品国产这里是免费| 深夜福利在线视频免费| 亚洲人成色99999在线观看| 亚洲国产精品综合福利专区| 亚洲国产精品成人久久| 亚洲一区精品伊人久久伊人| 免费国产a国产片高清网站| 成年人免费视频观看| 精品免费人成视频app| 亚在线观看免费视频入口| 色播在线永久免费视频网站| 精品一区二区三区免费视频| 无遮挡国产高潮视频免费观看| 亚洲AV成人片无码网站| 亚洲乱理伦片在线观看中字| 久久精品亚洲AV久久久无码| 国产成+人+综合+亚洲专| 亚洲最大免费视频网| 亚洲色图黄色小说| 亚洲天堂中文字幕在线观看| 亚洲美女aⅴ久久久91| 亚洲视频免费在线播放| 亚洲成人免费网站| 亚洲国产av高清无码| 亚洲videos| 亚洲va久久久久| 中文无码亚洲精品字幕| 自拍日韩亚洲一区在线| 亚洲第一男人天堂| 亚洲第一第二第三第四第五第六| 亚洲AV成人一区二区三区观看| 老司机免费午夜精品视频| 青青青视频免费观看| 国产黄在线播放免费观看| 美女网站在线观看视频免费的| 99re6在线视频精品免费| 国产精品视频白浆免费视频| 午夜免费1000部|