{"id":9,"date":"2014-04-26T11:28:14","date_gmt":"2014-04-26T02:28:14","guid":{"rendered":"http:\/\/notes.sys-support.jp\/wp\/?p=9"},"modified":"2018-06-20T11:28:57","modified_gmt":"2018-06-20T02:28:57","slug":"%e3%82%b0%e3%83%aa%e3%83%83%e3%83%88%e6%9b%b4%e6%96%b0%e3%82%ab%e3%83%bc%e3%82%bd%e3%83%ab%e7%a7%bb%e5%8b%95","status":"publish","type":"post","link":"https:\/\/notes.sys-support.jp\/?p=9","title":{"rendered":"\u30b0\u30ea\u30c3\u30c8\u66f4\u65b0\u30ab\u30fc\u30bd\u30eb\u79fb\u52d5"},"content":{"rendered":"<p>type<br \/>\nTDummyDBGrid = class(TCustomDBGrid);<br \/>\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2013&gt;&gt;&gt;<\/p>\n<p>procedure TForm1.Button1Click(Sender: TObject);<br \/>\nvar<br \/>\nw_print,w_no : Integer;<br \/>\nw_sql : String;<br \/>\nRowCount, RN: Integer;<br \/>\nTopRowRecNo, CurrentRowNo: Integer;<br \/>\nbegin<\/p>\n<p>dm.sql_list.DisableControls;<br \/>\nCurrentRowNo := TDummyDBGrid(db_list).Row \u2013 1;<br \/>\nTopRowRecNo := dm.sql_list.RecNo \u2013 CurrentRowNo;<\/p>\n<p>if db_list.Fields[11].AsInteger = 0 then w_print := 1<br \/>\nelse w_print := 0;<\/p>\n<p>w_no := db_list.Fields[0].AsInteger;<\/p>\n<p>w_sql := \u2018UPDATE w_hurikomi_m SET w_hurikomi_m.print_flg = \u2018 + IntToStr(w_print);<br \/>\nw_sql := w_sql + \u2018 WHERE w_hurikomi_m.sql_no = \u2018 + IntToStr(w_no);<\/p>\n<p>with dm.ado_sql do begin<br \/>\nSQL.Clear;<br \/>\nSQL.Add(w_sql);<br \/>\nExecSQL;<br \/>\nend;<\/p>\n<p>dm.sql_list.Close;<br \/>\ndm.sql_list.Open;<\/p>\n<p>\/\/ \u6307\u5b9a\u30ec\u30b3\u30fc\u30c9\u3092TopRow\u306b\u79fb\u52d5\u3055\u305b\u308b\u51e6\u7406<br \/>\nRowCount := TDummyDBGrid(db_list).VisibleRowCount;<br \/>\ndm.sql_list.RecNo := TopRowRecNo;<br \/>\ndm.sql_list.MoveBy(RowCount);<\/p>\n<p>while not dm.sql_list.BOF do<br \/>\nbegin<br \/>\nRN := dm.sql_list.RecNo;<br \/>\nif RN = TopRowRecNo then<br \/>\nBreak<br \/>\nelse<br \/>\ndm.sql_list.Prior;<br \/>\nend;<\/p>\n<p>\/\/ \u30ab\u30fc\u30bd\u30eb\u3092\u5143\u306e\u30ab\u30ec\u30f3\u30c8\u30ec\u30b3\u30fc\u30c9\u306b\u79fb\u52d5\u3055\u305b\u308b\u51e6\u7406<br \/>\ndm.sql_list.MoveBy(CurrentRowNo);<br \/>\ndm.sql_list.EnableControls;<\/p>\n<p>Result := True;<\/p>\n<p>end;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>type TDummyDBGrid = class(TCustomDBGrid); \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2013&gt;&gt;&gt; procedure TForm1.Button1Click(Sender: TO &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/notes.sys-support.jp\/?p=9\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u30b0\u30ea\u30c3\u30c8\u66f4\u65b0\u30ab\u30fc\u30bd\u30eb\u79fb\u52d5&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-delphi"],"_links":{"self":[{"href":"https:\/\/notes.sys-support.jp\/index.php?rest_route=\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.sys-support.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.sys-support.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.sys-support.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.sys-support.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":0,"href":"https:\/\/notes.sys-support.jp\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"https:\/\/notes.sys-support.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.sys-support.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.sys-support.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}