WebForm: dropPostalLineNo.DataSource ="数据源"; dropPostalLineNo.DataTextField = "";//文本 dropPostalLineNo.DataValueField = ""; //id dropPostalLineNo.DataBind(); dropPostalLineNo.Items.Insert(0,(new ListItem("全部", "0"))); //添加全部行WINFORM: DataTable db = & Read More
posted @ 2013-11-21 15:42 quanxie Views(458) Comments(0) Diggs(0) Edit
DropDownList自动生成年月日aspx页面上有三个dropdownlist控件,dropdownlist1表示年,dropdownlist2表示月,dropdownlist3表示天;注意用将这三个dropdownlist控件的autopostback属性设为true。用户能够方便地选择年月日,并且每月的日期会随着用户选择不同的年,月而发生相应的变化代码直接复制过去即可使用前台代码后台代码protectedvoidPage_Load(objectsender,EventArgse){DateTimetnow=DateTime.Now;//现在时间ArrayListalyear=newAr Read More
posted @ 2013-08-26 17:42 quanxie Views(517) Comments(0) Diggs(0) Edit
//查询分单函数 private string GetQueryInSubbillNo() { string strSubbillNO = ""; string strOutput = ""; foreach (DataGridViewRow dgvRow in dgvRecieveProducts.Rows) { strSubbillNO += "'" + dgvRow.Cells["dgvSubbillNO"].Value.ToString() + "',"; } if (d Read More
posted @ 2013-07-08 11:15 quanxie Views(267) Comments(0) Diggs(0) Edit
string strTeachingPlan = this.txtTeachingPlan.Text.ToString().Trim(); string[] maarr = strTeachingPlan.Split('\n'); //文本中隐含的回车换行符给去掉 每行末尾加上换行符"\r\n" 保存到数据库 string strText = string.Empty; for (int i = 0; i < maarr.Length; i++) { if (string.IsNullOrEmpty(maarr[i].ToString())) { co Read More
posted @ 2013-06-25 16:37 quanxie Views(444) Comments(0) Diggs(0) Edit
<?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> </configSections> <connectionStrings /> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="WmsWebSoap" closeTimeout="00:01:00& Read More
posted @ 2013-05-22 12:04 quanxie Views(182) Comments(0) Diggs(0) Edit
1.this.Close(); 只是关闭当前窗口,若不是主窗体的话,是无法退出程序的,另外若有托管线程(非主线程),也无法干净地退出;2.Application.Exit(); 强制所有消息中止,退出所有的窗体,但是若有托管线程(非主线程),也无法干净地退出;3.Application.ExitThread(); 强制中止调用线程上的所有消息,同样面临其它线程无法正确退出的问题;4.System.Environment.Exit(0); 这是最彻底的退出方式,不管什么线程都被强制退出,把程序结束的很干净。5.Application.Restar(); 注销 开启新实例 Read More
posted @ 2013-05-21 18:34 quanxie Views(117) Comments(0) Diggs(0) Edit
1,添加 服务引用2,生成app.config配置文件3cs文件中调用ServiceReference1.WebService1SoapClientclient=newServiceReference1.WebService1SoapClient("WebService1Soap","http://127.0.0.1/test.asmx");第一个参数是endpoint的名称,第二个参数就可以自己填入Web Service的地址了 Read More
posted @ 2013-05-21 17:41 quanxie Views(145) Comments(0) Diggs(0) Edit
今天把更新好多网站发布到服务器,接着出现了如标题提示的怪异错误.根据错误原因可以分辨出来说webservice引发的.只好本地debug一下,终于找到错误的原因了.我在BLL层引用了webservice,这时会在BLL成生成 app.config 配置文件.根据下面的方法解决上面的错误把app.config 中 system.serviceModel 节点内容........copy 到 exe项目 web.config 中然后生成,发布就可以解决. Read More
posted @ 2013-05-21 17:35 quanxie Views(394) Comments(0) Diggs(0) Edit
方式一:拼接转换public string chang(string money) { //将小写金额转换成大写金额 double MyNumber = Convert.ToDouble (money ); String[] MyScale = { "分", "角", "元", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾&qu Read More
posted @ 2013-04-17 13:58 quanxie Views(268) Comments(0) Diggs(0) Edit
文章有点潦草,不过应该看的懂,,,,2种方式:----------------------------------------------------------------------------------------------------------------------------------方式一:(数据直接绑定)缺点:列值运输的值 直接写死的,如果需要添加写列值,完全需要重写绑定下,就这点有些不好,暂时也就这样弄了;这个希望多交流交流,,,列头排序添加两个事件,点击列头排序定义集合 记录排序数private List<object[]> list_obj = new Read More
posted @ 2013-04-02 16:39 quanxie Views(439) Comments(0) Diggs(0) Edit