internal string SaveCourseEnroll(Models.EnrollCourses enrollCourses) { try { return(_enrollCourseGetway.SaveCourseEnroll(enrollCourses)); } catch (Exception ex) { throw new Exception(ex.Message); } }
internal string SaveCourseEnroll(Models.EnrollCourses enrollCourses) { string Query = @"INSERT INTO [EnrollCourse] ([RegID] ,[CourseID] ,[Date] ,[Adby] ,[Addate]) VALUES ('" + enrollCourses.RegNo + "','" + enrollCourses.Course + "','" + enrollCourses.Date + "','Sojol',GETDATE())"; int rowEffect = DataTransfection.ExecuteNonQuery(Query); if (rowEffect > 0) { return("Record is/are Saved Sucessfully....!!"); } else { throw new Exception("Record Save Failed....!!! "); } }