{"id":2147,"date":"2015-03-17T21:18:46","date_gmt":"2015-03-17T13:18:46","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=2147"},"modified":"2015-03-17T21:18:46","modified_gmt":"2015-03-17T13:18:46","slug":"qdataset-%e4%bd%bf%e7%94%a8-markstatus-%e5%87%bd%e6%95%b0%e6%9d%a5%e4%bf%ae%e6%94%b9%e8%ae%b0%e5%bd%95%e7%8a%b6%e6%80%81","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=2147","title":{"rendered":"QDataSet &#8211; \u4f7f\u7528 MarkStatus \u51fd\u6570\u6765\u4fee\u6539\u8bb0\u5f55\u72b6\u6001"},"content":{"rendered":"<p>QDataSet \u63d0\u4f9b\u4e86\u4e00\u4e2a MarkStatus \u51fd\u6570\uff0c\u5b83\u7684\u4f5c\u7528\u662f\u5c06\u6307\u5b9a\u7684\u8bb0\u5f55\u6807\u8bb0\u4e3a\u7279\u5b9a\u7684\u72b6\u6001\uff08\u65b0\u589e\u3001\u5220\u9664\u3001\u672a\u53d8\u66f4\uff09\u3002\u5b83\u53ef\u4ee5\u5728\u4e0e Provider \u76f8\u8fde\u65f6\uff0c\u76f4\u63a5\u6807\u8bb0\u8bb0\u5f55\u7684\u72b6\u6001\uff0c\u5e76\u63d0\u4ea4\u7ed3\u679c\u5230\u76f8\u5e94\u7684\u6570\u636e\u5e93\u4e2d\u3002\u6bd4\u5982\uff0c\u6211\u4eec\u5c06\u4e00\u4e2a\u6570\u636e\u96c6\u6240\u6709\u7684\u8bb0\u5f55\u6807\u8bb0\u4e3a usInserted \uff0c\u7136\u540e\u8c03\u7528 ApplyChanges \u5c06\u6570\u636e\u96c6\u6240\u6709\u7684\u8bb0\u5f55\u63d2\u5165\u5230\u76ee\u6807\u6570\u636e\u5e93\u4e2d\u7684\u7279\u5b9a\u8868\u4e2d\u3002<\/p>\n<p>\u6211\u4eec\u6765\u770b\u5b83\u7684\u51fd\u6570\u58f0\u660e\uff1a<\/p>\n<pre class=\"lang:delphi decode:true \">    \/\/\/ &lt;summary&gt; \u6807\u8bb0\u8bb0\u5f55\u7684\u72b6\u6001\u4e3a\u65b0\u72b6\u6001 &lt;\/summary&gt;\r\n    \/\/\/ &lt;param name=\"ANewStatus\"&gt; \u65b0\u72b6\u6001 &lt;\/summary&gt;\r\n    \/\/\/ &lt;param name=\"ApplyToAll\"&gt; \u662f\u5426\u5e94\u7528\u5230\u6240\u6709\u7684\u8bb0\u5f55\uff0c\u5982\u679c\u4e3aFalse\uff0c\u5219\u53ea\u4fee\u6539\u5f53\u524d\u8bb0\u5f55&lt;\/param&gt;\r\n    procedure MarkStatus(ANewStatus: TUpdateStatus; ApplyToAll: Boolean = True);\r\n<\/pre>\n<p>\u6211\u4eec\u7b80\u5355\u8bf4\u660e\u4e0b\u5b83\u7684\u53c2\u6570\uff1a<\/p>\n<ul>\n<li>ANewStatus \u662f\u4e00\u4e2a TUpdateStatus \u7c7b\u578b\u7684\u53c2\u6570\uff0c\u9664\u975e\u5f53\u524d\u8bb0\u5f55\u7684\u72b6\u6001\u662f usModified \uff0c\u5426\u5219\u8bbe\u7f6e ANewStatus \u53c2\u6570\u4e3a usModified \u4f1a\u629b\u51fa\u5f02\u5e38\uff1b\u5982\u679c ANewStatus \u7684\u503c\u4e3a usUnmodified\uff0c\u5219\u4f1a\u5408\u5e76\u8bb0\u5f55\u7684\u65b0\u503c\u4e3a\u539f\u59cb\u503c\uff0c\u5e76\u5c06\u8bb0\u5f55\u6807\u8bb0\u4e3a usUnmodified\uff0c\u5982\u679c ANewStatus \u7684\u503c\u4e3a usInserted\uff0c\u5219\u4f1a\u5408\u5e76\u8bb0\u5f55\u7684\u539f\u59cb\u503c\u4e3a\u65b0\u503c\uff0c\u5e76\u5c06\u8bb0\u5f55\u72b6\u6001\u6807\u8bb0\u4e3a usInserted\uff0c\u800c\u5982\u679c ANewStatus \u7684\u503c\u4e3a usDeleted \uff0c\u5219\u4f1a\u5c06\u8bb0\u5f55\u5220\u9664\u5e76\u5c06\u53d8\u66f4\u7684\u8bb0\u5f55\u7684\u6807\u8bb0\u4e3a usDeleted<\/li>\n<li>ApplyToAll \u53c2\u6570\u51b3\u5b9a\u4e86\u6807\u8bb0\u9762\u5411\u5168\u90e8\u8bb0\u5f55\uff0c\u8fd8\u662f\u53ea\u6807\u8bb0\u5f53\u524d\u8bb0\u5f55\u3002<\/li>\n<\/ul>\n<p>\u5173\u4e8e MarkStatus \u7684\u7528\u6cd5\u793a\u4f8b\uff0c\u53ef\u4ee5\u53c2\u8003 Demos\\Delphi\\VCL\\QDB\\Copy \u793a\u4f8b\u4e2d\u7684\u4ee3\u7801\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>QDataSet \u63d0\u4f9b\u4e86\u4e00\u4e2a MarkS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[69,8,9,66],"tags":[356,82,357],"class_list":["post-2147","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-qdac","category-qdb","tag-356","tag-82","tag-357"],"views":3031,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2147"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2147\/revisions"}],"predecessor-version":[{"id":2148,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2147\/revisions\/2148"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}