{"id":123,"date":"2013-12-30T07:46:29","date_gmt":"2013-12-29T22:46:29","guid":{"rendered":"https:\/\/prg.waou.biz\/?p=123"},"modified":"2018-03-03T09:04:25","modified_gmt":"2018-03-03T00:04:25","slug":"%e3%82%b3%e3%83%b3%e3%83%9c%e3%83%9c%e3%83%83%e3%82%af%e3%82%b9%e3%82%bb%e3%83%ab%e3%81%abdb%e3%81%8b%e3%82%89%e5%80%a4%e3%82%92%e5%85%a5%e3%82%8c%e3%82%8b","status":"publish","type":"post","link":"https:\/\/prg.waou.biz\/?p=123","title":{"rendered":"\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u30bb\u30eb\u306bDB\u304b\u3089\u5024\u3092\u5165\u308c\u308b"},"content":{"rendered":"\n<pre class=\"lang:default decode:true \" >\/\/\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u306b\u8ffd\u52a0\u3059\u308b\u9805\u76ee\u3068\u306a\u308b\u30af\u30e9\u30b9\u306e\u5b9a\u7fa9\r\n\r\npublic class MyComboBoxItem\r\n\r\n{\r\n\r\nprivate int m_id;\r\n\r\nprivate string m_name = \"\";\r\n\r\n\/\/\u5b9f\u969b\u306e\u5024\r\n\r\n\/\/\uff08ValueMember\u306b\u8a2d\u5b9a\u3059\u308b\u6587\u5b57\u5217\u3068\u540c\u540d\u306b\u3059\u308b\uff09\r\n\r\npublic int ID\r\n\r\n{\r\n\r\nset\r\n\r\n{\r\n\r\nm_id = value;\r\n\r\n}\r\n\r\nget\r\n\r\n{\r\n\r\nreturn m_id;\r\n\r\n}\r\n\r\n}\r\n\r\n\r\n\r\n\/\/\u8868\u793a\u540d\u79f0\r\n\r\n\/\/\uff08DisplayMember\u306b\u8a2d\u5b9a\u3059\u308b\u6587\u5b57\u5217\u3068\u540c\u540d\u306b\u3059\u308b\uff09\r\n\r\npublic string NAME\r\n\r\n{\r\n\r\nset\r\n\r\n{\r\n\r\nm_name = value;\r\n\r\n}\r\n\r\nget\r\n\r\n{\r\n\r\nreturn m_name;\r\n\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\n\r\n\r\n\r\n\r\nList&lt;MyComboBoxItem&gt; comboListSend = new List&lt;MyComboBoxItem&gt;();\r\n\r\n\r\n\r\nList&lt;MyComboBoxItem&gt; comboListPay = new List&lt;MyComboBoxItem&gt;();\r\n\r\n\r\n\r\nMyComboBoxItem mySourceSend;\r\n\r\nMyComboBoxItem mySourcePay;\r\n\r\n\r\n\r\nvar.dbComb = Func.DbConect(Application.StartupPath + \"\\\\userData.mdb\", \"koumoku\", \"\");\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nforeach (DataRowView drv in var.dbComb.View)\r\n\r\n{\r\n\r\nmySourceSend = new MyComboBoxItem();\r\n\r\nmySourcePay = new MyComboBoxItem();\r\n\r\nmySourcePay.ID = mySourceSend.ID = Convert.ToInt32(drv[\"id\"]);\r\n\r\nmySourceSend.NAME = drv[\"send\"].ToString();\r\n\r\nmySourcePay.NAME = drv[\"pay\"].ToString();\r\n\r\ncomboListSend.Add(mySourceSend);\r\n\r\ncomboListPay.Add(mySourcePay);\r\n\r\n\r\n\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\/\/ \u7a2e\u5225\u306e\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u306e\u8a2d\u5b9a\r\n\r\nComboBoxCell comboBoxCell = template1.Row.Cells[\"comboBoxCell1\"] as ComboBoxCell;\r\n\r\n\/\/\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u306e\u9805\u76ee\u306e\u5143\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\r\n\r\ncomboBoxCell.DataSource = comboListSend;\r\n\r\n\/\/\u5143\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u306e\u3069\u306e\u30b3\u30e9\u30e0\u3092\u30d7\u30eb\u30c0\u30a6\u30f3\u306b\u8868\u793a\u3055\u305b\u308b\u304b\r\n\r\ncomboBoxCell.DisplayMember = \"NAME\";\r\n\r\n\/\/ \u89aa\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u9023\u643a\u3059\u308b\u305f\u3081\u306e\u5143\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u306e\u9805\u76ee\r\n\r\n\/\/\u3053\u3053\u304c\uff11\u3068\u304b\uff12\u306b\u306a\u3063\u3066\u3044\u308b\u3002\r\n\r\ncomboBoxCell.ValueMember = \"ID\";\r\n\r\n\/\/\u89aa\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u3069\u306e\u9805\u76ee\u3068\u9023\u643a\u3055\u305b\u308b\u304b\r\n\r\n\/\/\u3053\u3053\u304c\uff11\u3068\u304b\uff12\u306b\u306a\u3063\u3066\u3044\u308b\u3002\r\n\r\ncomboBoxCell.DataField = \"postMethod\";\r\n\r\n\/\/ comboBoxCell.Style.BackColor = Color.Red;\r\n\r\n\/\/ comboBoxCell\u306b\u8272\u3092\u4ed8\u3051\u308b\r\n\r\ncomboBoxCell.DropDownStyle = MultiRowComboBoxStyle.DropDown;\r\n\r\ncomboBoxCell.FlatStyle = FlatStyle.Flat;\r\n\r\n\r\n\r\n\/\/ gcMultiRow1.Rows[0].Cells[\"comboBoxCell1\"].Style.BackColor = Color.Red;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\/\/ \u7a2e\u5225\u306e\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u306e\u8a2d\u5b9a\r\n\r\nComboBoxCell comboBoxCell2 = template1.Row.Cells[\"comboBoxCell2\"] as ComboBoxCell;\r\n\r\n\/\/\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u306e\u9805\u76ee\u306e\u5143\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\r\n\r\n\/\/ \u00a0comboBoxCell2.DataSource = comboTable.CreatePayData();\r\n\r\n\r\n\r\ncomboBoxCell2.DataSource = comboListPay;\r\n\r\n\/\/\u5143\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u306e\u3069\u306e\u30b3\u30e9\u30e0\u3092\u8868\u793a\u3055\u305b\u308b\u304b\r\n\r\ncomboBoxCell2.DisplayMember = \"NAME\";\r\n\r\n\/\/ \u89aa\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u9023\u643a\u3059\u308b\u305f\u3081\u306b\u5143\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u306e\u9805\u76ee\r\n\r\ncomboBoxCell2.ValueMember = \"ID\";\r\n\r\n\/\/\u89aa\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u3069\u306e\u9805\u76ee\u3068\u9023\u643a\u3055\u305b\u308b\u304b\r\n\r\ncomboBoxCell2.DataField = \"payMethod\";\r\n\r\n\/\/ comboBoxCell.Style.BackColor = Color.Red;\r\n\r\n\/\/ comboBoxCell\u306b\u8272\u3092\u4ed8\u3051\u308b\r\n\r\ncomboBoxCell2.DropDownStyle = MultiRowComboBoxStyle.DropDown;\r\n\r\ncomboBoxCell2.FlatStyle = FlatStyle.Flat;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u306b\u8ffd\u52a0\u3059\u308b\u9805\u76ee\u3068\u306a\u308b\u30af\u30e9\u30b9\u306e\u5b9a\u7fa9 public class MyComboBoxItem { private int m_id; private string m_name = &#8220;&#8221;; \/\/\u5b9f\u969b\u306e\u5024 \/ [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_lightning_design_setting":[],"footnotes":""},"categories":[12],"tags":[],"class_list":["post-123","post","type-post","status-publish","format-standard","hentry","category-multirow"],"_links":{"self":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=123"}],"version-history":[{"count":3,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":881,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/123\/revisions\/881"}],"wp:attachment":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}