随笔分类 - 代码断层
自己所写,欢迎大家评论,一起学习
摘要:数据访问的简约设计https://github.com/bigmouthz/SevenArmsSeries.Repositories 1 public class Request 2 { 3 /// 4 /// 请求主体或标识约定 5 /// 6 public string Guid { get; set; } 7 8 /// 9 /// 查询条件 对应于系统后台实现规则 10 /// 11 public IList Params { get;...
阅读全文
摘要:1SerializationProvider<Action>.SetCurrent(newBinarySerializationFactory<Action>());2bytes=SerializationProvider<Action>.Create().Serialize(()=>{Console.WriteLine("ActionTest!");});3vart4=SerializationProvider<Action>.Create().Deserialize(bytes);4t4();56Serializat
阅读全文
摘要:using System; using System.Collections; using System.Runtime.CompilerServices; public static class ListComparer { public static bool ListsEqual(IList list1, IList list2) { if (list1.Count != list2.Cou...
阅读全文
摘要:// 从string 到Enum public DownloadProxyUsage ProxyUsage { get { string proxyUsage = ConfigurationManager.AppSettings[@"downloadProxyUsage"]; if ( string.IsNullOrEmpty( proxyUsage ...
阅读全文
摘要:近日所做AD域相关的内容, 从网上淘了不少的代码, 以下代码仍融合两个主要网上AD域操作类集成的. 经测试已经无问题, 希望能大家能有帮助(用的是net1.1,没有用到2.0的部分功能) ADClass.rar using System; using System.Text; using System.Collections; using System.DirectoryServices; usi...
阅读全文
posted @ 2008-01-10 17:04
我想去长安
摘要:问题: 要求将 一字符串 0,1,2,3,4,5 ;将,分隔后的每一内容转为一行记录到数据库表中 declare @table_串转数组 table( adapt_object int default 0) declare @tmp_str varchar(100) declare @tmp_index int select @tmp_index = 1 select @tmp_str...
阅读全文
摘要:CREATE TABLE [tbmcd_salary_config_monthly] ( [id] [int] IDENTITY (1, 1) NOT NULL , [editor] [int] NOT NULL DEFAULT ('0'), [edittime] [varchar] (100) DEFAULT (''), [monthly] [varchar] (100) DEFA...
阅读全文
摘要:declare @salary numeric(18,2) select @salary = 1000000 - 1600 select sum(case when tax1 left_point then case when @salary > right_point then right_point - left_point else @salary - left_point en...
阅读全文
摘要:using System; using System.Text; using System.Collections; using System.Collections.Generic; using System.Net; using System.Net.Sockets; using System.Threading; using System.Runtime.InteropServices; u...
阅读全文
摘要:1、 找出 与 之间的内容(?)[.\s\S]*(?=\) 举例:输入: " HeaderText="" /> AAA输出:" HeaderText="" /> 2、找出 与 之间的内容,并且包含这两个首尾匹配串(?=\)[.\s\S]*(?) 举例:输入: " HeaderText="" /> AAA输出: " HeaderText="" />
阅读全文
摘要:因项目需要,有时要求将一个表中的记录导出来,结合网上搜索的一些代码,而成此文 。因时间过长已找不出原创作者,谨请原谅 Create procedure pGetInsertSQL (@tablename varchar(256))---WITH ENCRYPTIONasbegin---得到表中的SQL -- declare @tablename varchar(256) -- set @table...
阅读全文
摘要:---Sqlserver 存储过程 ---本例的实现虽用sqlserver ,其实同样可以应用到其它的语言中进行解决,因此将其作如下描述---一点小小经验希望能解决一些小的问题 呵呵--欢迎大家交流Create Procedure pGet_DateAmbitIntersection(@A datetime, @B datetime, @L datetime, @R datetime , @Re...
阅读全文
摘要:///调用方法///JFrameWork.DataBase.SQL.MatchString sp = new MatchString();///sp.ParseStr("(1+8*(9-1)+((1-9)+(2*5)))((z)(z)z(55))((666))(59)", "(", ")");/////////////////实现代码 using System;using System.Colle...
阅读全文
摘要:由于系统要求 需要做一webservice将应用服务器的压力分配到其它的机器上,于是写了下面的WebSerivce服务using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Web;using System.We...
阅读全文
摘要:今天一哥们要在系统当中挂接Asp.Net Forums论坛 ,但不想又在系统之外再进行一次论坛的登录,可以算得上一个单点登录的需求吧。花费半日终于搞定,希望能对同样要求的朋友有所帮助。现就[2005/04/13]===================================================Asp.Net Forums V2.2.1929 官方中文版=============...
阅读全文

浙公网安备 33010602011771号