<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>redwarrior</author_name>
  <author_url>https://blog.hatena.ne.jp/redwarrior/</author_url>
  <blog_title>redwarrior’s diary</blog_title>
  <blog_url>https://redwarrior.hateblo.jp/</blog_url>
  <categories>
    <anon>WinForms</anon>
    <anon>.NET Framework</anon>
  </categories>
  <description>以前にWindowsフォームで作成したアプリケーションを修正する機会があり、BindingSourceについて理解が深まったので、記録を残しておく。 「TextBoxに入力した値をバリデーションして、正しい値ならば紐づいたDBのレコードを更新する」というよくある処理を実装する場合、BindingSourceを使用してBindingを行うと以下のようなケースで便利だった。 バリデーションでエラーになったら、変更前の値を復元したい バリデーション処理は、Validatingイベントを使用すると思うが、パラメータから取得できる値、TextBoxフィールドの値も変更後の値になっている。 このままでは変…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fredwarrior.hateblo.jp%2Fentry%2F2019%2F03%2F07%2F090000&quot; title=&quot;BindingSourceを使用したTextBoxのデータ入力時におけるメリット - redwarrior’s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-03-07 09:00:00</published>
  <title>BindingSourceを使用したTextBoxのデータ入力時におけるメリット</title>
  <type>rich</type>
  <url>https://redwarrior.hateblo.jp/entry/2019/03/07/090000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
