Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        INovel novel = BllFactory.BllAccess.CreateINovelBLL();

        int BookId   = Convert.ToInt32(Request["BookId"]);
        int VolumeId = novel.AddBookIdSections(BookId);

        Model.SectionsInfo item = new Model.SectionsInfo();
        item.VolumeId     = VolumeId;
        item.SectionTitle = Request["VolumeName"];
        item.CharNum      = Request["Contents"].ToString().Length;
        item.Contents     = Request["Contents"];
        item.Contents     = Server.HtmlEncode(item.Contents);
        try
        {
            novel.addSections(item);
            Response.Write("{success:true,msg:'添加成功'}");
        }
        catch (Exception ex)
        {
            string msg = ex.Message;
            Response.Write("{success:false,msg:'" + msg + "'}");
        }
    }
Example #2
0
 //给已有小说添加新章
 public int addSections(Model.SectionsInfo item)
 {
     return(novel.addSections(item));
 }