2009年6月23日

DataGridView添加最后一行总计

摘要: DataTable dt = ds.Tables[0];DataRow dr = dt.NewRow();dr[0] = "总计";dt.Rows.Add(dr); 阅读全文

posted @ 2009-06-23 11:47 欣路历程 阅读(773) 评论(0) 推荐(0) 编辑

2009年6月19日

sql语句中总计相加

摘要: select a.班别编号, a.人数上限,a.人数上限-b.total from table1 aleft join (select 班别,count(班别) total from table2 ) b on b.班别=a.班别编号 阅读全文

posted @ 2009-06-19 16:57 欣路历程 阅读(627) 评论(0) 推荐(0) 编辑

DataGridView最后总计行

摘要: private double sum = 0;//取指定列的数据和,你要根据具体情况对待可能你要处理的是int protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowIndex >= 0) { sum += Convert.ToDouble(e.Row.Cell... 阅读全文

posted @ 2009-06-19 16:55 欣路历程 阅读(558) 评论(0) 推荐(0) 编辑

CellFormatting事件绑定判断

摘要: private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e){ if (e.ColumnIndex == 1 /*status列的Index*/) { if (object.Equals(e.Value, 0)) { e.Value = "未完成"; e.CellSty... 阅读全文

posted @ 2009-06-19 16:54 欣路历程 阅读(2599) 评论(2) 推荐(0) 编辑

2009年6月18日

c# 打印和报表

摘要: 使用打印方法时,要先引用命名空间: Using System.Drawing.PringingPrintDocument类的重要属性和方法:属性:DocumentName 设置打印文档时要显示的文档名(在打印任务队列中显示)DefaultPageSettings 打印页面设置PrinterSettings 打印机设置方法:print() 进行打印事件:PrintPage 打印时触发的事件,在此... 阅读全文

posted @ 2009-06-18 16:57 欣路历程 阅读(10001) 评论(2) 推荐(0) 编辑

2009年6月17日

DataGridView控件的定位行问题

摘要: dbgTodayYY.FirstDisplayedScrollingRowIndex = dbgTodayYY.Rows.Count - 1; 阅读全文

posted @ 2009-06-17 11:46 欣路历程 阅读(295) 评论(0) 推荐(0) 编辑

2009年6月14日

sql中日期函数的用法(带例子)

摘要: 1.DateAdd ( I , N , D ) 将一个日期加上一段期间后的日期。 I :设定一个日期( Date )所加上的一段期间的单位。譬如 interval="d" 表示 N的单位为日。 I的设定值如下: yyyy Year 年 q Quarter 季 m Month 月 d Day 日 w Weekday 星期 h Hour 时 n Minute 分 s Second 秒 N :数值表达式... 阅读全文

posted @ 2009-06-14 13:43 欣路历程 阅读(639) 评论(0) 推荐(0) 编辑

2009年6月10日

WinForm中TabControl的一些事件写法(C#)

摘要: 在TabControl控件中并没提供单个选项卡的Click事件,今天下午翻了翻MSDN 结果还是没找到相关的文档:( 看来只有自个儿折腾了...还好有个SelectedIndexChanged事件为我所用:) 以下是代码片段:privatevoidtabControl1_SelectedIndexChanged(objectsender,System.EventArgse) { switch(th... 阅读全文

posted @ 2009-06-10 11:36 欣路历程 阅读(1906) 评论(0) 推荐(0) 编辑

2009年6月9日

C# GridView 操作汇总

摘要: GridView 操作汇总1、自定义列 Customize Cells and Columns in the Windows Forms DataGridView Control by Extending Their Behavior and Appearance Host Controls in Windows Forms DataGridView Cells 继承 DataGridVi... 阅读全文

posted @ 2009-06-09 10:56 欣路历程 阅读(2265) 评论(0) 推荐(0) 编辑

2009年2月26日

讲解工作流的相关博客地址

摘要: http://www.cnblogs.com/foundation/articles/534246.html 阅读全文

posted @ 2009-02-26 14:18 欣路历程 阅读(155) 评论(0) 推荐(0) 编辑

导航