12 2011 档案
摘要:代码:NavigationService类型的基本成员sealed class NavigationService : IContentContainer { // 导航 public bool Navigate(Uri source); // 导航到URI public void Refresh(); // 重新导航到当前内容 public void StopLoading(); // 停止当前的导航 // 导航历史 public bool CanGoBack { get; } // Content in back nav. history? public bool CanGoForward
阅读全文
摘要:DeleteBasicProtocolRecursively private void DeleteBasicProtocolRecursively(ModelContainer container, string parentId, string strProtocolId) { #region BasicProtocolStructure var nodes = from node in container.BasicProtocolStructures where node.Pid == parentId select node; if (nodes...
阅读全文
摘要:Script: <tr> <td valign="top"> <table style="width:100%; border-color:Gray; border-style:double; border-width:3"> <%=ViewState["ViewCarePlanRiskFactors"]%> </table> </td> <td valign="top"> <table style="width:1
阅读全文
摘要:List<MyBasicProtocol> adultProtocolList = new List<MyBasicProtocol>(); adultProtocolList = new QhrServiceClient().GetAdultBasicProtocol(); if (adultProtocolList != null) { adultProtocolList.Sort((MyBasicProtocol p1, MyBasicProtocol p2) => { if (p2.Name.CompareTo(p1.Name) != 0) return.
阅读全文
摘要:try { service.AddOperateLog(mol); } catch (Exception ex) { if (service.InnerChannel.State == System.ServiceModel.CommunicationState.Faulted) { service = new QhrServiceClient(); MyExceptionRecord my = new MyExceptionRecord(); my.Id = System.Guid.NewGuid().ToString(); my.Occurr...
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Qhr.QhrService; namespace Qhr { public partial class test : System.Web.UI.Page { Qhr.QhrService.QhrServiceClient proxy = new QhrService...
阅读全文
摘要:sting , not null string XXXXXXX; [DataMember(IsRequired = true)] public string XXXXXXX //30,r { get { return XXXXXXX; } set { if ((value + "").Length == 0) { string strMessage = ("XXXXXXX:The XXXXXXX should not be null or empty string."); ModelContext.RecordException(string.Em...
阅读全文
摘要:代码:<htmlxmlns="http://www.w3.org/1999/xhtml"> <headrunat="server"> <title>无标题页</title> </head> <body> <formid="form1"runat="server"> <divstyle="text-align:center;"> <divstyle="margin:5px;float:l
阅读全文
摘要:http://www.cnblogs.com/yang_sy/archive/2011/05/24/2054834.html【摘要】 安全是任何系统至关重要的一个方面,尤其当该系统由分布式的程序和服务组成;安全还是一个非常广泛的话题。因为这些原因,你应该考虑如何在不同的场 景下实现系统的安全。这些关于安全的内容将通过三章内容进行一一介绍。在本章,我们把注意力集中在企业内部WCF服务的安全管理方面。在此场景中,运行 WCF服务的服务端和客户端之间已经存在必要的信任关系;通过客户端访问该服务的用户都来自同一个安全域。WCF服务可以直接访问该域内的信息,并直接使 用这些信息验证用户。在第五章&quo
阅读全文
摘要:http://www.cnblogs.com/yang_sy/archive/2011/05/18/2049391.html【前言】 捕获和处理异常是任何专业的应用程序的一个重要组成部分。在一个复杂的桌面程序 上,许多场景都能产生一个异常,从程序错误、意外的事件、不完整的用户输入,到运行该程序一个或多个的硬件故障。在分布式环境中,异常的发生场景就更多 了。因为网络的状态,在某些情况下,无论应用程序开发人员、还是网络管理员都无法控制网络的发挥功效或者维持其处于正常的工作状态。如果把应用程序访问第 三方组件考虑在内,那么还应考虑你的分布式程序能否可靠地工作. 本章将介绍如何处理客户端和服务端的..
阅读全文
摘要:http://www.cnblogs.com/yang_sy/archive/2011/05/16/2046599.html第二章 寄宿WCF服务 【摘要】 本章先描述WCF service的工作原理;然后阐述寄宿WCF服务的各种方式;随后通过创建WPF程序和Windows Service来寄宿WCF服务;最后讲述支持WCF内置的各种绑定以及如何对一个WCF服务实现多重绑定。 在第一章中,我们为你介绍了如何创建一个 WCF服务,并将其部署到IIS上,然后通过客户端程序访问该服务。在本章中,我们将关注WCF工作的细节;各种寄宿WCF服务的方式;此外,你还将学习 到如何创建和配置宿主程序,其...
阅读全文
摘要:http://www.cnblogs.com/yang_sy/archive/2011/05/10/2041741.html1. 什么是WCF 如果你阅读本书的目的是为了解如何使用WCF构建分布式应用程序和服务,那么什么是WCF,为什么使用WCF?该如何使用WCF? 回答这些问题,让我们来回顾一下历史。 (1)早期个人电脑时代的应用程序 个 人电脑时代,业务解决方案由一套应用程序组合而成。一般会包含文字处理程序,电子表格处理程序,和数据库套件。有经验用户能够把业务数据存贮在数据库中, 然后使用电子表格分析数据,并创建基于数据的报表与文档,或利用文字处理软件写分析报告。这些程序往往安装在同一..
阅读全文
摘要:http://www.cnblogs.com/yang_sy/archive/2011/05/10/2041740.html【题外】 一直在博客园看东西,偶尔也写点东西,但是一直没有做完成的系列。之前曾有关于SQL Server认证系列的随笔,不过那只能称之为个人的笔记,或许个人的笔记都算不上。因为其完全从书本摘抄,连翻译都省却了。打算以后还是要好好的写文 章,多思考,对技术负责。并下网从中吸取经验和教训,并与大家分享和交流。本人计划陆续推出《WCF4.0 step by step》的翻译,本人非科班出身,英语有时候需要求助字典来完成,之前也从未翻译过东西。所以这将是一条非常艰巨的任务。之..
阅读全文
摘要:要求:1、总长8位;2、至少一个大写字母;3、至少一个小写字母;4、至少一个数字(0~9);5、至少一个特殊字符; using System; using System.Collections.Generic; using System.Text; /**************************************************** * Author:quietwalk * Date:2011-12-02 * Fuction:Generate a random password that consists of mixed case (at least...
阅读全文
摘要:http://xahanjianxin.blog.163.com/blog/static/4458605720082215539592/ASCII, American Standard Code for Information Interchange 念起来像是 "阿斯key",定义从 0 到 127 的一百二十八个数字所代表的英文字母或一样的结果与意义。由于只使用7个位元(bit)就可以表示从0到127的数字,大部分的电脑都使用8个位元来存取 字元集(character set),所以从128到255之间的数字可以用来代表另一组一百二十八个符号,称为 extended A
阅读全文
摘要:<Grid IsSharedSizeScope="True"> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto" SharedSizeGroup="myGroup" /> <ColumnDefinition /> <ColumnDefinition SharedSizeGroup="myGroup" /> </Grid.ColumnDefinitions> <Label Gri
阅读全文
摘要:<Grid Background="LightBlue"> <Grid.RowDefinitions> <RowDefinition Height="auto" /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto" /&
阅读全文