摘要: SQL中获取一个长字符串中某个字符串出现次数的简单方法 比如有个字符串:X-BGS-2010-09-15-001我想知道其中'-'出现的次数,可以用下面的方法实现,而不需要复杂的一个个字符分析。declare @a varchar(100)set @a='X-BGS-2010-09-15-001'select len(replace(@a,'-','--'))-len(@a) 阅读全文
posted @ 2010-09-15 16:35 风也无奈 阅读(2932) 评论(0) 推荐(2) 编辑
摘要: public Form1(){ InitializeComponent(); bindingNavigator1.Items.Add( new ToolStripDateTimePicker());}public class ToolStripDateTimePicker : ToolStripControlHost { public ToolStripDateTimePicker() : bas... 阅读全文
posted @ 2010-09-15 14:13 风也无奈 阅读(506) 评论(1) 推荐(1) 编辑
摘要: private void dgvKBRollUp_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e) { if (dgvKBRollUp.Rows.Count != 0) { for (int i = 0; i < e.RowCount; i++) { this.dgvKBRollUp.Rows[e.RowIndex ... 阅读全文
posted @ 2010-09-15 14:12 风也无奈 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 《转载》自http://www.cnblogs.com/sundyy/archive/2008/01/19/1045319.html一、 需求的产生很多时候,需要根据年月或日期来检索数据。在我的数据库中,如果只需要以月为单位,我一般按照200801这样的格式(yyyyMM)保存为int类型。在做数据检索时,是根据工具栏中的两个ToolStripComboBox(一个年,一个月)选择的数据合并成一个... 阅读全文
posted @ 2010-09-15 14:10 风也无奈 阅读(671) 评论(0) 推荐(1) 编辑
dafad