Gridview自动生成文本框列且赋值
摘要:/*************************************************************************** Page/Class Name : BlackCleanPeopleQty.cs* Title : 黑料-洗净包装作业人数维护* @author : Garry* Create Date : 2012/04/16* Last Modifier : * Last Modify Date : * TABLE : ********************************************************************
阅读全文
posted @
2012-04-21 10:57
枫叶一帆
阅读(597)
推荐(0)
两个DataTablel用Linq实现主外键查询
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;namespace WebApplication2{ public partial class TwoDataTableJoin : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { DataTa
阅读全文
posted @
2012-04-21 10:56
枫叶一帆
阅读(360)
推荐(0)
SQL 分页 排名 CTE
摘要:举几个例子来简单说明 这些例子我引用了Northwind库。1. TOP 表达式 SQL Server 2000的TOP是个固定值,是不是觉得不爽,现在改进了。 --前n名的订单declare @n int set @n = 10 select TOP(@n) * from Orders 2. 分页 不知各位过去用SQL Server 2000是怎么分页的,大多都用到了临时表。SQL Server 2005一句话就支持分页,性能据说也非常不错。 --按Freight从小到大排序,求20到30行的结果 select * from( select OrderId, Freight, ROW_NU.
阅读全文
posted @
2012-04-21 10:55
枫叶一帆
阅读(730)
推荐(0)
在DATATABLE中过滤相同的值
摘要:var distinctValues = dtOnStorage.AsEnumerable() .Select(row => new { product = row.Field<string>("WHITE_PART_EQP") }).Distinct(); string product = ""; foreach (var item in distinctValues) { product = item.product + ","; }
阅读全文
posted @
2012-04-21 10:54
枫叶一帆
阅读(305)
推荐(0)
反馈表单
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb23
阅读全文
posted @
2012-04-20 22:06
枫叶一帆
阅读(373)
推荐(0)
加载中提示
摘要:----前台<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm38.aspx.cs" Inherits="WebApplication2.WebForm38" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona
阅读全文
posted @
2012-04-20 21:22
枫叶一帆
阅读(204)
推荐(0)
log 方法
摘要:void Application_Error(object sender, EventArgs e) { // 在出现未处理的错误时运行的代码 string Message = string.Empty; Message = "Url" + Request.Path + Server.GetLastError().ToString(); //不存在 就建立資料夾 預設 C:\\Trioptics string sPath = @"C:\\MGSLog"; if (!Directory.Exists(sPath)) { Directory.CreateDi
阅读全文
posted @
2012-04-20 21:20
枫叶一帆
阅读(356)
推荐(0)
SQLSERVER存储过程及创建临时表
摘要:set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgo-- =============================================-- Author:Garry-- Create date: 2012-01-16-- Description:查詢人員離歸崗報表-- =============================================-- EXEC [spPersonOnAndOffPost] '2012-1-15 10:00:00','2012-1-17 23:00:00'CREATE P
阅读全文
posted @
2012-04-20 21:18
枫叶一帆
阅读(2314)
推荐(0)
ORACLE死锁
摘要:一、查看有哪些表被锁住select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id; select b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b where a.session_id = b.sid order by b.logon_time;杀进程中的会话alter system kill session &
阅读全文
posted @
2012-04-20 21:16
枫叶一帆
阅读(366)
推荐(0)
DataTable To Json
摘要:using System.Collections.Generic;using System.Data;using System.Text;using System.IO;using Newtonsoft.Json;namespace MatchGroupSystem.Common{ public class JsonMethods { public static string datatableToJSON(DataTable dt) { StringBuilder jsonStringBuilder = new StringBuilder(); StringWriter jsonString
阅读全文
posted @
2012-04-20 21:13
枫叶一帆
阅读(255)
推荐(0)
刷新时滚动条保留位置
摘要:前台<script type="text/javascript"> //刷新时滚动条保留位置 function ScrollToSelectNode() { document.getElementById("left").scrollTop = "<%=ScrollValue%>"; } function bindData() { document.getElementById("divScrollValue").value = document.getElementById("l
阅读全文
posted @
2012-04-20 21:07
枫叶一帆
阅读(615)
推荐(0)
VS常用的几种技巧
摘要:1. 打开新的窗口并传送参数: 传送参数: response.write("<script>window.open(’*.ASPx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") 复制代码接收参数: string a = Request.QueryString("id"); string b = Request.QueryString("id1"); 复制代码2.为按钮添加对话框 Button1.Attribu
阅读全文
posted @
2012-04-20 21:04
枫叶一帆
阅读(722)
推荐(0)