/// <summary>
        /// 根据条件获取总行数
        /// </summary>
        /// <param name="countryid">国家ID</param>
        /// <param name="educatio;nid">学历ID</param>
        /// <returns></returns>
        /// sss
        public int GetRowCounts(int countryid, int educationid)
        {
            string sql = "select COUNT(1) from successful_relation a INNER JOIN student b ON a.StudentID = b.StudentID where b.CountryID=" + countryid + " and b.EducationID=" + educationid + "";
            int    i   = MySqlDB.scalar(sql, System.Data.CommandType.Text, null);

            return(i = i % 5 == 0 ? i / 5 : (i / 5) + 1);
        }
Beispiel #2
0
        public int GetSuccessCount(int Id)
        {
            string sql = "SELECT count(1) as 'count' FROM successful_relation WHERE StudentID in (select StudentID from teamrelation where TeamID =" + Id + " )";
            int    i   = MySqlDB.scalar(sql, System.Data.CommandType.Text, null);

            return(i = i % 6 == 0 ? i / 6: (i / 6) + 1);
        }
Beispiel #3
0
        /// <summary>
        /// 获取页数
        /// </summary>
        /// <returns></returns>
        public int GetRowCounts()
        {
            string sql2 = "select count(1) from active";
            int    i    = MySqlDB.scalar(sql2, System.Data.CommandType.Text, null);

            return(i = i % 5 == 0 ? i / 5 : (i / 5) + 1);
        }
Beispiel #4
0
 /// <summary>
 /// 获取行数
 /// </summary>
 /// <returns></returns>
 public int GetRowCounts()
 {
     try
     {
         string sql2 = "select count(1) from information";
         int    i    = MySqlDB.scalar(sql2, System.Data.CommandType.Text, null);
         return(i = i % 8 == 0 ? i / 8 : (i / 8) + 1);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Beispiel #5
0
        /// <summary>
        /// 获取搜索结果的行数
        /// </summary>
        /// <param name="selcontent"></param>
        /// <returns></returns>
        public int SelectRowCounts(string selcontent)
        {
            try
            {
                string sql2 = "select count(1) from information where Title like '%" + selcontent + "%' or Content like '%" + selcontent + "%' order by ReadCount DESC ";
                int    i    = MySqlDB.scalar(sql2, System.Data.CommandType.Text, null);
                return(i = i % 8 == 0 ? i / 8 : (i / 8) + 1);
            }

            catch (Exception ex)
            {
                return(0);
            }
        }
Beispiel #6
0
 /// <summary>
 /// 获取页数
 /// </summary>
 /// <returns></returns>
 public int GetRowCounts()
 {
     try
     {
         string sql2 = "select count(1) from optioninfo";
         int    i    = MySqlDB.scalar(sql2, System.Data.CommandType.Text, null);
         return(i = i % 5 == 0 ? i / 5 : (i / 5) + 1);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误报告", ex);
         return(0);
     }
 }
 /// <summary>
 /// 获取国家规划页数
 /// </summary>
 /// <returns></returns>
 public int GetRowCounts()
 {
     try
     {
         string sql2 = "select count(1) from studentprogram";
         int    i    = MySqlDB.scalar(sql2, System.Data.CommandType.Text, null);
         return(i = i % 8 == 0 ? i / 8 : (i / 8) + 1);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误日志", ex);
         return(0);
     }
 }
Beispiel #8
0
        /// <summary>
        /// js获取高分学员的数量
        /// </summary>
        /// <param name="areaid"></param>
        /// <returns></returns>
        public int GetRowCounts(int languageid)
        {
            try
            {
                string sql2 = "SELECT count(1) from learnsorce a INNER JOIN `languages` b on a.LanguageID=b.LanguageID " +
                              " INNER JOIN learner c on a.LearnerID = c.LearnerID where b.LanguageID = " + languageid + "";
                int i = MySqlDB.scalar(sql2, System.Data.CommandType.Text, null);

                return(i % 5 == 0 ? i / 5 : (i / 5) + 1);
            }
            catch (Exception ex)
            {
                return(0);
            }
        }
Beispiel #9
0
        /// <summary>
        /// 获取学生信息的数量
        /// </summary>
        /// <returns></returns>
        public int CountStudentInfo()
        {
            try
            {
                string sql = @"select COUNT(1) from Successful_Relation a INNER JOIN student b on a.StudentID = b.StudentID INNER JOIN College d ON b.CollegeID = d.CollegeID ";

                int ids = MySqlDB.scalar(sql, CommandType.Text, null);
                Log4netHelper.WriteLog("系统日志:请求了ActiveDal类下的CountStudentInfo方法");
                return(ids);
            }
            catch (Exception ex)
            {
                Log4netHelper.WriteLog("错误信息:请求了ActiveDal类下的ActiveLsitIndex方法", ex);
                return(0);
            }
        }
Beispiel #10
0
        /// <summary>
        /// js获取团队行数
        /// </summary>
        /// <param name="areaid"></param>
        /// <returns></returns>
        public int GetRowCounts(int areaid)
        {
            try
            {
                string sql2 = "SELECT count(1) from arearelation a " +
                              "INNER JOIN team b ON a.TeamID = b.TeamID " +
                              "INNER JOIN areases c ON a.AreaID = c.AreaID  WHERE c.AreaID = " + areaid + "";
                int i = MySqlDB.scalar(sql2, System.Data.CommandType.Text, null);

                return(i % 5 == 0 ? i / 5 : (i / 5) + 1);
            }
            catch (Exception ex)
            {
                return(0);
            }
        }