Example #1
0
        protected void Submit1_ServerClick(object sender, EventArgs e)
        {
            NewsType ob = new NewsType();

            ob.typename = tbTitle.Text.Trim();
            ob.p_id     = Request["id"] != null?int.Parse(Request["id"]) : 0;

            ob.issimple = int.Parse(rbIssimple.SelectedValue);
            ob.sort     = int.Parse(tbSord.Text);

            NewsTypeService.InsertNewsType(ob);
            ShowJs.ShowAndRedirect("添加成功!", Request.Url.ToString(), this.Page);
        }