上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页

2008年9月16日

正则表达式

摘要: 在项目中用到的一小点正则表达式:在下面这个字符串中找出想要的子串:字符串:@StartInsuranceDate=2008-09-12@RegisterDate=1999-09-13@Year=9.00547945205479@UsageType=1@SeatCount=5@NewCarPrice=15@GlassType=1@CarDamageInsurance=150000.00@ThirdP... 阅读全文

posted @ 2008-09-16 13:47 优雅小猪 阅读(145) 评论(0) 推荐(0) 编辑

2008年9月13日

System.Collections.Generic.List<>是System.Collections.ArrayList的泛型实现

摘要: System.Collections.Generic.List<>是System.Collections.ArrayList的泛型实现 阅读全文

posted @ 2008-09-13 20:53 优雅小猪 阅读(934) 评论(1) 推荐(0) 编辑

string.TrimEnd()在分割串中的利用

摘要: 经常用到在循环中,把若干个字符串用某个标记分割后连接起来,最后尾巴上往往还带有一个多于的分割符。去掉的方法很多。用String.TrimEnd('分割符')也是很方便的,并且也不用判断字符串的长度。和string.Split一样,参数char[]可以用'c'直接输入 阅读全文

posted @ 2008-09-13 15:30 优雅小猪 阅读(511) 评论(0) 推荐(0) 编辑

表驱动法(zz:http://www.cnblogs.com/shinn/archive/2008/04/16/1157141.html)

摘要: private static double[] rangeLimit = { 60.0, 75.0, 85.0, 95.0,100.0 };private static string[] grade = {"不合格", "合乎要求", "良好", "优秀" ,"卓越"};private static readonly int maxLevel = grade.Length - 1;public s... 阅读全文

posted @ 2008-09-13 12:07 优雅小猪 阅读(781) 评论(0) 推荐(0) 编辑

2008年9月12日

align和valign

摘要: align 是左中右对齐 valign 是上中下对齐 阅读全文

posted @ 2008-09-12 15:08 优雅小猪 阅读(329) 评论(0) 推荐(0) 编辑

短信模板(在SQL中利用replace函数完成替换)

摘要: 模板:[OwnerName][OwnerTitle],您好!我是[ProjectName]保险公司业务员[UserName],您的[QuoteContent],不清楚可联系服务电话:(公司[ProjectContactPhone])或(个人[UserMobilePhone]),谢谢您的查收!祝您身体健康!任务:将[……]的内容用实际内容进行替换代码: string sql ... 阅读全文

posted @ 2008-09-12 12:12 优雅小猪 阅读(1487) 评论(0) 推荐(0) 编辑

2008年9月11日

更改SQL Server字段类型

摘要: ALTER TABLE [Sales_QuoteBillDetail] ALTER COLUMN InsureBase VARCHAR(800) 阅读全文

posted @ 2008-09-11 10:47 优雅小猪 阅读(580) 评论(0) 推荐(0) 编辑

2008年9月9日

项目中SQL Server数据类型的几个问题备忘

摘要: 1.datetime类型格式化:CONVERT(VARCHAR(12), c.[RegisterDate],121),121为yyyy-MM-dd2.money类型保留两位小数convert(decimal(10,2),money):这个方法不怎么好,但在项目中也能用,看看是否有更好的方法3.datetime类型时间增加一天select getdate()+1:直接加1 阅读全文

posted @ 2008-09-09 16:21 优雅小猪 阅读(268) 评论(0) 推荐(0) 编辑

2008年9月2日

typeof,gettype,is,as

摘要: public class testclass { public string s = ""; public int i = 0; } testclass o = new testclass();System.Type t1 = typeof(testclass);System.Type t2 = o.GetType();if (o is testclass){MessageBox.Show("o ... 阅读全文

posted @ 2008-09-02 16:43 优雅小猪 阅读(461) 评论(0) 推荐(0) 编辑

2008年9月1日

SQL Server的decima的四舍五入

摘要: 最近一项目,在一存储过程中使用decimal进行计算,由于没有指定小数位数,导致了四舍五入,舍去了小数。应该指定小数位数,如 declare @fee decimal(10,2) [总共10位,小数2位] 阅读全文

posted @ 2008-09-01 14:30 优雅小猪 阅读(661) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页

导航