摘要: 增加数据Import from aaa.del of del messages msg.out insert into productImport from aaa.del of del messages msgout insert into product(price,prod_no,description)2. 更新已经存在的数据及加入新数据Import from aaa.del of del messages msg.out replace into product3. 替换数据Import from aaa.del of del messages msg.outreplace_crea 阅读全文
posted @ 2013-05-20 23:53 Trilyn 阅读(592) 评论(0) 推荐(0) 编辑
摘要: DB2 修改登录用户的密码connect to <mydb> user <username> using <old password> new <new password> confirm <new password again>1、打开命令行窗口 #db2cmd2、打开控制中心 # db2cmd db2cc3、打开命令编辑器 db2cmd db2ce=====操作数据库命令=====4、启动数据库实例 #db2start5、停止数据库实例 #db2stop 如果你不能停止数据库由于激活的连接,在运行db2stop前执行db2 for 阅读全文
posted @ 2013-05-20 23:52 Trilyn 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 控件页面:最好有隐藏控件,以便写属性<input id="hidDictNo" runat="server" type="hidden" />public string DictNo //字典项编号属性{ get { return hidDictNo.Value; } set { hidDictNo.Value = value; }}引用页面:注册:<%@ Register TagPrefix="dict" TagName="dictItem" Src="HRDict 阅读全文
posted @ 2013-05-20 23:51 Trilyn 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 方法一:在配置中配置环境<connectionStrings><add connectionString="server=192.168.24.252;uid=sa;pwd=jh0101;database=C6V3ZP" name="SqlConn"/></connectionStrings>string conn = System.Configuration.ConfigurationManager.ConnectionStrings["SqlConn"].ConnectionString;方法二 阅读全文
posted @ 2013-05-20 23:50 Trilyn 阅读(195) 评论(0) 推荐(0) 编辑
摘要: //导出word function outWord() { try { //创建word应用程序对象 var wordapp = new ActiveXObject("word.application"); //显示word应用程序窗口 wordapp.visible = false; //设置word文件模板的路径 var s = getFileTemplatePath(); //打开要填写的模板 var worddoc = wordapp.application.documents.open(s); var range; range = wordapp.activedo 阅读全文
posted @ 2013-05-20 23:50 Trilyn 阅读(245) 评论(0) 推荐(0) 编辑
摘要: A页面前台js加密:userID = escape(userID);B页面后台解密:headResp = Request["headResp"]; headResp = Server.UrlDecode(headResp); 阅读全文
posted @ 2013-05-20 23:49 Trilyn 阅读(234) 评论(0) 推荐(0) 编辑
摘要: <img src="../images/navigator/06信息交流/内部博客模块逻辑关联图.png" width="1381px" height="637px" usemap="#mkdht" border="0"/> <map name="mkdht"> <area shape="rect" coords="745,138,1045,182" href="../../JHSoft.Web. 阅读全文
posted @ 2013-05-20 23:48 Trilyn 阅读(111) 评论(0) 推荐(0) 编辑
摘要: exec sp_MSforeachtable N' if exists(select 1 from ?) print ''?''+''(Y)'' else print ''?''+''(N)''' 阅读全文
posted @ 2013-05-20 23:47 Trilyn 阅读(286) 评论(0) 推荐(0) 编辑
摘要: /*******清空缓存******************/ Response.Buffer = true; Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1); Response.Expires = 0; Response.CacheControl = "no-cache"; 阅读全文
posted @ 2013-05-20 23:46 Trilyn 阅读(96) 评论(0) 推荐(0) 编辑
摘要: if (null != ds && ds.Tables.Count > 0) { sb.Append("<?xml version=\"1.0\" encoding=\"gb2312\" ?><ROOT>"); DataTable dt = ds.Tables[0]; if (null != dt && dt.Rows.Count > 0) { foreach (DataRow item in dt.Rows) { sb.Append("<NC> 阅读全文
posted @ 2013-05-20 23:45 Trilyn 阅读(289) 评论(0) 推荐(0) 编辑
摘要: #region 通用查询:管理页面 public DataSet GetInfo(int pageno, int pagesize, string condition, string tablename, string fields,string showFields) { string strSQL = string.Format("select count(*) from {4} where 1=1 {0};select top {1} * from (select row_number() over(order by {3}) as rowNumber,{5} from {4} 阅读全文
posted @ 2013-05-20 23:44 Trilyn 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 首先,添加两个DLL的引用,分别是:System.Runtime.Serialization.dll、System.ServiceModel.Web.dll。然后写ToJson方法:/// /// 格式化成Json字符串 /// /// 需要格式化的对象 /// Json字符串 public static string ToJson(object obj) { // 首先,当然是JSON序列化 DataContractJsonSerializer serializer = new DataContractJsonSerializer(obj.GetType()); // 定义一个strea.. 阅读全文
posted @ 2013-05-20 23:43 Trilyn 阅读(530) 评论(0) 推荐(1) 编辑
摘要: 将b中的数据导入a中第一种情况:存在a b两表create table a(id int,times varchar(20))create table b(id int,times varchar(20))insert into a values(11,'12:20')insert into a values(11,'12:30')insert into a values(12,'12:20')insert into b values(11,'12:20')将b中的数据导入a中 insert into a select * fro 阅读全文
posted @ 2013-05-20 23:42 Trilyn 阅读(129) 评论(0) 推荐(0) 编辑
摘要: var elems = $("input[title]"); var nochecknums = 0; for (var x = 0; x < elems.length; x++) { if (elems[x].type == "radio" && elems[x].checked == true && elems[x].title == nodeid) { if (elems[x].value == 1) { ++nochecknums; } } } if (nochecknums == 0) { $(" 阅读全文
posted @ 2013-05-20 23:42 Trilyn 阅读(414) 评论(0) 推荐(0) 编辑
摘要: protected void btnExport_ServerClick(object sender, EventArgs e) { string strFileName = Server.MapPath(@"SalaryModel.xlsx"); string strSaveFileName = DateTime.Now.ToString("yyyyMMddHHmmss") + @".xls"; Excel.Application ThisApplication = new Excel.Application(); Excel.Wo 阅读全文
posted @ 2013-05-20 23:41 Trilyn 阅读(479) 评论(0) 推荐(0) 编辑
摘要: #region 导出Excel private void ExportToXls(DataTable dt) { if (dt != null) { IReport p = new Report(); ExcelPage ep = new ExcelPage(); ep.name = "export.xls"; ExcelRow er = new ExcelRow(); foreach (DataColumn c in dt.Columns) { ExcelColumn ec = new ExcelColumn(); ec.value = c.ColumnName; er. 阅读全文
posted @ 2013-05-20 23:41 Trilyn 阅读(125) 评论(0) 推荐(0) 编辑
摘要: #region 导出表结构 private void Export(string TypeId) { string strXML = ""; strXML = CreateXML(TypeId); string path = this.txtPath.Value; string name = "表结构" + "_" + string.Format("{0}", Session["UserName"]) + "_" + DateTime.Now.ToString("y 阅读全文
posted @ 2013-05-20 23:40 Trilyn 阅读(138) 评论(0) 推荐(0) 编辑
摘要: //设置网页打印的页眉页脚为空 function PageSetup_Null() { try { var Wsh = new ActiveXObject("WScript.Shell"); HKEY_Key = "header"; Wsh.RegWrite(HKEY_Root + HKEY_Path + HKEY_Key, ""); HKEY_Key = "footer"; Wsh.RegWrite(HKEY_Root + HKEY_Path + HKEY_Key, ""); } catch 阅读全文
posted @ 2013-05-20 23:39 Trilyn 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 前端按钮<input type="button" id="btnPrelook" class="c6ui-button" runat="server" value="打印预览" onclick="printOK('0');" />function printOK(flag) { __doPostBack('btnPrint', '');}protected void btnPrint_ServerClick(obje 阅读全文
posted @ 2013-05-20 23:38 Trilyn 阅读(156) 评论(0) 推荐(0) 编辑
摘要: sql之truncate 、delete与drop区别相同点:truncate 和不带 where 子句的 delete,以及 drop 都会删除表内的数据不同点:1. truncate 和 delete 只删除数据不删除表的结构(定义)drop 语句将删除表的结构被依赖的约束(constrain)、触发器(trigger)、索引(index);依赖于该表的存储过程/函数将保留,但是变为 invalid 状态。2. delete 语句是数据库操作语言(dml),这个操作会放到 rollback segement 中,事务提交之后才生效;如果有相应的 trigger,执行的时候将被触发。trun 阅读全文
posted @ 2013-05-20 23:37 Trilyn 阅读(157) 评论(0) 推荐(0) 编辑