WindowsアプリケーションのDateTimePickerで選択した日付のユーザーを、ビジネスロジックコードで取得したいとします。どうやってやるの? plzは私を助けます。WindowsアプリケーションのDateTimePicker
0
A
答えて
0
DateTimePicker.value
http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.aspx
3
ビジネス層のコードは、直接UIにアクセスするべきではありません。 DatePickerコントロールが存在するUIから選択した値を渡すことができます。この値を取得または設定するには、Valueプロパティを使用します。
2
DateTime selectedDate = Convert.ToDateTime(dtpExpireDate.Value);
DateTime todayDate = Convert.ToDateTime(DateTime.Now);
if (selectedDate < todayDate)
{
MessageBox.Show("Selected date Must be greater then Today's date");
}
関連する問題
- 1. .NET Windowsフォーム - DateTimePickerのクリックイベント
- 2. のDateTimePicker
- 3. Windowsフォームのdatetimepickerを毎年31stに設定します
- 4. Windowsフォームでdatetimepickerのスタイルを変更する
- 5. Windowsアプリケーションのページングコントロール
- 6. Windowsアプリケーションのセットアップエラー
- 7. Windowsアプリケーションのオーバーレイ
- 8. Windowsアプリケーションのスクロールバッファリング
- 9. のWindows 8.1アプリケーション
- 10. Windowsアプリケーションのインストーラ
- 11. Windowsアプリケーション
- 12. のjQueryのDateTimePicker
- 13. jqueryののDateTimePicker
- 14. のDateTimePickerのレイアウトエラー
- 15. DateTimePickerの書式
- 16. ブートストラップのDateTimePicker
- 17. ブートストラップのDateTimePickerは
- 18. のDateTimePicker ASP.NET MVC
- 19. のDateTimePicker C#
- 20. ブートストラップのDateTimePicker -
- 21. MVC3.0のdatetimepicker
- 22. WPF 4.0のDateTimePicker
- 23. カスタムカレンダーのDateTimePicker
- 24. datetimepickerモバイルでネイティブdatetimepickerを使用
- 25. Datetimepickerエラー
- 26. C#DateTimePicker
- 27. DateTimePickerデータバインディング
- 28. WindowsアプリケーションMicrosoft Windows Azureクラウドサービス
- 29. WindowsアプリケーションのDropbox redirect_uri
- 30. Windows 10のVB6アプリケーション