Fork me on GitHub
摘要: #region AES加密 /// <summary> /// 加密数据 /// </summary> /// <param name="input">加密前的字符串</param> /// <returns>加密后的字符串</returns> public static string AESEncrypt(string input) { //盐值 string saltValue = "saltValue"; //... 阅读全文
posted @ 2012-11-12 17:12 Nick.Chung 阅读(780) 评论(0) 推荐(0) 编辑
摘要: using Telerik.Windows.Zip; /// <summary> /// 利用telerik的zip库压缩字符串 /// </summary> /// <param name="str"></param> /// <returns></returns> public static string CompressString(string str) { string result = string.Empty; try ... 阅读全文
posted @ 2012-11-12 17:08 Nick.Chung 阅读(179) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windows.Ink;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Animation;using System.Windows.Shapes;using Telerik.Windows.Controls;namespace SGS 阅读全文
posted @ 2012-11-12 17:03 Nick.Chung 阅读(283) 评论(0) 推荐(0) 编辑
摘要: <%@ WebHandler Language="C#" Class="AttachmentHandler" %>using System;using System.Collections.Generic;using System.Web;using System.Data.SqlClient;using System.Configuration;public class AttachmentHandler : IHttpHandler{ public void ProcessRequest(HttpContext context) { st 阅读全文
posted @ 2012-11-12 16:57 Nick.Chung 阅读(190) 评论(0) 推荐(0) 编辑
摘要: System.Data.Objects.EntityFunctions.DiffDays(); // // 摘要: // 调用 DiffDays 规范函数。有关 DiffDays 规范函数的信息,请参见Date and Time Canonical Functions // (Entity SQL)。 // // 参数: // dateValue1: // 有效日期。 // // dateValue2: // ... 阅读全文
posted @ 2012-11-12 16:50 Nick.Chung 阅读(543) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Linq;using System.Linq.Expressions;using System.Collections.Generic; public static class PredicateBuilder { public static Expression<Func<T, bool>> True<T>() { return f => true; } public static Expression<Func<T, bool>> False<T>() { re 阅读全文
posted @ 2012-11-12 16:45 Nick.Chung 阅读(487) 评论(0) 推荐(0) 编辑
摘要: 书签-BookmarkView Code using System;using System.Activities;namespace DataService{ public sealed class WaitForInput<T> : NativeActivity<T> { public WaitForInput() : base() { } public string BookmarkName { get; set; } public OutArgument<T> Input { get... 阅读全文
posted @ 2012-11-12 16:31 Nick.Chung 阅读(365) 评论(0) 推荐(0) 编辑
摘要: WCF配置文件-Web.config<?xml version="1.0" encoding="utf-8"?><configuration> <appSettings> <add key="db" value="Data Source=192.168.1.170;Initial Catalog=WSSExtend;User ID=sa;Password=123456" /> </appSettings> <system.web> <co 阅读全文
posted @ 2012-11-12 16:09 Nick.Chung 阅读(267) 评论(0) 推荐(0) 编辑
摘要: App.xaml public partial class App : Application { public App() { bool registerResult = WebRequest.RegisterPrefix( "WCF Address", System.Net.Browser.WebRequestCreator.ClientHttp); } }Async Completed Methodusing System.ServiceModel; if... 阅读全文
posted @ 2012-11-12 15:44 Nick.Chung 阅读(218) 评论(0) 推荐(0) 编辑