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); }
public IHttpActionResult UpdateCourseChapterAssociation(CourseChapterAssociation courseChapterAssociation) { return(Ok(new { results = courseChapterAssociationService.UpdateCourseChapterAssociation(courseChapterAssociation) })); }
public List <CourseChapterAssociation> UpdateCourseChapterAssociation(CourseChapterAssociation courseChapterAssociation) { return(CourseChapterAssociationDS.UpdateCourseChapterAssociation(courseChapterAssociation)); }