Ejemplo n.º 1
0
        //(后台)获取要审核的章节
        public List <Model.SectionsInfo> getCheckSections(int pageindex, int pagesize, out int recoredCount)
        {
            SqlParameter[] parm = new SqlParameter[] {
                new SqlParameter("@pageindex", pageindex),
                new SqlParameter("@pageSize", pagesize),
                new SqlParameter("@recordCount", SqlDbType.Int, 4)
            };

            parm[2].Direction = ParameterDirection.Output;

            List <Model.SectionsInfo> list = new List <Model.SectionsInfo>();

            using (SqlDataReader dr = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, "getCheckSections", parm))
            {
                while (dr.Read())
                {
                    Model.SectionsInfo item = new Model.SectionsInfo();
                    item.BookId       = Convert.ToInt32(dr["bookId"]);
                    item.BookName     = dr["BookName"].ToString();
                    item.SectionTitle = dr["SectionTitle"].ToString();
                    item.Contents     = dr["Contents"].ToString();
                    item.CharNum      = Convert.ToInt32(dr["CharNum"]);
                    item.ShortAddTime = Convert.ToDateTime(dr["addtime"]).ToShortDateString();
                    item.StateName    = dr["stateName"].ToString();
                    item.SectiuonId   = Convert.ToInt32(dr["SectiuonId"]);
                    item.BookId       = Convert.ToInt32(dr["BookId"]);

                    list.Add(item);
                }
            }
            recoredCount = Convert.ToInt32(parm[2].Value);
            return(list);
        }
Ejemplo n.º 2
0
        //根据卷获得章
        public List <Model.SectionsInfo> getVolumeSecionts(int pageindex, int pagesize, int volumenid, out int recordCount)
        {
            List <Model.SectionsInfo> list = new List <Model.SectionsInfo>();

            SqlParameter[] parm = new SqlParameter[] {
                new SqlParameter("@pageindex", pageindex),
                new SqlParameter("@pagesize", pagesize),
                new SqlParameter("@volumenid", volumenid),
                new SqlParameter("@recoredCount", SqlDbType.Int, 4)
            };

            parm[3].Direction = ParameterDirection.Output;

            using (SqlDataReader dr = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, "getVolumeSecionts", parm))
            {
                while (dr.Read())
                {
                    Model.SectionsInfo item = new Model.SectionsInfo();
                    item.SectiuonId   = Convert.ToInt32(dr["SectiuonId"]);
                    item.VolumeId     = Convert.ToInt32(dr["VolumeId"]);
                    item.SectionTitle = dr["SectionTitle"].ToString();
                    item.CharNum      = Convert.ToInt32(dr["CharNum"]);
                    list.Add(item);
                }
            }

            recordCount = Convert.ToInt32(parm[3].Value);
            return(list);
        }
Ejemplo n.º 3
0
        //(作者专区)获取审核章节
        public List <Model.SectionsInfo> getExsetions(int userid)
        {
            SqlParameter[] parm = new SqlParameter[] {
                new SqlParameter("@userid", userid)
            };

            List <Model.SectionsInfo> list = new List <Model.SectionsInfo>();

            using (SqlDataReader dr = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, "isExamine", parm))
            {
                while (dr.Read())
                {
                    Model.SectionsInfo item = new Model.SectionsInfo();
                    item.BookName     = dr["BookName"].ToString();
                    item.CharNum      = Convert.ToInt32(dr["CharNum"]);
                    item.SectionTitle = dr["sectionTitle"].ToString();
                    item.ValumeName   = dr["ValumeName"].ToString();
                    item.ShortAddTime = Convert.ToDateTime(dr["addtime"]).ToShortDateString();
                    list.Add(item);
                }
            }
            return(list);
        }
Ejemplo n.º 4
0
 //给已有小说添加新章
 public int addSections(Model.SectionsInfo item)
 {
     return(novel.addSections(item));
 }