- 博客(24)
- 资源 (1)
- 收藏
- 关注
转载 C#根据中文自动提取每个字的首字母
private void simpleButton1_Click(object sender, EventArgs e) { string strText = this.textEdit1.Text.ToString().Trim(); textEdit2.Text = GetChineseSpell(strText);
2013-10-17 14:59:55
1322
转载 GridLookUpEdit
http://www.cnblogs.com/freexiaoyu/archive/2012/09/14/2684365.html
2013-10-15 16:37:17
1117
转载 Oracle Function基本语法及示例
http://www.dedecms.com/knowledge/data-base/oracle/2012/0828/13433.html Oracle基本语法 基本语法如下所示 CREATE OR REPLACE FUNCTION function_name [(parameters)] RETURN datatype IS [declare section] BEGIN [sta
2013-10-11 16:28:58
4374
原创 改变gv内容之后自动更新footer中的总和方法
gv.updatetotalsummary()。 保存更新之后的数据 必须先转移焦点,否则更新的数据不是最新的。
2013-10-10 14:09:29
1115
原创 提取(GridControl数据源只改变若干条记录)datatable中的指定记录(DicTionary)
Dictionary Dic_EditRow = new Dictionary();利用DicTionary;int 是主键,必须唯一标示第一步:记录修改过的行使用GV_CellValueChanged事件 private void gvFilewage_CellValueChanged(object sender, DevExpress.XtraGrid.Vie
2013-10-10 11:40:50
902
原创 DockPanel从哪来(停靠,拖拽目录控件,能自动隐藏的目录)
想要的功能是菜单栏能隐藏,能展示。类似vs上属性栏,工具箱。 错误方法:之前在网上看的需要下载dockpanel.dll。。。。。。自己也手动写过一个dockpanel控件(designer中写的)。。。。。。 正确方法:第一步:添加一个dockmanager,点击dockmanager上的三角,再点击(Add Panel At Left 默认在左边)第二步:再往d
2013-10-08 11:38:55
1921
转载 Dev GridView 隔行换色的方法
隔行换色的方法 this.gridView1.Appearance.OddRow.BackColor = Color.White; // 设置奇数行颜色 // 默认也是白色 可以省略this.gridView1.OptionsView.EnableAppearanceOddRow = true; // 使能 // 和和上面绑定 同时使用有效this.gridView
2013-09-28 11:54:50
1564
转载 Dev Express GridView 格式化数据(随时验证输入的数据是否合法)
格式化数据 private void gvList_ValidatingEditor(object sender, DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs e) { if (this.gvList.FocusedColum
2013-09-28 11:11:07
1519
原创 Dev TreeList展开是原来勾选的结点继续勾选功能
根据结点的名称来找到对应的结点进行勾选与否的设置 还有一种方法是根据id来找到结点主要用的是TreeList的自带方法treeHouseGTSyks.FindNodeByFieldValue("FID", str_popGTDepID[i].ToString())和treeHouseGTSyks.SetNodeCheckState(node,checkstate); p
2013-09-27 16:04:50
1459
原创 Dev TreeList展开宽度设置成与Cell宽度一致
repositoryItemPopMY是我在GridView中添加的模板列 private void repositoryItemPopMY_QueryPopUp(object sender, CancelEventArgs e) { PopupContainerEdit popupedit = (PopupContainerEdit)send
2013-09-27 15:58:45
2733
原创 某个日期加上一定的月份之后的日期计算
private void simpleButton1_Click(object sender, EventArgs e) { int int_monthes = Convert.ToInt32(txtYF.Text); string str_Year = dtebegin.Text.Substring(0, 4);
2013-09-27 15:50:29
2046
原创 获取两个日期之间的月份差
dteend是控件(dateedit) private void btnYFC_Click(object sender, EventArgs e) { int int_Monthes = 0; string str_BigYear = dteend.Text.Substring(0, 4);
2013-09-27 15:49:05
701
转载 获得当前鼠标的坐标
可以用Control.MousePosition获得当前鼠标的坐标,使用PointToClient计算鼠标相对于某个控件的坐标,如下Point screenPoint = Control.MousePosition;//鼠标相对于屏幕左上角的坐标Point formPoint = this.PointToClient(Control.MousePosition);//鼠标相对于窗体
2013-09-27 15:46:18
624
原创 一键清空VGridControl中的记录
我发现网上对于VgridControl的资料特别少。。。最近一直在自学这个控件。希望能多多与大家交流 for (int i = 0; i { VGridControl.SetCellValue(VGridControl.Rows[i], 0, null); }
2013-09-27 15:42:46
1829
原创 从Dev GridView导出Excel
public void Button5_Click(object sender, EventArgs e) { SaveFileDialog fbd = new SaveFileDialog(); fbd.Title = "选择路径";//窗体标题 fbd.Filter = "Excel文件(.xls)
2013-09-27 15:40:02
1373
原创 手动计算GridView中行的总和(合计)
double double_Sum = 0; for (int i = 0; i { for (int j = 0; j { DevExpress.XtraGrid.Columns.GridColumn column = GV.Col
2013-09-27 15:38:50
930
原创 Dev DateEdit显示本月第一天和最后一天
void ShowFirstAndEndDayOnDate() { this.dateStartTime.Text = DateTime.Now.AddDays(-DateTime.Now.Day + 1).ToString("yyyy-MM-dd"); this.dateEndTime.Text = DateTime.Now.
2013-09-27 15:36:47
1365
原创 快速绑定TreeList,速度远远快于Tree.datasource=dt的方法
先写一个只绑定一级的。该表不存在上下级关系。 DataTable dt_TreeDataSource = null; void CreateTreeSourceAndBind() { dt_TreeDataSource = new DataTable(); dt_TreeDataSource.
2013-09-27 14:49:59
1376
原创 将Excel导入到虚拟DataTable中
using Excel = Microsoft.Office.Interop.Excel;using System.Runtime.InteropServices;using System.Threading;using System.Data.OracleClient;添加以上引用 public void Button1_Click(object sender,
2013-09-27 14:46:14
718
原创 判断字符串是否为布尔型、浮点型、整型...
bool IsFloat(string str) { try { float.Parse(str);//int.Parse(str);//double.Parse(str); return true; } ca
2013-09-27 14:41:46
1319
转载 Dev GridView 序号
具体从哪里参考的已经忘了。 private void gvStaff_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) { if (e.Info.IsRowIndicator
2013-09-27 14:36:12
1369
转载 Dev TreeList序号显示
具体忘了从哪里参考来的。 private void treeDep_CustomDrawNodeIndicator(object sender, DevExpress.XtraTreeList.CustomDrawNodeIndicatorEventArgs e) { TreeList tr = sender as DevExpress.XtraTr
2013-09-27 14:34:09
1945
1
原创 勾选TreeList结点,控制GridView列的显隐
private void treeFileWageColumn_BeforeCheckNode(object sender, DevExpress.XtraTreeList.CheckNodeEventArgs e) { if (!e.Node.Checked) { this.GV.Column
2013-09-27 14:31:33
749
原创 Dev GridView 右键Tooltip展示与Cell相关的内容
//鼠标右键 private void bgvXjgl_MouseDown(object sender, MouseEventArgs e) { GridHitInfo HIGL = bgvXjgl.CalcHitInfo(e.X,e.Y); if (e.Button== System.Windows.Forms.Mous
2013-09-26 14:49:33
782
日志管理源码
2014-12-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人