Fork me on GitHub
摘要: DataSet ds = wikibll.GetList(7, 1, string.Format(" isshow=1 and AskCountryid={0} ", countryid));AskCountryid在sqlserver2005中是nvarchar(50),但是查询条件中不用加单引号''吗?好神奇!!居然这样写是对的~ 阅读全文
posted @ 2013-05-02 13:56 思考的大腿 阅读(415) 评论(0) 推荐(0) 编辑
摘要: string strwhere = " IsShow='0' ";c#里的'0','1'对应sqlserver2005中的False,True 阅读全文
posted @ 2013-04-28 14:28 思考的大腿 阅读(1847) 评论(0) 推荐(0) 编辑
摘要: 04|06|07|08|for (int i = 0; i < expert.CountryID.Split('|').Length; i++){for (int j = 0; j < chkCountry.Items.Count; j++){if (expert.CountryID.Split('|')[i] == chkCountry.Items[j].Value){chkCountry.Items[j].Selected = true;}}} 阅读全文
posted @ 2013-04-27 09:36 思考的大腿 阅读(125) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections;using System.Configuration;using System.Data;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;namespace CSCDF.Web{ public partial class tes... 阅读全文
posted @ 2013-04-26 13:36 思考的大腿 阅读(181) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 获取记录总数 /// </summary> public int GetRecordCount(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) FROM tb_Expert "); if (strWhere.Trim() != "") { strSq... 阅读全文
posted @ 2013-04-26 10:48 思考的大腿 阅读(347) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 分页获取数据列表 /// </summary> public DataSet GetList(int PageSize,int PageIndex,string strWhere) { SqlParameter[] parameters = { new SqlParameter("@tblName", SqlDbType.VarChar, 255),//表明 new SqlParameter("@fldNa... 阅读全文
posted @ 2013-04-26 10:47 思考的大腿 阅读(740) 评论(0) 推荐(0) 编辑
摘要: CREATE PROCEDURE [dbo].[UP_GetRecordByPage] @tblName varchar(255), -- 表名 @fldName varchar(255), -- 主键字段名 @PageSize int = 10, -- 页尺寸 @PageIndex int = 1, -- 页码 @IsReCount bit = 0, -- 返回记录总数, 非 0 值则返回 @OrderType bit = ... 阅读全文
posted @ 2013-04-26 10:45 思考的大腿 阅读(205) 评论(0) 推荐(0) 编辑
摘要: //获取浏览器版本 string s1=Request.ServerVariables["HTTP_USER_AGENT"]; Response.Write(s1); 阅读全文
posted @ 2013-04-17 14:04 思考的大腿 阅读(328) 评论(0) 推荐(0) 编辑
摘要: System.Web.HttpContext.Current.Request.ApplicationPath;后面+/ 阅读全文
posted @ 2013-03-26 17:14 思考的大腿 阅读(349) 评论(0) 推荐(0) 编辑
摘要: // 亲爱的维护者:// 如果你尝试了对这段程序进行‘优化’,// 并认识到这种企图是大错特错,请增加// 下面这个计数器的个数,用来对后来人进行警告:// 浪费在这里的总时间 = 39h/** * 致终于来到这里的勇敢的人: 你是被上帝选中的人,英勇的、不辞劳苦的、不眠不修的来修改我们这最棘手的代码的编程骑士。你,我们的救世主,人中之龙,我要对你说:永远不要放弃,永远不要对自己失望,永远不要逃走,辜负了自己。永远不要哭啼,永远不要说再见。永远不要说谎来伤害自己。 */Exception up = new Exception("Something is really wrong.&q 阅读全文
posted @ 2013-02-22 10:24 思考的大腿 阅读(229) 评论(0) 推荐(0) 编辑