コード例 #1
0
 public void Update(Lecture lecture)
 {
     Dictionary<string, Tuple<object, OracleDbType>> parameters = new Dictionary<string, Tuple<object, OracleDbType>>();
     parameters.Add("LECTURENAME_IN", new Tuple<object, OracleDbType>(lecture.LectureText, OracleDbType.Clob));
     parameters.Add("LECTUREFILE_IN", new Tuple<object, OracleDbType>(lecture.FilePath, OracleDbType.Varchar2));
     parameters.Add("LECTURESUBJECT_IN", new Tuple<object, OracleDbType>(lecture.Subject, OracleDbType.Varchar2));
     parameters.Add("LECTUREID_IN", new Tuple<object, OracleDbType>(lecture.LectureId, OracleDbType.Varchar2));
     parameters.Add("SUBJECTID_IN", new Tuple<object, OracleDbType>(Guid.NewGuid().ToString(), OracleDbType.Varchar2));
     string command = "UPDATE_LECTURE";
     var res = _database.ExecuteProcedure(command, parameters);
 }
コード例 #2
0
 public void Insert(Lecture lecture)
 {
     Dictionary<string,Tuple<object,OracleDbType>> parameters = new Dictionary<string, Tuple<object,OracleDbType>>();
     parameters.Add("LECTUREID_IN",new Tuple<object,OracleDbType>(lecture.LectureId, OracleDbType.Varchar2));
     parameters.Add("TUTORID_IN", new Tuple<object,OracleDbType>(lecture.TutorId, OracleDbType.Varchar2));
     parameters.Add("LECTURETXT_IN",new Tuple<object,OracleDbType>( lecture.LectureText, OracleDbType.Clob));
     parameters.Add("FILEPATH_IN",new Tuple<object,OracleDbType> (lecture.FilePath, OracleDbType.Varchar2));
     parameters.Add("SUBJECTID_IN" ,new Tuple<object,OracleDbType>(Guid.NewGuid().ToString(), OracleDbType.Varchar2));
     parameters.Add("SUBJECT_IN",new Tuple<object,OracleDbType>(lecture.Subject, OracleDbType.Varchar2) );
     string command = "ADD_LECTURE";
     var res =_database.ExecuteProcedure(command, parameters);
 }