悟生慧

 
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 27 下一页

2011年7月3日

第一个struts2应用

摘要: 第一个struts2应用1.在struts配置文件中<struts><package name="itcast" 惟一哦 namespace="/test" extends="struts-default" 继承> <action name="helloworld" action的名称 class="cn.itcast.action.HelloWorldAction" action的类 method="execute" 交给这个方法处理> 阅读全文

posted @ 2011-07-03 21:15 悟生慧 阅读(532) 评论(0) 推荐(0)

struts2的开发环境配置2.1.6版本

摘要: struts2和WebWork2的基础上发展而来的Struts2和Struts1代码编码风格上几乎不一样 优点:Struts2无侵入式设计 不依赖于Struts的类、ServletAPIStruts提供了类型转换器 视图层有Velocity不知道的输入校验可以对指定方法进行校验,解决了Struts1长久之痛提供了全局范围、包范围和Action范围的国际化资源文件管理实现如何搭建Struts2的开发环境1.找到开发Struts2应用需要使用到的jar文件2.编写Struts2的配置文件3.在Web.xml中加入Struts2MVC框架启动配置1.主要jar文件struts2-core-2.x.x 阅读全文

posted @ 2011-07-03 20:34 悟生慧 阅读(832) 评论(0) 推荐(0)

2011年6月24日

动态修改DataTable中某列的值并绑定到DataGridView

摘要: DataTable dt = igmbll.getAllVWShopGoodsPurMas(); foreach (DataRow Row in dt.Rows) { Row[4] = Convert.ToDecimal(Row[4].ToString()); dgvVWShopGoodPurMas.Rows.Add(Row.ItemArray);// } this.dgvVWShopGoodPurMas.DataSource = dt; 阅读全文

posted @ 2011-06-24 15:20 悟生慧 阅读(2086) 评论(0) 推荐(0)

2011年6月23日

C#使用递归算法给TreeView控件绑定数据

摘要: /// <summary> /// 查找根节点(parent_ID为0的节点)的子节点 /// </summary> /// <param name="parent_ID">参数,接收根节点ID即0</param> public void bindtree(string parent_ID) { this.tvgood.Nodes.Clear(); DataTable dt = frmgb.Getdata(parent_ID); if (dt.Rows.Count > 0) { for (int i = 0; i < 阅读全文

posted @ 2011-06-23 11:07 悟生慧 阅读(1591) 评论(0) 推荐(0)

winfrom中的弹出询问消息框提示

摘要: if (dgvgood.Rows.Count > 0) { switch (MessageBox.Show("单据已经修改,要保存吗?", "询问", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) { case DialogResult.Cancel: break; case DialogResult.Yes: { //if (string.IsNullOrEmpty(cbperson.Text)) //{ // M 阅读全文

posted @ 2011-06-23 10:50 悟生慧 阅读(2825) 评论(0) 推荐(0)

2011年6月21日

ArrayList转换类型为DataTable类型

摘要: /// <summary> /// ArrayList转换类型为DataTable /// </summary> /// <param name="list"></param> /// <returns></returns> public static DataTable ToDataTableTow(IList list) { DataTable result = new DataTable(); if (list.Count > 0) { PropertyInfo[] propertys = 阅读全文

posted @ 2011-06-21 15:56 悟生慧 阅读(2387) 评论(0) 推荐(1)

2011年6月8日

c#的委托和事件

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace GoldCubePos.App{ public partial class Form1 : Form { private delegate void ShowName(object sender);//定义委托 private 阅读全文

posted @ 2011-06-08 17:34 悟生慧 阅读(174) 评论(0) 推荐(0)

C# 的 Delegate 学习

摘要: C# 的 Delegate TypeDelegate 是一种函数指针,但与普通的函数指针相比,区别主要有三:1) 一个 delegate object 一次可以搭载多个方法(methods)[译注1],而不是一次一个。当我们唤起一个搭载了多个方法(methods)的 delegate,所有方法以其“被搭载到 delegate object 的顺序”被依次唤起——稍候我们就来看看如何这样做。2) 一个 delegate object 所搭载的方法(methods)并不需要属于同一个类别。一个 delegate object 所搭载的所有方法(methods)必须具有相同的原型和形式。然而,这些方 阅读全文

posted @ 2011-06-08 17:07 悟生慧 阅读(261) 评论(0) 推荐(0)

当前日期和选择日期之间的时差显示

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace GoldCubePos.App{ public partial class Form1 : Form { public Form1() { InitializeComponent(); ToolStripControlHost 阅读全文

posted @ 2011-06-08 16:30 悟生慧 阅读(288) 评论(0) 推荐(0)

2011年6月7日

winfrom打开网页的方法

摘要: 方法一:Uri uri = new Uri("http://www.163.com");this.webBrowser1.Url = uri;方法二:System.Diagnostics.Process.Start("http://www.163.com"); 阅读全文

posted @ 2011-06-07 17:27 悟生慧 阅读(324) 评论(0) 推荐(0)

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 27 下一页

导航