public static void fn筆記資料夾更新(CNoteFolder noteFolder) { string sql = $"EXEC 筆記資料夾更新 @{CNoteFolderKey.fFolderId}, @{ CNoteFolderKey.fFolderName}"; List <SqlParameter> paras = new List <SqlParameter>() { new SqlParameter(CNoteFolderKey.fFolderId, noteFolder.fFolderId), new SqlParameter(CNoteFolderKey.fFolderName, noteFolder.fFolderName) }; CDbManager.executeSql(sql, paras); }
public static List <CNote> fn私人筆記查詢(CNoteFolder noteFolder) { string sql = $"EXEC 私人筆記查詢 "; sql += $"@{CNoteKey.fFolderId}"; List <SqlParameter> paras = new List <SqlParameter>() { new SqlParameter(CNoteKey.fFolderId, noteFolder.fFolderId) }; return((List <CNote>)CDbManager.querySql(sql, paras, reader私人筆記查詢)); }
public static int fn筆記資料夾新增(CMember member, CNoteFolder noteFolder) { string sql = $"EXEC 筆記資料夾新增 @{CNoteFolderKey.fMemberId}, @{CNoteFolderKey.fFolderName}"; List <SqlParameter> paras = new List <SqlParameter>() { new SqlParameter(CNoteFolderKey.fMemberId, member.fMemberId), new SqlParameter(CNoteFolderKey.fFolderName, noteFolder.fFolderName) }; CDbManager.executeSql(sql, paras); int folderid = fn筆記資料夾查詢(member).LastOrDefault().fFolderId; return(folderid); }
public static void fn筆記資料夾刪除(CNoteFolder folder, CMember member) { string sql = $"EXEC 筆記資料夾刪除 "; sql += $"@{CNoteFolderKey.fFolderId},"; sql += $"@{CNoteFolderKey.fMemberId}"; List <SqlParameter> paras = new List <SqlParameter>() { new SqlParameter(CNoteFolderKey.fFolderId, folder.fFolderId), new SqlParameter(CNoteFolderKey.fMemberId, member.fMemberId) }; CDbManager.executeSql(sql, paras); }
public static int fn私人筆記新增(CNoteFolder noteFolder, CNote note) { string sql = $"EXEC 私人筆記新增 "; sql += $"@{CNoteKey.fNoteListName},"; sql += $"@{CNoteKey.fCreateDateTime},"; sql += $"@{CNoteKey.fEditDateTime},"; sql += $"@{CNoteKey.fNoteListLevel},"; sql += $"@{CNoteKey.fIsMyFavourite},"; sql += $"@{CNoteKey.fIsTrash},"; sql += $"@{CNoteKey.fHTMLContent},"; sql += $"@{CNoteKey.fJsonContent},"; sql += $"@{CNoteKey.fTheShareLink},"; sql += $"@{CNoteKey.fTheContactPerson},"; sql += $"@{CNoteKey.fFolderId}"; List <SqlParameter> paras = new List <SqlParameter>() { new SqlParameter(CNoteKey.fNoteListName, note.fNoteListName), new SqlParameter(CNoteKey.fCreateDateTime, note.fCreateDateTime), new SqlParameter(CNoteKey.fEditDateTime, note.fEditDateTime), new SqlParameter(CNoteKey.fNoteListLevel, note.fNoteListLevel), new SqlParameter(CNoteKey.fIsMyFavourite, note.fIsMyFavourite), new SqlParameter(CNoteKey.fIsTrash, note.fIsTrash), new SqlParameter(CNoteKey.fHTMLContent, note.fHTMLContent), new SqlParameter(CNoteKey.fJsonContent, note.fJsonContent), new SqlParameter(CNoteKey.fTheShareLink, (object)note.fTheShareLink ?? DBNull.Value), //可NULL new SqlParameter(CNoteKey.fTheContactPerson, (object)note.fTheContactPerson ?? DBNull.Value), //可NULL new SqlParameter(CNoteKey.fFolderId, noteFolder.fFolderId) }; CDbManager.executeSql(sql, paras); int id = fn私人筆記查詢(noteFolder).LastOrDefault().fNoteId; return(id); }