コード例 #1
0
        public static List <CourseChapterAssociation> UpdateCourseChapterAssociation(CourseChapterAssociation chapterCourseAssociation)
        {
            AdoHelper objHelper = new AdoHelper(ConfigurationManager.ConnectionStrings["con"].ToString());
            DataSet   ds        = new DataSet();

            SqlParameter[] sqlParameter =
            {
                new SqlParameter("@SetAction",  chapterCourseAssociation.SetAction.ToUpper()),
                new SqlParameter("@ChapterIds", chapterCourseAssociation.ChapterIds),
                new SqlParameter("@CourseId",   chapterCourseAssociation.CourseId)
            };

            ds = objHelper.ExecDataSetProc("Gkl_USP_UpdateCourseChapterAssociation", sqlParameter);

            List <CourseChapterAssociation> objlm = null;

            objlm = ds.Tables[0].AsEnumerable()
                    .Select(row => new CourseChapterAssociation
            {
                CourseId    = row.Field <int>("CourseId"),
                ChapterId   = row.Field <int>("ChapterId"),
                ChapterCode = Common.ConvertFromDBVal <string>(row["ChapterCode"]),
                ChapterName = Common.ConvertFromDBVal <string>(row["ChapterName"])
            }).ToList();

            return(objlm);
        }
コード例 #2
0
 public IHttpActionResult UpdateCourseChapterAssociation(CourseChapterAssociation courseChapterAssociation)
 {
     return(Ok(new { results = courseChapterAssociationService.UpdateCourseChapterAssociation(courseChapterAssociation) }));
 }
コード例 #3
0
 public List <CourseChapterAssociation> UpdateCourseChapterAssociation(CourseChapterAssociation courseChapterAssociation)
 {
     return(CourseChapterAssociationDS.UpdateCourseChapterAssociation(courseChapterAssociation));
 }