示例#1
0
    public int AddTAS_CourseRecords(TAS_CourseRecord tAS_CourseRecord)
    {
        logHelper.InfoLog("", "AddTAS_CourseRecords");
        return(DapperHelper <int> .Query(@"INSERT INTO [dbo].[TAS_CourseRecord]
       ([CourseCode]
       ,[CourseTitle] 
       ,[Dept] 
       ,[Schooltime]
       ,[HQ]
       ,[UNITA]
       ,[UNITB]
       ,[UNITC]
       ,[ITGY]
       ,[MSAF]
       ,[SMG])
 VALUES
       (@CourseCode
       ,@CourseTitle 
       ,@Dept 
       ,@Schooltime
       ,@HQ
       ,@UNITA
       ,@UNITB
       ,@UNITC
       ,@ITGY
       ,@MSAF
       ,@SMG);SELECT CAST(SCOPE_IDENTITY() as int)", tAS_CourseRecord).FirstOrDefault());
    }
示例#2
0
 public TAS_CourseRecord GetTAS_CourseRecord(TAS_CourseRecord tAS_CourseRecord)
 {
     logHelper.InfoLog("", "GetTAS_CourseRecord");
     return(DapperHelper <TAS_CourseRecord> .QueryFirst(@"SELECT *
                                   FROM [dbo].[TAS_CourseRecord] 
                                       where Id=@id", tAS_CourseRecord));
 }
示例#3
0
 public List <TAS_CourseRecord> GetTAS_CourseRecords(TAS_CourseRecord tAS_CourseRecord)
 {
     logHelper.InfoLog("", "GetTAS_CourseRecords");
     return(DapperHelper <TAS_CourseRecord> .Query(@"SELECT *
                                   FROM [dbo].[TAS_CourseRecord] 
                                       where CourseCode=@CourseCode and CourseTitle=@CourseTitle and Type=@Type and Hours=@Hours and Dept=@Dept and UId=@UId and Schooltime=@Schooltime and HQ=@HQ and UNITA=@UNITA and UNITB=@UNITB and UNITC=@UNITC and ITGY=@ITGY and MSAF=@MSAF and SMG=@SMG and", tAS_CourseRecord));
 }