`
wyf
  • 浏览: 433504 次
  • 性别: Icon_minigender_1
  • 来自: 唐山
社区版块
存档分类
最新评论
文章列表
create function [dbo].[fGetPy](@words nvarchar(2000)) returns varchar(8000) as begin declare @word nchar(1) declare @pinyin varchar(8000) declare @i int declare @words_len int declare @unicode int set @i = 1 set @words = ltrim(rtrim(@words)) set @words_len = len(@words) while ...
public static class DomainInformation { #region Constants //static string[] usersLdapPath = @"http://www.cnblogs.com/yxbsmx/admin/ldap://zzzzzz.com/OU=xxxxxx,DC=yyyyyy,DC=com"; static string usersLdapPath = System.Configuration. ...
对于C#来说,取得活动目录中的组织结构相对简单,因为其在System.DirectoryServices命名空间中内置了DirectorySearcher的方法,我们可以组合多种过滤方式,来达到取得活动目录中的所有信息,当然,我现在还没有找到可以得到域用户密码的方式 :)   private static SearchResultCollection _ADHelper(string domainADsPath, string username, string password, string schemaClassNameToSearch) { ...

拖动类

public static class DragDrop { private static bool IsDragging = false; private static Point curPoint; private const int MAX_ZINDEX = 99999; private const double CURRENT_OPACITY = 0.5; private static int lastZIndex; private static double lastOpacity; private stati ...
假设AD中有一组织单位,给定以下信息: AD:ms.com AD管理员:administrator AD管理员密码:pass@word1 组织单位名称:XX有限公司(不必理会其下有嵌套多少组织单位,通常都是部门) 现在要获取这一组织单位下的所有的用户信息,比如只要:帐号,姓名,邮件,所在组织这四个字段,具体实现如示例代码所示: private const string domainName = "ms.com"; ...
c#源码: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Sec ...
如果一个公司打算使用微软的产品来构建自己的办公自动化系统,那么,建议采用主域控制的方式。那么,必然就要用到活动目录(AD),这样,IT部门就需要 为公司的每一个员工来创建域帐号。如果公司比较大的话,这是一个很大的工程。而且,我们会发现,有些工作量基本上是在重复劳动,人力资源部为了给It部门 提供人员名单,会录入一次人员的各种信息,比如姓名、工号、所属部门、部门领导、电话号码等等,那么,IT人员在拿到这张表后,他又要重新录入一次。并且 常常会因为人为的原因导致帐户中出现错误。下面,我们就用C#编写了一个创建帐户的程序。在这个程序中,它不但要创建域帐户,它还会在相应的 Exchange中创建相应的邮 ...

FLASHBACK TABLE

/*1.FLASHBACK QUERY*/ --闪回到15分钟前 select * from orders as of timestamp (systimestamp - interval '15' minute) where ...... 这里可以使用DAY、SECOND、MONTH替换minute,例如: SELECT * FROM orders AS OF TIMESTAMP(SYSTIMESTAMP - INTERVAL '2' DAY) --闪回到某个时间点 select * from orders as of timestam ...
1: 自增列 类型为:int identity(1,1) 当然也可以是bigint,smallint eg: create table tbName(id int identity(1,1),description varchar(20)) 或在用企业管理器设计表字段时,将字段设为int,将标识设为是,其它用默认即可 IDENTITY (给SQL 的 select 语句添加一个自动递增的ID字段) select id1=identity(int,1,1) , * into #test from tb select * from #test @@identity是表示的是 ...

Oracel判断是数字

SELECT DECODE( (REPLACE(TRANSLATE(TRIM('XX'),'0123456789','00000000000'),'0' ,NULL)), NULL, to_number(trim('XX') ) )from dual 说明:当XX为全是数字时,如587,则返回587。 当XX不全是数字事,如58ab,则返回null。  sql 为 isnumeric(字段) 是数字返回1 否则为0
 部署windows服务--制作安装包(1)、建立一个新的windows服务项目Server1    (2)、打开Service1代码视图,找到OnStart部分,加入代码    (3)、切换到设计视图,右键-添加安装程序    (4)、切换到新生成的ProjectInstaller.cs设计视图,找到serviceProcessInstaller1对Account属性设置为LocalSystem,对serviceInstaller1的ServiceName属性设置为Server1(服务的名字),StartType属性设置为Automatic(系统启动的时候自动启动服务)      (5)、建立 ...

Date,timestamp

Oracle timestamp select systimestamp from dual select current_timestamp from dual select cast(sysdate as timestamp) "DATE" from dual select to_timestamp(to_date(sysdate, 'yyyy-mm-dd')) from dual select to_timestamp('2008-11-17 00:31:35', 'YYYY-MM-DD HH24:MI:SS:FF') from dual 在ORAC ...
很多人都知道在Oracle中并没有像其他数据库中的自增字段,那么我们怎样才能实现Oracle的自增字段功能呢?下面我们通过Oracle中的Sequence和Trigger来实现此功能。1、首先建立一个创建自增字段的存储过程//Written by Sun Zhenfang 20040903 create or replace procedure pr_CreateIdentityColumn (tablename varchar2,columnname varchar2) as strsql varchar2(1000); begin strsql := 'create ...
如何在ASP.NET应用中集成Windows域帐户来进行权限控制   企业应用程序采用域用户来代替独立的用户管理模块的好处很多。 程序本身不需要单独编写用户帐号管理模块 与域用户集成,用户不需要单独记忆用户名口令,可以实现无缝登录 采用与用户方案安全性提升到域用户安全级别 其他好处多多 首先需要配置IIS: 为你的应用单独建立一个web虚拟目录,右键选择属性里的目录安全,权限与访问控制,把“打开匿名访问”不选,仅仅选择“集成Windows权限认证”,别的都不要选,确定。   集成域用户来控制用户访问的途经有两种,一种是利用NTFS权限控制表,缺 ...
1、web.config <authentication   mode= "Windows "/> 2、IIS   中启用Windows集成认证,关闭匿名访问 3、通过User.Identity.Name进行读取,读出登录帐号
Global site tag (gtag.js) - Google Analytics