C#动态创建表
摘要:SqlConnection conn = new SqlConnection();conn.ConnectionString = "";conn.Open();SqlCommand cmd = new SqlCommand();cmd.Connection = conn; cmd.CommandText = "if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[user]') and OBJECTPROPERTY(id, N'IsUserTable
阅读全文
posted @
2011-04-23 10:13
Black Bean
阅读(778)
推荐(0)
扩展GridView全选功能
摘要:using System;using System.Collections.Generic;using System.Text;using System.Web.UI.WebControls;using System.Web.UI;using System.ComponentModel;using System.Collections;using CommonLib;namespace WebControls{ [ToolboxData("<{0}:AXGridView runat=\"server\"></{0}:AXGridView>&
阅读全文
posted @
2011-04-22 17:44
Black Bean
阅读(994)
推荐(0)
LinQ 多表查询
摘要:编辑器加载中...1. oneTT有字段AA BB CC2. twoTT有字段EE FF BB两个表连接查询,List<MulTable> mul = (from a in _db.oneTTT join b in _db.twoTTT on a.BB equals b.BB where a.BB != "" select new MulTable { AAA = a.AA, BBB = a.BB, EEE = b.EE, FFF = b.FF }).ToList<MulTable>(); foreach (MulTable item in mul)
阅读全文
posted @
2011-04-22 16:18
Black Bean
阅读(8093)
推荐(0)
ASP.NET 部署
摘要:一、iis中不支持aspx时在cmd命令里执行先执行cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727敲回车aspnet_regiis-i 敲回车二、IIS不支持ASP解决办法1-1.iis中的web服务扩展 中的 Active Pever Pages 右击允许,启动该服务。如果不行的话 可以尝试ASP.NET V2.0允许2-2.1.解决思路和步骤,基本按照操作:1)右键单击 我的电脑---->管理,打开计算机管理界面打开 本地用户和组---->用户右键单击 启动IIS进程帐号 IWAM_****(注:****一般是计算机名)点击设置
阅读全文
posted @
2011-04-18 15:48
Black Bean
阅读(203)
推荐(0)
Windows Service得到当前用户的名字和域
摘要:Create a Windows Service project using VB.NET. Open Server Explorer and expand the tree node which says Management Classes. Right click on Processes node and select "Generate Managed Class". This will add a reference to the System.Management namespace. Now import System.Management namespac
阅读全文
posted @
2011-04-13 11:04
Black Bean
阅读(385)
推荐(0)
加密解密-C#
摘要:public static string Encrypt(string strPWtoEncrypt) { string CurrentFunction = "" + CommonSettings.ModNFunComStr + "Encrypt"; try { string strPword=string.Empty; byte bytCount; int intTemp; for (bytCount = 1; bytCount <= strPWtoEncrypt.Length; bytCount++) { intTemp = Convert.T
阅读全文
posted @
2011-04-13 09:35
Black Bean
阅读(246)
推荐(0)
修改文件夹权限
摘要:using System;using System.Collections.Generic;using System.Text;using System.Security.AccessControl;using System.IO;using System.Collections;namespace Customization.Service{ public class FolderSecurity { public static bool SetFolderACL(String FolderPath, String UserName, FileSystemRights Rights, Acc
阅读全文
posted @
2011-04-13 09:31
Black Bean
阅读(389)
推荐(0)