可以解决DateTimePicker 无法为DBNull的代码.已经测试通过,收藏
2008-05-21 09:11
453 查看
转自 http://www.codeguru.com/csharp/csharp/cs_controls/custom/article.php/c9645/
using System;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
// Copyright (c) 2005 Claudio Grazioli, http://www.grazioli.ch
//
// This implementation of a nullable DateTimePicker is a new implementation
// from scratch, but it is based on ideas I took from this nullable
// DateTimePickers:
// - http://www.omnitalented.com/Blog/PermaLink,guid,9ee757fe-a3e8-46f7-ad04-ef7070934dc8.aspx
// from Alexander Shirshov
// - http://www.codeproject.com/cs/miscctrl/Nullable_DateTimePicker.asp
// from Pham Minh Tri
//
// This code is free software; you can redistribute it and/or modify it.
// However, this header must remain intact and unchanged. Additional
// information may be appended after this header. Publications based on
// this code must also include an appropriate reference.
//
// This code is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.
//
namespace ProjectMentor.Windows.Controls
using System;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
// Copyright (c) 2005 Claudio Grazioli, http://www.grazioli.ch
//
// This implementation of a nullable DateTimePicker is a new implementation
// from scratch, but it is based on ideas I took from this nullable
// DateTimePickers:
// - http://www.omnitalented.com/Blog/PermaLink,guid,9ee757fe-a3e8-46f7-ad04-ef7070934dc8.aspx
// from Alexander Shirshov
// - http://www.codeproject.com/cs/miscctrl/Nullable_DateTimePicker.asp
// from Pham Minh Tri
//
// This code is free software; you can redistribute it and/or modify it.
// However, this header must remain intact and unchanged. Additional
// information may be appended after this header. Publications based on
// this code must also include an appropriate reference.
//
// This code is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.
//
namespace ProjectMentor.Windows.Controls
相关文章推荐
- 解决iOS8.0以上系统下无法通过代码创建被删除过的同名相册 ( iOS 8 Photos framework: Create a albums with iOS8 )
- 教大家多个域名绑定一个空间的解决办法,原创,自己已经测试过了,完全可以绕过杀毒软件,以及空间商.
- robotium 在有源代码的情况下 写测试用例无法编译通过,生成apk。
- <img src="中文文件名" /> 无法显示图片,图片名改成英文就可以显示;试了下在电脑桌面写了个HTML测试下,可以显示中文名称的图片,解决方法
- Asp.Net异常:"由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式的值"的解决方法
- Tomcat在局域网中localhost可以访问,但是无法通过本地ip访问,127.0.0.1也无法访问问题的解决方法
- 解决调试asp.net程序时无法修改代码的问题(提示: 当调试器已经附加到已经运行的进程...)
- springmvc通过@Value注解读取Properties配置文件的值,junit测试可以取到值,但是在业务中无法读取
- Asp.Net异常:"由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式的值"的解决方法
- asp生成和导出excel和word数据源码和代码,简单好用(已经测试可以用)
- Asp.Net异常:"由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式的值"的解决方法
- [解决]多线程中出现由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达
- ASP.net 2.0发送邮件实例,本人已经测试通过,贴出代码
- Asp.Net异常:"由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式的值"的解决方法
- C#远程开机代码 【局域网测试通过】 分类: .NET 2011-10-26 11:45 2415人阅读 评论(1) 收藏
- 转:“由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式的值”的解决方法
- [Bug]由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式的值"的解决方法(转)
- 下载文件时报错 "由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式的值" 解决方法
- 解决Chrome浏览器打开新标签页,显示“无法访问此网站 连接已重置”的问题【在54.0 beta版上测试通过】
- Asp.Net异常:"由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式的值"的解决方法