Exemplo n.º 1
0
 /// <summary>
 /// 修改
 /// </summary>
 /// <returns></returns>
 public int UpdateCounImage(JiaJiModels.LunBoImage model)
 {
     try
     {
         string sql = "Update lunboimage set ImageUrl = '" + model.ImageUrl + "', IsLunBo = " + model.IsLunBo + ",CountryID=" + model.CountryID + ",`UpDate`='" + model.UpDate + "',EducationID=" + model.EducationID + "  where LunImageID=" + model.LunImageID + " ";
         int    he  = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 删除活动信息
 /// </summary>
 /// <param name="did"></param>
 /// <returns></returns>
 public bool actionDel(string ids)
 {
     try
     {
         string sql = "DELETE from active where ActiveID in (" + ids + ")";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h > 0);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 删除策略信息
 /// </summary>
 /// <param name="did"></param>
 /// <returns></returns>
 public bool DelStrategy(string StrategyID)
 {
     try
     {
         string sql = "delete from strategy where StrategyID in (" + StrategyID + ")";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h > 0);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// 判断用户名和密码
 /// </summary>
 /// <param name="adname"></param>
 /// <param name="adpwd"></param>
 /// <returns></returns>
 public int NamePwdIsExist(string adname, string adpwd)
 {
     try
     {
         string sql = "select count(1) from adlogin where AdName='" + adname + "' and AdPwd='" + adpwd + "' ";
         int    h   = MySqlDB.scalar(sql, CommandType.Text, null);
         return(h);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// 修改课程
 /// </summary>
 /// <returns></returns>
 public int UpdateDominant(JiaJiModels.DominantModel model)
 {
     try
     {
         string sql = "update dominant set DominantName='" + model.DominantName + "',CountryID=" + model.CountryID + " where DominantID=" + model.DominantID + "";
         int    he  = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// 修改高分学员列表
 /// </summary>
 /// <returns></returns>
 public int UpdateMaxScoStu(JiaJiModels.LearnerModel model)
 {
     try
     {
         string sql = "Update study_abroad.learnsorce set LearnerID = " + model.LearnerID + ", LanguageID = " + model.LanguageID + ", Sorce = '" + model.Sorce + "', `LearnerGonsis`= '" + model.LearnerGonsis + "',LearnerContent='" + model.LearnerContent + "' where LearnSorceID =" + model.LearnSorceID + " ";
         int    he  = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// 添加学员列表
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int addLearner(JiaJiModels.LearnerModel model)
 {
     try
     {
         string sql = "INSERT INTO study_abroad.learner (LearnName,Phone, GoTime, LearnImage,CountryID)VALUES ('" + model.LearnName + "','" + model.Phone + "','" + model.GoTime + "','" + model.LearnImage + "'," + model.CountryID + ")";
         int    he  = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// 语言课程关系显示
 /// </summary>
 /// <returns></returns>
 public List <JiaJiModels.languagerelation> ShowLangCour()
 {
     try
     {
         string sql = "select * from languagerelation left join course on languagerelation.CourseID = course.CourseID left join languages on languagerelation.LanguageID = languages.LanguageID ORDER BY LRelationID DESC";
         List <JiaJiModels.languagerelation> list = MySqlDB.GetList <JiaJiModels.languagerelation>(sql, CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// 显示课程
 /// </summary>
 /// <returns></returns>
 public List <JiaJiModels.CourseModel> ShowCourse()
 {
     try
     {
         string sql = "select * from course";
         List <JiaJiModels.CourseModel> list = MySqlDB.GetList <JiaJiModels.CourseModel>(sql, CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// 添加语言
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int addLanguage(JiaJiModels.Languages model)
 {
     try
     {
         string sql = "insert into Languages(LanguageName,LanguageTitle,LanguageContent) values('" + model.LanguageName + "','" + model.LanguageTitle + "','" + model.LanguageContent + "')";
         int    he  = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 11
0
 /// <summary>
 /// 修改语言
 /// </summary>
 /// <returns></returns>
 public int UpdateLanguage(JiaJiModels.Languages model)
 {
     try
     {
         string sql = "UPDATE course set LanguageName='" + model.LanguageName + "',LanguageTitle='" + model.LanguageTitle + "',LanguageContent='" + model.LanguageContent + "' where LanguageID=" + model.LanguageID + "";
         int    he  = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 12
0
 /// <summary>
 /// 修改二维码
 /// </summary>
 /// <returns></returns>
 public int UpdateErWeiMa(JiaJiModels.ErWeiMaModel model)
 {
     try
     {
         string sql = "Update erweimainfo set EWMTitle = '" + model.EWMTitle + "', EWMUrl = '" + model.EWMUrl + "', EWMUpdate = '" + model.EWMUpdate + "' where EWMID=" + model.EWMID + " ";
         int    he  = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 13
0
 /// <summary>
 /// 删除二维码
 /// </summary>
 /// <param name="did"></param>
 /// <returns></returns>
 public bool DelErWeiMa(string did)
 {
     try
     {
         string sql = "delete from erweimainfo where EWMId in (" + did + ")";
         int    h   = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(h > 0);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Exemplo n.º 14
0
 /// <summary>
 /// 添加二维码
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int AddErWeiMa(JiaJiModels.ErWeiMaModel model)
 {
     try
     {
         string sql = "INSERT INTO erweimainfo (EWMTitle, EWMUrl, EWMUpdate)VALUES ('" + model.EWMTitle + "', '" + model.EWMUrl + "', '" + model.EWMUpdate + "')";
         int    he  = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 15
0
 /// <summary>
 /// 添加高分学员列表
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int addMaxScoStu(JiaJiModels.LearnerModel model)
 {
     try
     {
         string sql = "insert into learnsorce(LearnerID,LanguageID,Sorce,LearnerGonsis,LearnerContent,HeatHot) VALUES(" + model.LearnerID + "," + model.LanguageID + ",'" + model.Sorce + "','" + model.LearnerGonsis + "','" + model.LearnerContent + "',0)";
         int    he  = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 16
0
        /// <summary>
        /// 课程添加
        /// </summary>
        /// <param name="model"></param>
        /// <param name="LanID"></param>
        /// <returns></returns>
        //public int CourseAdd(JiaJiModels.CourseModel model)
        //{
        //    string sql = "insert into course(CourseName,CourseContent)values(@Name,@Content)";
        //    MySqlParameter[] para = {
        //        new MySqlParameter("@Name",model.CourseName),
        //        new MySqlParameter("@Content",model.CourseContent)
        //    };
        //    MySqlDB.nonquery(sql, CommandType.Text, para);
        //    string sql1 = "select CourseID from course where CourseName=@CourseName";
        //    MySqlParameter[] para1 = {
        //        new MySqlParameter("@CourseName",model.CourseName)
        //    };
        //    DataTable dt = MySqlDB.GetDataTable(sql1, CommandType.Text, para1);
        //    int CourseID = (int)dt.Rows[0][0];
        //    string sql2 = "insert into languagerelation(LanguageID,CourseID)values(@LanID,@CourseID)";
        //    MySqlParameter[] para2 = {
        //        new MySqlParameter("@LanID",model.LanguageID),
        //        new MySqlParameter("@CourseID",CourseID)
        //    };
        //    MySqlDB.nonquery(sql2, CommandType.Text, para2);
        //    return 1;
        //}
        #endregion

        #region 语言培训

        /// <summary>
        /// 显示语言培训
        /// </summary>
        /// <returns></returns>
        public List <JiaJiModels.Language_PeiXun> ShowLanguagePeiXun()
        {
            try
            {
                string sql = "select * from language_peixun ";
                List <JiaJiModels.Language_PeiXun> list = MySqlDB.GetList <JiaJiModels.Language_PeiXun>(sql, CommandType.Text, null);
                return(list);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Exemplo n.º 17
0
 /// <summary>
 /// 删除高分学员列表
 /// </summary>
 /// <param name="did"></param>
 /// <returns></returns>
 public bool DelMaxScoStu(string did)
 {
     try
     {
         string sql = "delete from learnsorce where LearnSorceID in (" + did + ")";
         int    h   = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(h > 0);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Exemplo n.º 18
0
 /// <summary>
 /// 添加语言培训
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int addLanguagePeiXun(JiaJiModels.Language_PeiXun model)
 {
     try
     {
         string sql = "insert into language_peixun(Language_Name,Language_Content) values('" + model.Language_Name + "','" + model.Language_Content + "')";
         int    he  = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 19
0
 /// <summary>
 /// 获取学员列表
 /// </summary>
 /// <returns></returns>
 public List <JiaJiModels.LearnerModel> showLearner()
 {
     try
     {
         string sql = "select * from learner left join country on learner.CountryID = country.CountryID order by LearnerID desc ";
         List <JiaJiModels.LearnerModel> list = MySqlDB.GetList <JiaJiModels.LearnerModel>(sql.ToString(), System.Data.CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 20
0
 /// <summary>
 /// 删除语言培训
 /// </summary>
 /// <param name="did"></param>
 /// <returns></returns>
 public bool DelLanguagePeiXun(string did)
 {
     try
     {
         string sql = "delete from language_peixun where LanguagePx_ID in (" + did + "); ";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h > 0);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Exemplo n.º 21
0
 /// <summary>
 /// 修改学员列表
 /// </summary>
 /// <returns></returns>
 public int UpdateLearner(JiaJiModels.LearnerModel model)
 {
     try
     {
         string sql = "Update study_abroad.learner set LearnName = '" + model.LearnName + "', Phone = '" + model.Phone + "', GoTime = '" + model.GoTime + "', `LearnImage`= '" + model.LearnImage + "', CountryID = " + model.CountryID + " where LearnerID =" + model.LearnerID + " ";
         int    he  = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 22
0
 /// <summary>
 /// 修改语言培训
 /// </summary>
 /// <returns></returns>
 public int UpdateLanguagePeiXun(JiaJiModels.Language_PeiXun model)
 {
     try
     {
         string sql = "UPDATE language_peixun set Language_Name='" + model.Language_Name + "',Language_Content='" + model.Language_Content + "' where LanguagePx_ID=" + model.LanguagePx_ID + "";
         int    he  = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 23
0
 /// <summary>
 /// 添加优势
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int addDominant(JiaJiModels.DominantModel model)
 {
     try
     {
         string sql = "insert into dominant(DominantName,CountryID) VALUE('" + model.DominantName + "'," + model.CountryID + ") ";
         int    he  = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(he);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 24
0
 /// <summary>
 /// 删除学员分享
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool DeleteShare(string shareids)
 {
     try
     {
         string sql = "delete form shares where ShareID=" + shareids + "";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h > 0);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Exemplo n.º 25
0
 /// <summary>
 /// 获取活动信息
 /// </summary>
 /// <returns></returns>
 public List <JiaJiModels.Active> Activeshow()
 {
     try
     {
         string sql = "select active.ActiveID,active.ActiveTitle,active.ActiveDate,active.Datails,active.ActivePhone,active.HeatID,country.CountryName,country.CountryID,areases.AreaID,areases.AreaName,active.Site,ActiveKeyWord,ActiveProfile from active left join country on active.CountryID=country.CountryID left join areases on active.Site=areases.AreaID order by  active.ActiveID desc";
         List <JiaJiModels.Active> list = MySqlDB.GetList <JiaJiModels.Active>(sql, CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 26
0
 /// <summary>
 /// 显示语言
 /// </summary>
 /// <returns></returns>
 public List <JiaJiModels.Languages> ShowLanguage()
 {
     try
     {
         string sql = "select * from Languages";
         List <JiaJiModels.Languages> list = MySqlDB.GetList <JiaJiModels.Languages>(sql, CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 27
0
 /// <summary>
 /// 修改活动
 /// </summary>
 /// <returns></returns>
 public int ActiveUpd(JiaJiModels.Active model)
 {
     try
     {
         string sql = "update active set ActiveTitle = '" + model.ActiveTitle + "', ActiveDate = '" + model.ActiveDate + "', Site =" + model.Site + ", Datails = '" + model.Datails + "', ActivePhone = '" + model.ActivePhone + "', CountryID=" + model.CountryID + ",ActiveKeyWord='" + model.ActiveKeyWord + "',ActiveProfile='" + model.ActiveProfile + "'  where ActiveID =" + model.ActiveID + " ";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 28
0
 /// <summary>
 /// 获取高分学员列表
 /// </summary>
 /// <returns></returns>
 public List <JiaJiModels.LearnerModel> showMaxScoStu()
 {
     try
     {
         string sql = "select * from learnsorce left join learner on learnsorce.LearnerID=learner.LearnerID left join languages on learnsorce.LanguageID=languages.LanguageID order by LearnSorceID DESC ";
         List <JiaJiModels.LearnerModel> list = MySqlDB.GetList <JiaJiModels.LearnerModel>(sql, System.Data.CommandType.Text, null);
         return(list);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 29
0
 /// <summary>
 /// 修改攻略信息
 /// </summary>
 /// <param name="stat"></param>
 /// <returns></returns>
 public int Updatestrategy(JiaJiModels.strategy stat)
 {
     try
     {
         string sql = "update strategy set  strategyTitle = '" + stat.StrategyTitle + "',strategyContent = '" + stat.StrategyContent + "',strategyDate = '" + stat.StrategyDate + "',CountryID =" + stat.CountryID + ",Img = '" + stat.Img + "',StrategyProfile='" + stat.StrategyProfile + "',StrategyKeyWord='" + stat.StrategyKeyWord + "',StrategyAuthor='" + stat.StrategyAuthor + "' where StrategyID =" + stat.StrategyID + " ";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Exemplo n.º 30
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="did"></param>
 /// <returns></returns>
 public bool DelCounImage(string did)
 {
     try
     {
         string sql = "delete from lunboimage where LunImageID in (" + did + ")";
         int    h   = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null);
         return(h > 0);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }