自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(48)
  • 收藏
  • 关注

转载 日期连贯计算

需求:从选中的日期列表中,合并日期连贯的日期,组成DateSpans对象的StartDate和EndDate属性,形成新的对象List<DateSpans>,代码和结果截图如下: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 5 nam...

2017-09-04 10:45:00 213

转载 abp 调试

概要研究Abp(ASP.NET Boilerplate)框架有几个月了,从一遍遍的看官方文档,到现在看源码,一路走来学习了很多知识。 很多新手都很关心源码如何调试,我也是如此,在反复看Debugging文档后还是无法调试!经过反复研究学习,终于可以调试了,先看一下下面截图效果,下面我来按步骤来介绍如何调试abp源码:SourcelinkorSymbol file(....

2017-07-11 16:19:00 490

转载 关联关系和依赖关系分辨

可以从以下两个方面来分辨:·从类的属性是否增加的角度看: 发生依赖关系的两个类都不会增加属性。其中的一个类作为另一个类的方法的参数或者返回值,或者是某个方法的变量而已。 发生关联关系的两个类,其中的一个类成为另一个类的属性,而属性是一种更为紧密的耦合,更为长久的持有关系。·从关系的生命周期来看: 依赖关系是仅当类的方法被调用时而产生,伴随着方法的结束...

2017-06-06 09:37:00 344

转载 sql分组合并

select * from dbo.[User]select sqr,stuff((select ','+rtrim(xdr) from dbo.[User] where sqr=a.sqr for xml path('')),1,1,'') as [xdrs]from (select distinct sqr from dbo.[User]) a转载于:https:/...

2016-07-01 10:39:00 222

转载 ASP.NET MVC 文件上传

  如果想要用HTML表单实作文件上传的功能,那么必须在输出的<form>表单标签加上一个enctype属性,且内容必须设定为multipart/form-data,要通过Html.BeginForm辅助方法新增额外的属性必须再加上第四个参数,并传入一个匿名对象即可。如下范例:@using (Html.BeginForm("Upload", "File", FormMet...

2016-02-14 10:30:00 99

转载 压缩LDF档

--压缩LDF档USE VoucherServer;GO-- Truncate the log by changing the database recovery model to SIMPLE.ALTER DATABASE VoucherServerSET RECOVERY SIMPLE;GO-- Shrink the truncated log fil...

2016-01-08 17:39:00 75

转载 查看并分析数据表所占的空间

--1.新增TEMP TABLEcreate table #temptable ([name] varchar(50),[rows] bigint,resverved varchar(50),data varchar(50),index_size varchar(50),unused varchar(50)) --2.执行查询结果select 'in...

2016-01-08 17:37:00 89

转载 C# 扩展方法

  有许多扩展类的方式。如果有类的源代码,继承就是给对象添加功能的好方法。但是如果没有源代码,该肿么办呢?此时可以使用扩展方法,它允许改变一个类,但不需要该类的源代码。  扩展方法是静态方法,它是类的一部分,但实际上没有放在类的源代码中。假定下面Demo中的Money类需要一个方法AddToAmount(decimal amountToAdd)。但是,由于某种原因,程序集最初的源代码...

2015-09-02 14:20:00 54

转载 vs 预编译命令行

xcopy "$(SolutionDir)\Transight_FY_DataExchange_UI\CuscapiUpdaterServer.xml" /i /d /y转载于:https://www.cnblogs.com/GerryGe/p/4674191.html

2015-07-24 17:57:00 268

转载 An unhandled exception of type 'System.TypeInitializationException' occurred in System.ServiceModel....

异常“An unhandled exception of type 'System.TypeInitializationException' occurred in System.ServiceModel.dllAdditional information: The type initializer for 'System.ServiceModel.DiagnosticUtili...

2015-04-17 10:25:00 1017

转载 C# 获取存在DataTable1不存在DataTable2的数据的快速方法

通过合并和获得改变两个方法获得差异的部分:dataTable1.AcceptChanges();dataTable1.Merge(dataTable2);DataTable changesTable = dataTable1.GetChanges();这样可以快速获得dataTable2中存在而dataTable1中不存在的行,反之可以用dataTable2合并dataTable1。...

2014-07-10 18:07:00 588

转载 textbox自动提示

    AutoCompleteStringCollection myCutomSource = new AutoCompleteStringCollection(); myCutomSource.AddRange(new string[] { "成都市东门", "成都市北门", "成都市西门", "成都市南门", "1都市南门", "1成都市南门", "1成都市南...

2013-12-05 10:43:00 112

转载 全面理解面向对象的 JavaScript(转载)

http://www.ibm.com/developerworks/cn/web/1304_zengyz_jsoo/#resources前言当今 JavaScript 大行其道,各种应用对其依赖日深。web 程序员已逐渐习惯使用各种优秀的 JavaScript 框架快速开发 Web 应用,从而忽略了对原生 JavaScript 的学习和深入理解。所以,经常出现的情况是,很多...

2013-11-21 17:38:00 128

转载 C#中文乱码转换

string text="中文";string keyword;byte[] buffer= Encoding.UTF8.GetBytes(text);keyword=Encoding.GetEncoding("GB2312").GetString(buffer);转载于:https://www.cnblogs.com/GerryGe/p/3360777.html

2013-10-10 10:57:00 1243

转载 HTTP 请求未经客户端身份验证方案“Anonymous”授权。从服务器收到的身份验证标头为“Negotiate,NTLM”。...

近来项目需要Web Service验证授权,一般有两种解决方案:1.通过通过SOAP Header身份验证。2.通过集成windows身份验证。今天我就尝试了已第二种方式进行授权,首先发布Web Service到IIS,然后选择身份验证,启用Windows身份验证,禁用匿名身份验证发布好了Web Servive就要在Client端调用了,我用的是VS2008,在clien...

2013-08-20 16:38:00 973

转载 WebServices中有关返回XmlDocument

#region Overring Order [WebMethod] public XmlDocument Transight_OverringOrder(int chkseq) { XmlDocument xd = new XmlDocument(); try ...

2013-05-20 19:28:00 115

转载 log4net用在WebServices中

最近写一个WebServices要记录log,首当想到的当然是log4net.dll,我把原来WinFrom的配置拷贝过来,log记不了,嘛问题呢?于是百度,Google,不少文章呢,有的说WebServices用不了log4net,有的贴出配置照操作还是不能记,哥来兴趣了,log4net不会这么不给力吧?研究了一番答案是否定的,log4net还是很给力的。log4net用在We...

2013-02-01 14:39:00 110

转载 C#验证IP地址和端口

///<summary> /// 判断是否是Ip地址 /// </summary> /// <param name="str1"></param> /// <returns></returns> public st...

2013-01-21 13:45:00 853

转载 MS SQL Server常用语句

select * from sysobjects where xtype='u' --查找用户表转载于:https://www.cnblogs.com/GerryGe/archive/2013/01/04/2843796.html

2013-01-04 10:53:00 80

转载 SHFileOperation方法拷贝文件

using System;using System.Collections.Generic;using System.Text;using System.IO;using System.Runtime.InteropServices;namespace ConsoleApplication1{ class Program { static void M...

2012-08-14 18:16:00 297

转载 控制.exe重复打开,以及给.exe传参数

static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] args)...

2012-07-04 09:44:00 122

转载 写logo

public static void WriteErrorLog(Exception ex) { string LOG_FOLDER = AppDomain.CurrentDomain.BaseDirectory + "Log"; try { //日志文件路径 ...

2012-06-28 15:42:00 85

转载 aspx和aspx.cs中基本文件结构(继承关系)

用VS创建的网站每个aspx文件都对应一个cs文件,而cs文件里的类一般和文件同名,如果遇见关键字的情况才会自动使类名前加个'_',例如:_Default.创建的这个cs文件继承自System.Web.UI.Page类,而且只能\必须继承该类.原因就是aspx文件是继承cs文件的.<@page 中 Codebehind 、Inherits 和aspx的关系我们在编web程序...

2012-05-04 09:35:00 321

转载 GridView移动显示颜色

if (e.Row.RowType == DataControlRowType.DataRow) { //当鼠标停留时更改背景色 e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#EBFBBA...

2012-04-17 11:22:00 73

转载 sql日期时间

1、Sybase://周五至周四//select convert(varchar(10),dateadd(day,-1-datepart(weekday,getdate()),getdate()),111);//select convert(varchar(10),dateadd(day,5-datepart(weekday,getdate()),getdate()),111);...

2012-04-09 13:55:00 120

转载 sql server2008 的OLEDB连接字符串

public static string conn= "Provider=SQLOLEDB;Server=192.168.1.1;Initial Catalog= database_name;User ID=sa; Password=pwd;";转载于:https://www.cnblogs.com/GerryGe/archive/2012/03/28/2420658.html...

2012-03-28 09:25:00 517

转载 System.Diagnostics.Stopwatch

http://blog.csdn.net/sky_zt/article/details/5950932#if DEBUG System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start();#endif/////////////////////========...

2012-03-26 15:29:00 82

转载 水晶报表

http://hi.baidu.com/jia818915/blog/item/f81090c29bd0911e0ff4773c.html转载于:https://www.cnblogs.com/GerryGe/archive/2012/03/15/2397894.html

2012-03-15 13:17:00 47

转载 Web调用水晶报表

using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web....

2012-02-21 16:04:00 186

转载 数据库连接字符串大全

http://www.connectionstrings.com/转载于:https://www.cnblogs.com/GerryGe/archive/2012/01/20/2327762.html

2012-01-20 10:11:00 56

转载 Google Map开发(一) ASP.NET中调用Google Map API实现简单的地图显示

http://blog.csdn.net/BlueMap/article/details/5710092转载于:https://www.cnblogs.com/GerryGe/archive/2012/01/19/2326117.html

2012-01-19 08:59:00 76

转载 C#如何扩展类型的内置方法

C#3.0(VS2008)支持在任何类型上扩展生成自定义的方法。比如说想在string类型的对象里面多一个ToInt32(),来方便的将字符转换成整形。在实现的过程中的关键字为static和this下面我们来做一个在string类型中新建一个ToInt32的自定义方法View Code   public static class Extension//必须先声明一...

2012-01-16 15:27:00 105

转载 JS将Table导出到Excel

<script type="text/javascript" language="javascript"> var idTmr; function method1(tableid) {//整个表格拷贝到EXCEL中 var curTbl = document.getElementById(tableid);...

2012-01-09 09:18:00 109

转载 C#可空类型

引用自:http://www.cnblogs.com/jhxk/articles/1619867.htmlMSDN说:可空类型可以表示基础类型的所有值,另外还可以表示 null 值。可空类型可通过下面两种方式中的一种声明:1、System.Nullable<T> variable2、T? variableT 是可空类型的基础类型。T 可以是包括 struc...

2012-01-07 09:45:00 73

转载 <br style="clear:both" /><br />

<%@ Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/199...

2011-12-31 10:25:00 156

转载 GridView内容<br />换行

if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[6].Text = Server.HtmlDecode(e.Row.Cells[6].Text); e.Row.Cells[7].Text = Server.HtmlDecode(e.Row.Cells[7...

2011-12-21 08:26:00 131

转载 Linq合并两个DataTable

var linqbitem = from wip in dt_onwip.AsEnumerable() join bitem in dt_cos_bitem.AsEnumerable() on wip.Field<string>("item_no").Trim() equals bitem.Field<string>...

2011-12-20 13:36:00 172

转载 GridView直接导Excel

/// <summary> /// 匯出到Excel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnExport_Click(object s...

2011-12-19 11:20:00 94

转载 动态创建DataTable

//动态创建DataTable用来绑定到GridView。DataTable dt_per = new DataTable(); DataColumn column_per; column_per = new DataColumn(); column_per.DataType = System.Type.GetType("System.Str...

2011-12-14 14:54:00 85

转载 table画进度条

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><met...

2011-12-13 11:41:00 185

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除