예제 #1
0
 /// <summary>
 /// 修改留学规划
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdStudentprogram(JiaJiModels.StudentProgram model)
 {
     try
     {
         return(new JiaJiDAL.SprelationDal().UpdStudentprogram(model));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
예제 #2
0
 /// <summary>
 /// 修改留学规划
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdStudentprogram(JiaJiModels.StudentProgram model)
 {
     try
     {
         string sql = " update studentprogram set studentprogram.StudentProgramTitle='" + model.StudentProgramTitle + "',studentprogram.StudentProgramContent='" + model.StudentProgramContent + "',studentprogram.`Source`='" + model.Source + "',studentprogram.Author='" + model.Author + "',studentprogram.ImageUrl='" + model.ImageUrl + "',studentprogram.CountryID=" + model.CountryID + ",studentprogram.EducationID=" + model.EducationID + ",studentprogram.TypeID=" + model.TypeID + ",StudentKeyWord='" + model.StudentKeyWord + "',StudentProfile='" + model.StudentProfile + "'  where studentprogram.StudentProgramID =" + model.StudentProgramID + "";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
예제 #3
0
 /// <summary>
 /// 添加留学规划
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int StudentprogramAdd(JiaJiModels.StudentProgram model)
 {
     try
     {
         string sql = " INSERT into studentprogram(studentprogram.StudentProgramTitle,studentprogram.StudentProgramContent,studentprogram.`Source`,studentprogram.Author,studentprogram.ImageUrl,studentprogram.CountryID,studentprogram.EducationID,studentprogram.TypeID,ReadCount,StudentKeyWord,StudentProfile) values('" + model.StudentProgramTitle + "', '" + model.StudentProgramContent + "', '" + model.Source + "', '" + model.Author + "', '" + model.ImageUrl + "'," + model.CountryID + "," + model.EducationID + "," + model.TypeID + ",0,'" + model.StudentKeyWord + "','" + model.StudentProfile + "') ";
         int    h   = MySqlDB.nonquery(sql, CommandType.Text, null);
         return(h);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
예제 #4
0
 public JsonResult addSprelation(JiaJiModels.StudentProgram model)
 {
     try
     {
         model.ImageUrl = "/image/" + model.ImageUrl;
         var i = new JiaJiBLL.SprelationBll().StudentprogramAdd(model);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }
예제 #5
0
        public JsonResult editSprelation(JiaJiModels.StudentProgram model)
        {
            try
            {
                int id = model.StudentProgramID;

                var i = new JiaJiBLL.SprelationBll().UpdStudentprogram(model);
                if (i > 0)
                {
                    return(Json(new { Success = true, Message = "修改成功" }));
                }
                else
                {
                    return(Json(new { Success = false, Message = "修改失败" }));
                }
            }
            catch
            {
                return(Json(new { Success = false, Message = "修改失败" }));
            }
        }