Archive for the ‘ASP.NET’ Category

部署outlook2003插件

如果你的插件部署失败,很可能是没有信任的原因,请参考下面的文章吧。 问题 outlook addin 部署成功了,但打死不能切换语言,无论切换哪个都是英文。(多语言是通过ResourceManager读取的) 解决方法 原因是资源文件是放在子目录下的dll文件,例如”zh-CN\xxx.resource.dll”,这些dll并没有授权。 你可以在 VS的命令行中输入 “caspol -lg” 列出所有授权的组。 如果你是按照MSDN的文章进行部署,你应该会有个CaspolSecurityPolicyCreator.cs的文件用于授权。 //找到这句 string arguments = policyLevel + " -q -ag " + parentCodeGroup + " -url \"" + solutionInstallationUrl + "\" Nothing -n \"" + solutionCodeGroupName + "\" -d \"" + solutionCodeGroupDescription + "\"";   //把Nothing改为FullTrust,其实就是把这个目录的所有文件都信任了 string arguments = policyLevel + " -q [...]


VSTO获取邮件联系人邮箱

C# VSTO获取邮件联系人邮箱,包括获取To,CC等 直接从mailItem.Recipients取得所有这封邮件的联系人,然后在根据Type来判断是属于哪个的。 public enum OlMailRecipientType { olOriginator = 0, olTo = 1, olCC = 2, olBCC = 3, } 举例,取得CC的联系人邮箱: public static List<string> GetCCAddress(Microsoft.Office.Interop.Outlook.MailItem mailItem) { List<string> addressList = new List<string>();   Outlook.Recipients recipients = mailItem.Recipients;   foreach (Outlook.Recipient recipient in recipients) { if (recipient.Type != 2)//OlMailRecipientType.olCC=2 { continue; } if (recipient.Address != null) [...]


C#遍历DataSet

C#中的Dataset就像一个数据库,有多个表(Table),一般只有一个表,然后每个表中有行(DataRow)和列(DataColumn),DataRow[DataColumn]可以得到某行某列数据。 foreach (DataTable dt in YourDataset.Tables) { foreach (DataRow dr in dt.Rows) foreach (DataColumn dc in dt.Columns) Console.WriteLine("{0}, {1}, {2} ", dt.TableName, dc.ColumnName, dr[dc]); }


信息管理实验7-使用GridView实现查看详细信息,修改,删除数据

信息管理实验7-使用GridView实现查看详细信息,修改,删除数据
首先创建好一个数据库&表
CREATE DA…


信息管理实验6-使用存储过程

按照下图添加控件 确保你的数据库中有northwind数据库,以及表Region,没有的话就自己建立一个吧


信息管理实验5-ASP.NET操作XML

1:实验目的,实验要求(自己写) 2:实验步骤: 一:Xml是实现病历共享的另外一种较好的方式。C#通过System.Xml空间下的一系列类来处理XML文档,如何使用这些类呢? 在应用程序的头部添加: using System.Xml 二:新建patient.xml文档 <?xml version=”1.0″ encoding=”gb2312″?> <patientsmaterial> </patientsmaterial> …