Ejemplo n.º 1
0
        public static void fn留言更新(CComment comment)
        {
            string sql = $"EXEC 留言更新 @{CCommentKey.fCommentId},";

            sql += $"@{CCommentKey.fCommentDateTime},";
            sql += $"@{CCommentKey.fContent},";
            sql += $"@{CCommentKey.fIsRetract},";
            sql += $"@{CCommentKey.fLikeCount},";
            sql += $"@{CCommentKey.fIsBanned},";
            sql += $"@{CCommentKey.fProductId},";
            sql += $"@{CCommentKey.fMemberId}";
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CCommentKey.fCommentId, comment.fCommentId),
                new SqlParameter(CCommentKey.fCommentDateTime, comment.fCommentDateTime),
                new SqlParameter(CCommentKey.fContent, comment.fContent),
                new SqlParameter(CCommentKey.fIsRetract, comment.fIsRetract),
                new SqlParameter(CCommentKey.fLikeCount, comment.fLikeCount),
                new SqlParameter(CCommentKey.fIsBanned, comment.fIsBanned),
                new SqlParameter(CCommentKey.fProductId, comment.fProductId),
                new SqlParameter(CCommentKey.fMemberId, comment.fMemberId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 2
0
        public static void fn商品更新(CProduct product)
        {
            string sql = $"EXEC 商品更新 ";

            sql += $"@{CProductKey.fProductId},";
            sql += $"@{CProductKey.fName},";
            sql += $"@{CProductKey.fDescription},";
            sql += $"@{CProductKey.fContent},";
            sql += $"@{CProductKey.fPrice},";
            sql += $"@{CProductKey.fLaunchDate},";
            sql += $"@{CProductKey.fTheRemovedDate},";
            sql += $"@{CProductKey.fDownloadTimes},";
            sql += $"@{CProductKey.fLikeCount},";
            sql += $"@{CProductKey.fMemberSellerId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CProductKey.fProductId, product.fProductId),
                new SqlParameter(CProductKey.fName, product.fName),
                new SqlParameter(CProductKey.fDescription, product.fDescription),
                new SqlParameter(CProductKey.fContent, product.fContent),
                new SqlParameter(CProductKey.fPrice, product.fPrice),
                new SqlParameter(CProductKey.fLaunchDate, product.fLaunchDate),
                new SqlParameter(CProductKey.fTheRemovedDate, (object)product.fTheRemovedDate ?? DBNull.Value), //可NULL
                new SqlParameter(CProductKey.fDownloadTimes, product.fDownloadTimes),
                new SqlParameter(CProductKey.fLikeCount, product.fLikeCount),
                new SqlParameter(CProductKey.fMemberSellerId, product.fMemberSellerId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 3
0
        public static void fn訂單私人筆記新增(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, note.fFolderId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 4
0
        public static CProduct fn商品新增(CMember member, CProduct product)
        {
            string sql = $"EXEC 商品新增 ";

            sql += $"@{CProductKey.fName},";
            sql += $"@{CProductKey.fDescription},";
            sql += $"@{CProductKey.fContent},";
            sql += $"@{CProductKey.fPrice},";
            sql += $"@{CProductKey.fLaunchDate},";
            sql += $"@{CProductKey.fTheRemovedDate},";
            sql += $"@{CProductKey.fDownloadTimes},";
            sql += $"@{CProductKey.fLikeCount},";
            sql += $"@{CProductKey.fMemberSellerId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CProductKey.fName, product.fName),
                new SqlParameter(CProductKey.fDescription, product.fDescription),
                new SqlParameter(CProductKey.fContent, product.fContent),
                new SqlParameter(CProductKey.fPrice, product.fPrice),
                new SqlParameter(CProductKey.fLaunchDate, product.fLaunchDate),
                new SqlParameter(CProductKey.fTheRemovedDate, (object)product.fTheRemovedDate ?? DBNull.Value), //可NULL
                new SqlParameter(CProductKey.fDownloadTimes, product.fDownloadTimes),
                new SqlParameter(CProductKey.fLikeCount, product.fLikeCount),
                new SqlParameter(CProductKey.fMemberSellerId, member.fMemberId)
            };

            CDbManager.executeSql(sql, paras);
            CProduct NewProduct = fn商品查詢().LastOrDefault();

            return(NewProduct);
        }
Ejemplo n.º 5
0
        public static void 管理員更新(CAdmin admin)
        {
            string sql = $"EXEC 管理員更新 ";

            sql += $"@{CAdminKey.fAdminId},";
            sql += $"@{CAdminKey.fAdminAccount},";
            sql += $"@{CAdminKey.fAdminPassword},";
            sql += $"@{CAdminKey.fName},";
            sql += $"@{CAdminKey.fGender},";
            sql += $"@{CAdminKey.fBirthDay},";
            sql += $"@{CAdminKey.fTheAddress},";
            sql += $"@{CAdminKey.fMobilePhone},";
            sql += $"@{CAdminKey.fThePhoto},";
            sql += $"@{CAdminKey.fHireDateTime},";
            sql += $"@{CAdminKey.fLastLoginDateTime}";



            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CAdminKey.fAdminId, admin.fAdminId),
                new SqlParameter(CAdminKey.fAdminAccount, admin.fAdminAccount),
                new SqlParameter(CAdminKey.fAdminPassword, admin.fAdminPassword),
                new SqlParameter(CAdminKey.fName, admin.fName),
                new SqlParameter(CAdminKey.fGender, admin.fGender),
                new SqlParameter(CAdminKey.fBirthDay, admin.fBirthDay),
                new SqlParameter(CAdminKey.fTheAddress, (object)admin.fTheAddress ?? DBNull.Value), //可NULL
                new SqlParameter(CAdminKey.fMobilePhone, admin.fMobilePhone),
                new SqlParameter(CAdminKey.fThePhoto, (object)admin.fThePhoto ?? DBNull.Value),     //可NULL
                new SqlParameter(CAdminKey.fHireDateTime, admin.fHireDateTime),
                new SqlParameter(CAdminKey.fLastLoginDateTime, admin.fLastLoginDateTime)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 6
0
        public static void fn聊聊更新(int a)
        {
            string sql = $"EXEC 聊聊更新 @{CChatKey.fChatId}";
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CChatKey.fChatId, a)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 7
0
        public static void fn會員瀏覽紀錄新增(CMember member)
        {
            string sql = $"EXEC 會員瀏覽紀錄新增 @{CMemberBrowseKey.fMemberId}";
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CMemberBrowseKey.fMemberId, member.fMemberId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        public static void fn會員更新點數(CMember member, int point)
        {
            string sql = $"EXEC 會員更新點數 @{CMemberKey.fMemberId},@{CMemberKey.fMoneyPoint}";
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CMemberKey.fMemberId, member.fMemberId),
                new SqlParameter(CMemberKey.fMoneyPoint, point)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 10
0
        //=========================== 購物車個人更新 =========================== //
        public static void fn購物車個人更新(int cartid)
        {
            string sql = $"EXEC 購物車個人更新 @{CCartKey.fCartId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CCartKey.fCartId, cartid),
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 11
0
        public static void fn聊聊已讀更新(int a, CMember member)
        {
            string sql = $"EXEC 聊聊已讀更新 @{CChatKey.fMemberFrom},@{CChatKey.fMemberTo}";
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CChatKey.fMemberFrom, a),
                new SqlParameter(CChatKey.fMemberTo, member.fMemberId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 12
0
        //=========================== 商品類別對照刪除 =========================== //
        public static void fn商品類別對照刪除(CProductCompare productCompare)
        {
            string sql = $"EXEC 商品類別對照刪除 ";

            sql += $"@{CProductCompareKey.fProductComparedId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CProductCompareKey.fProductComparedId, productCompare.fProductComparedId),
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 13
0
        public static void fn私人筆記刪除(CNote note)
        {
            string sql = $"EXEC 私人筆記刪除 ";

            sql += $"@{CNoteKey.fNoteId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CNoteKey.fNoteId, note.fNoteId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 14
0
        public static void fn訂單明細新增(int orderid, int 產品ID)
        {
            string sql = $"EXEC 訂單明細新增 @{CDetailOrderKey.fProductId},";

            sql += $"@{CDetailOrderKey.fOrderId}";
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CDetailOrderKey.fProductId, 產品ID),
                new SqlParameter(CDetailOrderKey.fOrderId, orderid)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 15
0
        public static void fn公司獲利新增(CIncome Income)
        {
            string sql = $"EXEC 公司獲利新增 @{CIncomeKey.fIncome},@{ CIncomeKey.fPaymentDateTime},@{ CIncomeKey.fIncomeCategory},@{CIncomeKey.fMemberId}";
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CIncomeKey.fIncome, Income.fIncome),
                new SqlParameter(CIncomeKey.fPaymentDateTime, Income.fPaymentDateTime),
                new SqlParameter(CIncomeKey.fIncomeCategory, Income.fIncomeCategory),
                new SqlParameter(CIncomeKey.fMemberId, Income.fMemberId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 16
0
        //=========================== 購物車商品刪除 =========================== //
        public static void fn購物車商品刪除(CCartProduct cartProduct)
        {
            string sql = $"EXEC 購物車商品刪除 ";

            sql += $"@{CCartProductKey.fCartProductId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CCartProductKey.fCartProductId, cartProduct.fCartProductId),
            };

            CDbManager.executeSql(sql, paras);
        }
        //=========================== 商品類別新增 =========================== //
        public static void fn商品類別新增(CProductCategory productCategory)
        {
            string sql = $"EXEC 商品類別新增 ";

            sql += $"@{CProductCategoryKey.fCategoryName}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CProductCategoryKey.fCategoryId, productCategory.fCategoryId),
                new SqlParameter(CProductCategoryKey.fCategoryName, productCategory.fCategoryName)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 18
0
        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);
        }
Ejemplo n.º 19
0
        //=========================== 商品類別對照新增 =========================== //
        public static void fn商品類別對照新增(CProduct product, CProductCategory productCategory)
        {
            string sql = $"EXEC 商品類別對照新增 ";

            sql += $"@{CProductCompareKey.fProductId},";
            sql += $"@{CProductCompareKey.fCategoryId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CProductCompareKey.fProductId, product.fProductId),
                new SqlParameter(CProductCompareKey.fCategoryId, productCategory.fCategoryId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 20
0
        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);
        }
Ejemplo n.º 21
0
        //=========================== 商品瀏覽紀錄新增 =========================== //
        public static void fn商品瀏覽紀錄新增(CProduct product, CProductBrowse productBorwse)
        {
            string sql = $"EXEC 商品瀏覽紀錄新增 ";

            sql += $"@{CProductBrowseKey.fBrowseDataTime},";
            sql += $"@{CProductBrowseKey.fProductId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CProductBrowseKey.fBrowseDataTime, productBorwse.fBrowseDataTime),
                new SqlParameter(CProductBrowseKey.fProductId, product.fProductId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 22
0
        public static void fn黑名單刪除(CBlackList blackList)
        {
            string sql = $"EXEC 黑名單刪除 ";

            sql += $"@{CBlackListKey.fBannedId}";
            //sql += $"@{CBlackListKey.fMemberId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CBlackListKey.fBannedId, blackList.fBannedId)
                //new SqlParameter(CBlackListKey.fMemberId, member.fMemberId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 23
0
        //=========================== 商品圖片新增 =========================== //
        public static void fn商品圖片新增(CProduct product, CProductPicture productPicture)
        {
            string sql = $"EXEC 商品圖片新增 ";

            sql += $"@{CProductPictureKey.fPicture},";
            sql += $"@{CProductPictureKey.fProductId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CProductPictureKey.fPicture, productPicture.fPicture),
                new SqlParameter(CProductPictureKey.fProductId, product.fProductId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 24
0
        public static void fn訂單新增(COrder order)
        {
            string sql = $"EXEC 訂單新增 @{COrderKey.fPurchaseDate},";

            sql += $"@{COrderKey.fTotalPrice},";
            sql += $"@{COrderKey.fMemberId}";
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(COrderKey.fPurchaseDate, order.fPurchaseDate),
                new SqlParameter(COrderKey.fTotalPrice, order.fTotalPrice),
                new SqlParameter(COrderKey.fMemberId, order.fMemberId),
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 25
0
        public static void fn會員更新(CMember member)
        {
            string sql = $"EXEC 會員更新 ";

            sql += $"@{CMemberKey.fMemberId},";
            sql += $"@{CMemberKey.fAccount},";
            sql += $"@{CMemberKey.fPassword},";
            sql += $"@{CMemberKey.fFirstName},";
            sql += $"@{CMemberKey.fLastName},";
            sql += $"@{CMemberKey.fTheNickName},";
            sql += $"@{CMemberKey.fGender},";
            sql += $"@{CMemberKey.fBirthDay},";
            sql += $"@{CMemberKey.fTheAddress},";
            sql += $"@{CMemberKey.fMobilePhone},";
            sql += $"@{CMemberKey.fMoneyPoint},";
            sql += $"@{CMemberKey.fPhoto},";
            sql += $"@{CMemberKey.fRegisterDateTime},";
            sql += $"@{CMemberKey.fLastLoginDateTime},";
            sql += $"@{CMemberKey.fIsVIP},";
            sql += $"@{CMemberKey.fIsBanned},";
            sql += $"@{CMemberKey.fThePasswordURL}";
            //https://stackoverflow.com/questions/863374/sqlparameter-with-nullable-value-give-error-while-executenonquery
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CMemberKey.fMemberId, member.fMemberId),
                new SqlParameter(CMemberKey.fAccount, member.fAccount),
                new SqlParameter(CMemberKey.fPassword, member.fPassword),
                new SqlParameter(CMemberKey.fFirstName, member.fFirstName),
                new SqlParameter(CMemberKey.fLastName, member.fLastName),
                //fTheNickName可為NULL
                new SqlParameter(CMemberKey.fTheNickName, (object)member.fTheNickName ?? DBNull.Value),
                new SqlParameter(CMemberKey.fGender, member.fGender),
                new SqlParameter(CMemberKey.fBirthDay, member.fBirthDay),
                //fTheAddress可為NULL
                new SqlParameter(CMemberKey.fTheAddress, (object)member.fTheAddress ?? DBNull.Value),
                new SqlParameter(CMemberKey.fMobilePhone, member.fMobilePhone),
                new SqlParameter(CMemberKey.fMoneyPoint, member.fMoneyPoint),
                new SqlParameter(CMemberKey.fPhoto, member.fPhoto),
                new SqlParameter(CMemberKey.fRegisterDateTime, member.fRegisterDateTime),
                new SqlParameter(CMemberKey.fLastLoginDateTime, member.fLastLoginDateTime),
                new SqlParameter(CMemberKey.fIsVIP, member.fIsVIP),
                new SqlParameter(CMemberKey.fIsBanned, member.fIsBanned),
                //fThePasswordURL可為NULL
                new SqlParameter(CMemberKey.fThePasswordURL, (object)member.fThePasswordURL ?? DBNull.Value)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 26
0
        public static void fn評價新增(CProductRank productRank)
        {
            string sql = $"EXEC 評價新增 @{CProductRankKey.fRank},";

            sql += $"@{CProductRankKey.fComment},";
            sql += $"@{CProductRankKey.fSubmitDataTime},";
            sql += $"@{CProductRankKey.fDetailOrderIId}";
            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CProductRankKey.fRank, productRank.fRank),
                new SqlParameter(CProductRankKey.fComment, productRank.fComment),
                new SqlParameter(CProductRankKey.fSubmitDataTime, productRank.fSubmitDataTime),
                new SqlParameter(CProductRankKey.fDetailOrderIId, productRank.fDetailOrderIId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 27
0
        //=========================== 購物車更新 =========================== //
        public static void fn購物車更新(CCart cart)
        {
            string sql = $"EXEC 購物車更新 ";

            sql += $"@{CCartKey.fCartId},";
            sql += $"@{CCartKey.fSubmitTime},";
            sql += $"@{CCartKey.fMemberId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CCartKey.fCartId, cart.fCartId),
                new SqlParameter(CCartKey.fSubmitTime, (object)cart.fSubmitTime ?? DBNull.Value),//可NULL
                new SqlParameter(CCartKey.fMemberId, cart.fMemberId)
            };

            CDbManager.executeSql(sql, paras);
        }
Ejemplo n.º 28
0
        //=========================== 購物車新增 =========================== //
        public static CCart fn購物車新增(CMember member, CCart cart)
        {
            string sql = $"EXEC 購物車新增 ";

            sql += $"@{CCartKey.fSubmitTime},";
            sql += $"@{CCartKey.fMemberId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CCartKey.fSubmitTime, (object)cart.fSubmitTime ?? DBNull.Value), //可NULL
                new SqlParameter(CCartKey.fMemberId, member.fMemberId)
            };

            CDbManager.executeSql(sql, paras);
            CCart NewCart = fn購物車查詢(member).LastOrDefault();

            return(NewCart);
        }
Ejemplo n.º 29
0
        //=========================== 購物車商品新增 =========================== //
        public static CCartProduct fn購物車商品新增(CProduct product, CCart cart)
        {
            string sql = $"EXEC 購物車商品新增 ";

            sql += $"@{CCartProductKey.fProductId},";
            sql += $"@{CCartProductKey.fCartId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CCartProductKey.fProductId, product.fProductId),
                new SqlParameter(CCartProductKey.fCartId, cart.fCartId)
            };

            CDbManager.executeSql(sql, paras);
            CCartProduct NewCartProduct = fn購物車商品查詢().LastOrDefault();

            return(NewCartProduct);
        }
Ejemplo n.º 30
0
        public static void fn筆記版本控制新增(CNote note)
        {
            string sql = $"EXEC 筆記版本控制新增 ";

            sql += $"@{CVersionKey.fEditDateTime},";
            sql += $"@{CVersionKey.fHTMLContent},";
            sql += $"@{CVersionKey.fJsonContent},";
            sql += $"@{CVersionKey.fNoteId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CVersionKey.fEditDateTime, note.fEditDateTime),
                new SqlParameter(CVersionKey.fHTMLContent, note.fHTMLContent),
                new SqlParameter(CVersionKey.fJsonContent, note.fJsonContent),
                new SqlParameter(CVersionKey.fNoteId, note.fNoteId)
            };

            CDbManager.executeSql(sql, paras);
        }