Esempio n. 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 + "'}");
        }
    }
Esempio n. 2
0
 //获取指定小说ID最后一卷ID
 public int AddBookIdSections(int BookId)
 {
     return(novel.AddBookIdSections(BookId));
 }