This topic describes how to find, install, remove, and update NuGet packages using PowerShell commands. You can also work with packages using theManage NuGet Packagesdialog box. For more information, see [Using the Manage NuGet Packages dialog](Using-the Add-Library-Package-Reference-Dialog-Box).Usi Read More
posted @ 2013-04-13 16:26 一抹、思乡泪 Views(4089) Comments(0) Diggs(0) Edit
select * from users order by id limit 10 offset 0;//offset代表从第几条记录“之后“开始查询,limit表明查询多少条结果运用:sqlitecmd.CommandText = string.Format("select * from GuestInfo order by GuestId limit {0} offset {0}*{1}", size, index-1);//size:每页显示条数,index页码 Read More
posted @ 2013-04-10 14:27 一抹、思乡泪 Views(38197) Comments(0) Diggs(7) Edit
新建一个appconfig文件,添加如下代码<?xml version="1.0" encoding="utf-8" ?><configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> </startup></configuration> 问题OK了参考:http://hi.baidu.com/wfoss Read More
posted @ 2013-04-02 10:32 一抹、思乡泪 Views(368) Comments(0) Diggs(0) Edit
右键解决方案,点击属性或者在,生成也能找到配置管理器最后修改右键项目属性,在生成找到目标平台,改成和警告的那个一样就行 Read More
posted @ 2013-04-02 10:27 一抹、思乡泪 Views(667) Comments(0) Diggs(0) Edit
反射用好了真的强大,下面就简单示例一下利用反射写各错误日志的插件。原理:先生成一个dll文件,这个文件是用来将错误消息写入到文件,或者是将消息保存到数据库中,反正这个dll(插件)就是用来处理错误消息的,错误消息从哪里来呢?当然是主程序了,这都用问,o(︶︿︶)o ,我又一次被BS了,:-),那么我们怎么用这个外部的dll文件呢,当然是用反射了,我们把这个dll文件的路径、dll里的类名、方法名这些放在一个配置文件里,然后通过反射取到他们,再调用他,说白了就是动态加载。这描述能力.... 自己先寒一个 — —!代码:先写个写入txt文件的类,然后生成dll文件,代码很简单,没什么好说的,当然. Read More
posted @ 2013-03-15 10:08 一抹、思乡泪 Views(906) Comments(5) Diggs(0) Edit
.net framework 中DateTime.MinValue => 0001/01/01 00:00:00DateTime.MaxValue => 9999/12/31 23:59:59.999SqlDateTime.MinValue.Value => 1753/01/01 00:00:00SqlDateTime.MaxValue.Value => 9999/12/31 23:59:59.997 (注意毫秒是997) sql server中:DateTime 最小值 => 1753/01/01 00:00:00SmallDateTime 最小值 => Read More
posted @ 2013-02-18 15:48 一抹、思乡泪 Views(233) Comments(0) Diggs(0) Edit
/// <summary> /// sql到C#的数据类型转换 /// </summary> /// <param name="typename">sql数据类型名称</param> /// <returns>C#名称</returns> public static string SqlToCsharp(string typename) { switch (typename) { case "bit": return "Boolean"; ... Read More
posted @ 2013-02-18 15:48 一抹、思乡泪 Views(473) Comments(0) Diggs(0) Edit
foreach (Control item in this.panel1.Controls){ if (string.IsNullOrEmpty(((TextBox)item).Text)) { this.label1.Text += ((TextBox)item).Name + "为空"; } }用扩展方法验证空字符串:namespace System{ public static class CheckStringEmpty { public static bool IsNullOrEmpty... Read More
posted @ 2013-02-18 15:47 一抹、思乡泪 Views(478) Comments(0) Diggs(0) Edit
--获取最小: --方法1:CREATE FUNCTION [dbo].[MinimumDateValue]()RETURNS DATETIMEASBEGIN RETURN CONVERT(DATETIME, '1753-01-01', 121)END --方法2: declare @Date smalldatetimeset @Date=0select @Date --获取最大 CREATE FUNCTION [dbo].[MaximumDateValue]()RETURNS DATETIMEASBEGIN RETURN CONVERT(DATETIME, '9999 Read More
posted @ 2013-02-18 15:44 一抹、思乡泪 Views(8256) Comments(0) Diggs(0) Edit
CREATE FUNCTION dbo.fnSplit( @sInputList VARCHAR(8000), -- List of delimited items列表分隔的项目 @sDelimiter VARCHAR(8000) = ',' -- delimiter that separates items分隔符分隔的项目)RETURNS @List TABLE (item VARCHAR(8000))BEGINDECLARE @sItem VARCHAR(8000) WHILE CHARINDEX(@sDelimiter,@sInputList,0) <> 0 Read More
posted @ 2013-02-18 15:43 一抹、思乡泪 Views(329) Comments(0) Diggs(0) Edit