摘要:
前端按钮<input type="button" id="btnPrelook" class="c6ui-button" runat="server" value="打印预览" onclick="printOK('0');" />function printOK(flag) { __doPostBack('btnPrint', '');}protected void btnPrint_ServerClick(obje 阅读全文
摘要:
sql之truncate 、delete与drop区别相同点:truncate 和不带 where 子句的 delete,以及 drop 都会删除表内的数据不同点:1. truncate 和 delete 只删除数据不删除表的结构(定义)drop 语句将删除表的结构被依赖的约束(constrain)、触发器(trigger)、索引(index);依赖于该表的存储过程/函数将保留,但是变为 invalid 状态。2. delete 语句是数据库操作语言(dml),这个操作会放到 rollback segement 中,事务提交之后才生效;如果有相应的 trigger,执行的时候将被触发。trun 阅读全文
摘要:
1、是否存在某字段if not exists(select * from syscolumns where id=object_id('OfficeSupply') and name='OffsPrice') beginalter table OfficeSupply add OffsPrice numeric(10, 2) default 0.00endgo2、是否存在某存储过程if(not OBJECT_ID('pr_CreateTable')is null)begindrop proc pr_CreateTableendgo或if exis 阅读全文
摘要:
ALTER PROCEDURE [dbo].[pt_OfficeApplyMulAdd](@strXMLList text--xml文件)ASdeclare @hdoc intSET XACT_ABORT ON--BEGIN TRANBEGINexec sp_xml_preparedocument @hdoc output,@strXMLListselect OffsID,OffsFlowID,OffsNumber,OffsAmount,OffsStoreID,SubName,SubCode,ApplyPurpose,OffsPrice,OID into # from openxml(@hdo 阅读全文
摘要:
服务器端select控件后台取值方法:<select id="selProvince" name="selProvince" runat="server"></select>string DQName = Request.Params["selDQName"]; 阅读全文
摘要:
一.摘要所有Web程序都会使用Session保存数据. 使用独立的Session服务器可以解决负载均衡场景中的Session共享问题.本文介绍.NET平台下建立Session服务器的几种办法, 并介绍在使用Session时的各种经验和技巧.二.关于Session,SessionID和CookiesSession数据保存在服务器端, 但是每一个客户端都需要保存一个SessionID, SessionID保存在Cookies中, 关闭浏览器时过期.在向服务器发送的HTTP请求中会包含SessionID, 服务器端根据SessionID获取获取此用户的Session信息.很多初级开发人员不知道Ses 阅读全文
摘要:
将Pager里面的东西重新生成Controller里面写方法:#region 分页方法三(异步分页) public ActionResult List(int? id, int? recorderID, DateTime? recordTime) { int pageSize = 3; PagedList<tbGoods> goods = null; if (recordTime != null && recorderID != null) { goods = db.tbGoods.OrderBy(p => p.recordTime).Where(s => 阅读全文
摘要:
MVC3的时间控件引用方法如下:借用My97DatePickerBeta的控件<script src="../../Scripts/WdatePicker.js" type="text/javascript"></script>调用:购买时间: @Html.TextBox("recordTime", "", new { onclick = "WdatePicker()" }) 阅读全文
摘要:
//将字母i全部替换成5<script language="javascript">var txt = "sjfisjfisdjfijsidfjioalfjewofjjgs";alert(txt .replace(/i/g,"5"));</script>//只将第一个字母i替换成5<script language="javascript">var txt = "sjfisjfisdjfijsidfjioalfjewofjjgs";alert(txt .repl 阅读全文
摘要:
1、去空格的方法:String.prototype.Trim = function () { return this.replace(/(^\s*)|(\s*$)/g,""); } var a = " a "; alert(a.Trim().length);2、允许输入字母汉字数字和!@#$%^&var reg = /^((\w)|[\u4E00-\u9FA5]|(@)|(#)|(-)|(_)|(!)|($)|(%)|(^))*$/;if (username.match(reg)==null) { alert("false") 阅读全文