Exemplo n.º 1
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);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 热门资讯显示前6条
        /// </summary>
        /// <returns></returns>

        public List <Information> GetInformationTopList()
        {
            try
            {
                string             sql  = "select InformationID,Title,InfoDate from information order by InfoDate DESC LIMIT 6 ";
                List <Information> list = MySqlDB.GetList <Information>(sql, System.Data.CommandType.Text, null);
                return(list);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 获取合作的媒体
 /// </summary>
 /// <returns></returns>
 public List <Medium> GetMedium()
 {
     try
     {
         string        sql  = "select MediumID,MediumName,MediumTitle,MediumImg,MediumUrl,`UpDate` from medium order by `UPDATE` desc LIMIT 3";
         List <Medium> list = MySqlDB.GetList <Medium>(sql, System.Data.CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 4
0
 ///<summary>
 ///语言显示
 /// </summary>
 public List <Language> Language()
 {
     try
     {
         string          sql  = "select * from Languages";
         List <Language> list = MySqlDB.GetList <Language>(sql, CommandType.Text, null);
         return(list);
     }
     catch (Exception e)
     {
         return(null);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// 国家页面资讯图片
 /// </summary>
 /// <param name="countryid"></param>
 /// <param name="educatonid"></param>
 /// <returns></returns>
 public List <Information> CountryZiXunImage(int countryid)
 {
     try
     {
         string             sql  = "select InformationID,Title,InformationImgUrl from information where ReadCount=(select MAX(ReadCount) from information where CountryID=" + countryid + ") limit 1";
         List <Information> list = MySqlDB.GetList <Information>(sql.ToString(), System.Data.CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
 /// <summary>
 /// 获取语言背景移民
 /// </summary>
 /// <returns></returns>
 public List <Country> GetLBY(int countryid)
 {
     try
     {
         string         sql  = "select * from country where IsCountry=0 AND CountryID=" + countryid + "";
         List <Country> list = MySqlDB.GetList <Country>(sql, System.Data.CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 7
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);
            }
        }
Exemplo n.º 8
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);
     }
 }
Exemplo n.º 9
0
 ///<summary>
 ///获取热度前六的观点
 /// </summary>
 public List <JiaJiNewWebModel.Option> HotOption()
 {
     try
     {
         string sql = "select * from `optioninfo` ORDER BY Date DESC LIMIT 6";
         List <JiaJiNewWebModel.Option> list = MySqlDB.GetList <JiaJiNewWebModel.Option>(sql, System.Data.CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误报告", ex);
         throw ex;
     }
 }
Exemplo n.º 10
0
        ///// <summary>
        ///// 首页留学图片
        ///// </summary>
        ///// <param name="countryid"></param>
        ///// <param name="educatonid"></param>
        ///// <returns></returns>
        //public List<LunBoImageModel> IndexLXueList()
        //{
        //    try
        //    {

        //        StringBuilder sql = new StringBuilder();
        //        sql.Append(" select lunboimage.ImageUrl,lunboimage.`UpDate` from lunboimage where IsLunBo=3 order by `UpDate` desc limit 2   ");

        //        List<LunBoImageModel> list = MySqlDB.GetList<LunBoImageModel>(sql.ToString(), System.Data.CommandType.Text, null);
        //        return list;

        //    }
        //    catch (Exception ex)
        //    {
        //        return null;
        //    }
        //}

        /// <summary>
        /// 首页资讯图片
        /// </summary>
        /// <param name="countryid"></param>
        /// <param name="educatonid"></param>
        /// <returns></returns>
        public List <Information> IndexInforImage()
        {
            try
            {
                string             sql  = "select InformationID,Title,InformationImgUrl from information where ReadCount=(select MAX(ReadCount) from information) limit 1";
                List <Information> list = MySqlDB.GetList <Information>(sql.ToString(), System.Data.CommandType.Text, null);
                return(list);
            }
            catch (Exception ex)
            {
                Log4netHelper.WriteLog("错误报告", ex);
                throw ex;
            }
        }
Exemplo n.º 11
0
 ///<summary>
 ///项目显示
 /// </summary>
 public List <projectItem> ProjectShow()
 {
     try
     {
         string             sql  = "select  * from projectitem";
         List <projectItem> list = MySqlDB.GetList <projectItem>(sql, CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误报告", ex);
         throw ex;
     }
 }
Exemplo n.º 12
0
 ///<summary>
 ///移民项目
 /// </summary>
 public List <Project> ImmigrantShow()
 {
     try
     {
         string         sql  = "select * from project order by Date desc limit 2";
         List <Project> list = MySqlDB.GetList <Project>(sql, CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误报告", ex);
         throw ex;
     }
 }
Exemplo n.º 13
0
        /// <summary>
        /// 获取首页轮播图
        /// </summary>
        /// <returns></returns>
        public List <JiaJiNewWebModel.IndexImage> IndexImageLsit()
        {
            try
            {
                string sql = "select  * from indeximage ORDER BY ImageUpDate DESC Limit 0,3";

                List <JiaJiNewWebModel.IndexImage> indeximglist = MySqlDB.GetList <JiaJiNewWebModel.IndexImage>(sql, System.Data.CommandType.Text, null);
                return(indeximglist);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Exemplo n.º 14
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);
     }
 }
Exemplo n.º 15
0
 /// <summary>
 /// 分公司信息
 /// </summary>
 /// <param name="FilialeId">公司id</param>
 /// <returns></returns>
 public filialetext GetFilialetext(int FilialeId)
 {
     try
     {
         //string sql = "select  FilialeId,FilialeName,FilialeTexts,FilialeTextAddr,FilialeTextPhone from filiale INNER JOIN filialetext on filiale.FilialeTextId = filialetext.FilialeTextId where FilialeId = "+FilialeId;
         string    sql   = "SELECT * from filialetext LEFT JOIN filiale on filialetext.FilialeId=filiale.FilialeId where filialetext.FilialeId =" + FilialeId + " LIMIT 1";
         DataTable model = MySqlDB.GetDataTable(sql, CommandType.Text, null);
         return(MySqlDB.fanshemodel <filialetext>(model));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 16
0
 /// <summary>
 /// 根据热度显示资讯列表(分页)
 /// </summary>
 /// <param name="pageindex"></param>
 /// <returns></returns>
 public List <Information> GetInformationList(int pageindex)
 {
     try
     {
         int                pagesize = 8;
         string             sql      = "SELECT SQL_CALC_FOUND_ROWS * FROM information ORDER BY InfoDate DESC LIMIT " + (pageindex - 1) * pagesize + ", " + pagesize + ";SELECT FOUND_ROWS(); ";
         List <Information> list     = MySqlDB.GetList <Information>(sql, System.Data.CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 17
0
 ///<summary>
 ///观点图片详情
 /// </summary>
 public List <JiaJiNewWebModel.Option> HotOptionImage()
 {
     try
     {
         string sql = "select OptionUrl from optioninfo  where OptionHot=(select max(OptionHot) from optioninfo) limit 1";
         List <JiaJiNewWebModel.Option> list = MySqlDB.GetList <JiaJiNewWebModel.Option>(sql, System.Data.CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误报告", ex);
         throw ex;
     }
 }
Exemplo n.º 18
0
        /// <summary>
        /// 获取语言培训的内容信息
        /// </summary>
        /// <returns></returns>
        public List <JiaJiNewWebModel.Language_PeiXunModel> GetPeixunList()
        {
            try
            {
                string sql = "select  Language_Name,Language_Content from Language_PeiXun limit 6";
                List <Language_PeiXunModel> list = MySqlDB.GetList <Language_PeiXunModel>(sql, CommandType.Text, null);
                return(list);
            }

            catch (Exception ex)
            {
                Log4netHelper.WriteLog("错误报告", ex);
                throw ex;
            }
        }
Exemplo n.º 19
0
        ///<summary>
        ///留学规划类别后五条
        ///<param></param>
        /// </summary>
        /// <returns></returns>
        public List <StudentProgramType> TypeShow()
        {
            try
            {
                StringBuilder sql = new StringBuilder();
                sql.Append(" SELECT * from studentprogramtype limit 5 ");

                List <StudentProgramType> list = MySqlDB.GetList <StudentProgramType>(sql.ToString(), CommandType.Text, null);
                return(list);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Exemplo n.º 20
0
        ///<summary>
        ///申请时间规划表
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public List <ArrangeTime> ArrangeShow(int countryid, int educationid)
        {
            try
            {
                StringBuilder sql = new StringBuilder();
                sql.Append(" select ArrangeID,ArrangeMonth,ArrangeContent from arrangetime where CountryID=" + countryid + " and EducationID=" + educationid + " GROUP BY ShowID ORDER BY ShowID limit 7 ");

                List <ArrangeTime> list = MySqlDB.GetList <ArrangeTime>(sql.ToString(), CommandType.Text, null);
                return(list);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Exemplo n.º 21
0
        /// <summary>
        /// 二维码
        /// </summary>
        /// <param name="countryid"></param>
        /// <param name="educatonid"></param>
        /// <returns></returns>
        public List <erweima> ErWeiMaList()
        {
            try
            {
                StringBuilder sql = new StringBuilder();
                sql.Append(" select EWMTitle,EWMUrl from erweimainfo order by EWMUpdate desc limit 4   ");

                List <erweima> list = MySqlDB.GetList <erweima>(sql.ToString(), System.Data.CommandType.Text, null);
                return(list);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Exemplo n.º 22
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);
            }
        }
Exemplo n.º 23
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);
            }
        }
Exemplo n.º 24
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);
            }
        }
Exemplo n.º 25
0
 /// <summary>
 /// 西安团队
 /// </summary>
 /// <param name="areaid">地区ID</param>
 /// <returns></returns>
 public List <Team> GetXiAnTeam()
 {
     try
     {
         StringBuilder sql = new StringBuilder();
         sql.Append(" SELECT SQL_CALC_FOUND_ROWS b.TeamID,b.`Name`,b.Position,b.WorkDate,b.ShenQing,c.AreaID,c.AreaName,b.Image1,TeamProduce from arearelation a ");
         sql.Append(" INNER JOIN team b ON a.TeamID = b.TeamID  ");
         sql.Append(" INNER JOIN areases c ON a.AreaID = c.AreaID  WHERE c.AreaName = '西安' LIMIT 0,4 ");
         List <Team> list = MySqlDB.GetList <Team>(sql.ToString(), System.Data.CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 26
0
        /// <summary>
        /// 获取国家集合
        /// </summary>
        /// <returns></returns>
        public List <JiaJiNewWebModel.Country> CountryList()
        {
            try
            {
                string sql = "SELECT CountryID,CountryName,CountryImg from country where IsCountry=1";

                List <JiaJiNewWebModel.Country> list = MySqlDB.GetList <JiaJiNewWebModel.Country>(sql, System.Data.CommandType.Text, null);
                Log4netHelper.WriteLog("系统日志,请求了CountryDal类下的CountryDAL方法");
                return(list);
            }
            catch (Exception ex)
            {
                Log4netHelper.WriteLog("错误,请求了CountryDal类下的CountryDAL方法", ex);
                throw;
            }
        }
Exemplo n.º 27
0
        /// <summary>
        /// 获取项目对应的图片
        /// </summary>
        /// <returns></returns>
        public List <JiaJiNewWebModel.projectItem> GetProImgList(int proid)
        {
            try
            {
                string sql = "select  * from projectItem where Pro_ID=" + proid + " ";

                List <JiaJiNewWebModel.projectItem> list = MySqlDB.GetList <JiaJiNewWebModel.projectItem>(sql, System.Data.CommandType.Text, null);
                Log4netHelper.WriteLog("系统日志,请求了ProjectItemDAL类下的GetProductList方法");
                return(list);
            }
            catch (System.Exception ex)
            {
                Log4netHelper.WriteLog("错误信息:请求了ProjectItemDAL类下的GetProductList方法", ex);
                return(null);
            }
        }
Exemplo n.º 28
0
        /// <summary>
        /// 首页显示解决方案步骤
        /// </summary>
        /// <returns></returns>
        public List <JiaJiNewWebModel.Solution_BuZhou> SolutionBuZhouList()
        {
            try
            {
                string sql = "select  SolutionBuZhouID,SolutionBuZhou from solution_buzou ORDER BY SolutionBuZhouID  DESC LIMIT 8";

                List <JiaJiNewWebModel.Solution_BuZhou> list = MySqlDB.GetList <JiaJiNewWebModel.Solution_BuZhou>(sql, CommandType.Text, null);
                Log4netHelper.WriteLog("系统日志,请求了SolutionDAL类下的SolutionIndexList方法");
                return(list);
            }
            catch (System.Exception ex)
            {
                Log4netHelper.WriteLog("错误信息:请求了ActiveDal类下的ActiveLsitIndex方法", ex);
                return(null);
            }
        }
Exemplo n.º 29
0
 ///<summary>
 ///获取移民项目详情
 /// </summary>
 /// <para>Id:项目ID</para>
 /// <returns></returns>
 public Project ImmigrantShow(int Id)
 {
     try
     {
         string sql = "update project set ProjectReadCount=ProjectReadCount+1 where ProjectID=" + Id + ";";
         sql += "select * from project where ProjectID='" + Id + "'";
         DataTable dt  = MySqlDB.GetDataTable(sql, CommandType.Text, null);
         Project   pro = MySqlDB.fanshemodel <Project>(dt);
         return(pro);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误报告", ex);
         throw ex;
     }
 }
Exemplo n.º 30
0
 ///<summary>
 ///获取背景提升项目详情
 /// </summary>
 /// <para>Id:项目ID</para>
 /// <returns></returns>
 public projectItem ProjectItemShow(int Id)
 {
     try
     {
         string sql = "update projectitem set Pro_ReadCount=Pro_ReadCount+1 where Pro_ID=" + Id + ";";
         sql += "select * from projectitem where Pro_ID=" + Id + "";
         DataTable   dt  = MySqlDB.GetDataTable(sql, CommandType.Text, null);
         projectItem pro = MySqlDB.fanshemodel <projectItem>(dt);
         return(pro);
     }
     catch (Exception ex)
     {
         Log4netHelper.WriteLog("错误报告", ex);
         throw ex;
     }
 }