10 2017 档案
摘要:using System; using Microsoft.Win32; using System.Diagnostics; using System.IO; namespace MSCL { /// /// 压缩解压类 /// public class ZipHelper { /// /// 利用 WinRAR 进...
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Configuration; using System.Data.SqlClient; using System.Data; using S...
阅读全文
摘要:using System; using System.Linq; using System.Xml.Linq; namespace Sample2 { class Program { static void Main(string[] args) { #region 写文件一(生成节点性质的) XD...
阅读全文
摘要://引用using Newtonsoft.Json; using Newtonsoft.Json.Linq; public ActionResult JsonSample() { ResponseResult obj = new ResponseResult(); try { JObject jo
阅读全文
摘要:正则表达式可以: •测试字符串的某个模式。例如,可以对一个输入字符串进行测试,看在该字符串是否存在一个电话号码模式或一个信用卡号码模式。这称为数据有效性验证 •替换文本。可以在文档中使用一个正则表达式来标识特定文字,然后可以全部将其删除,或者替换为别的文字 •根据模式匹配从字符串中提取一个子字符串。可以用来在文本或输入字段中查找特定文字 正则表达式语法 一个正则表达式就是由普通字符(...
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Sample3 { class Program { static...
阅读全文
摘要:uploadify3.2上传文件 using System; using System.Collections.Generic; using Sys...
阅读全文
摘要:/// /// 反射得到实体类的字段名称和值 /// var dict = GetProperties(model); /// /// 实体类 /// 实例化 /// public static Dictionary GetProperties(T t) { var ret = new Dictionary(); if (t == null) { return null; ...
阅读全文
摘要:/*查找XML*/ var filePath = Server.MapPath("~/xml/sample.xml"); XDocument doc = XDocument.Load(filePath); var text1 = doc.Descendants("用户") //定位到节点 .Where(p => p.Element("性别").Value.Co...
阅读全文
摘要:--1、默认情况下,SQL Server中的CLR是关闭的,所以我们需要执行如下命令打开CLR: exec sp_configure 'clr enabled',1 reconfigure GO -- DROP FUNCTION dbo.fnScoketSend --删除Function -- drop assembly SqlDependency ...
阅读全文
摘要:
阅读全文
摘要:MSCL超强工具类库 是基于C#开发的超强工具类集合,涵盖了日常B/S或C/S开发的诸多方面,包含上百个常用封装类(数据库操作类全面支持Mysql、Access、Oracle、Sqlserver、Sqlite等数据库,常用字符串处理类,内存容器类,Session/Cookie/Cache类,Conf
阅读全文
摘要:ALTER PROCEDURE sp_refallview AS --刷新所有视图 DECLARE @ViewName VARCHAR(MAX); DECLARE @i INT; SET @i = 0; DECLARE #_cursor CURSOR FOR SELECT name FROM sysobjects WHERE type = 'V'; OPE...
阅读全文
摘要:在Sql Server 数据库还原出现 3154错误 解决方法1:不要在数据库名字上点右键选择还原,而要是在根目录“数据库”三个字上点右键选择还原,然后再选择数据库,问题便可以解决,如果不行参照方法2 解决方法2:写sql语句处理: RESTORE DATABASE [databaseName] F
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Configuration; using System.Data.SqlClient; using System.Data; using S...
阅读全文
摘要:using System; using System.Collections.Generic; using System.Text; using System.Configuration; using System.Xml; using System.Web; namespace MSCL { /// /// 配置文件帮助类 /// public class...
阅读全文
摘要:@{ Layout = null; } 示例 public ActionResult Sample() { List list = new List() { new SampleData{ id=1000, name="张三", sex="男"}, new Sam...
阅读全文
摘要:using Quartz; using Quartz.Impl; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading; using System.Threading.Tasks; ...
阅读全文
摘要://App_Start-RouteConfig.cs public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo...
阅读全文
摘要:近来发现数据库过大,空间不足,因此打算将数据库的数据进行全面的清理,但表非常多,一张一张的清空,实在麻烦,因此就想利用SQL语句一次清空所有数据.找到了三种方法进行清空.使用的数据库为MS SQL SERVER. 1.搜索出所有表名,构造为一条SQL语句 declare @trun_name varchar(8000) set @trun_name='' select @trun_name=...
阅读全文
摘要:--获取所有数据库名: SELECT name FROM master..sysdatabases WHERE name NOT IN ( 'master', 'model', 'msdb', 'tempdb', 'northwind','pubs' ) --获取某数据库的所有表: SELECT name FROM YiDianTongV2..sysobjects Where xtype='...
阅读全文
摘要:create proc pro_GetProTrans @GoodsId int, @Number int, @StockPrice money, @SupplierId int, @EmpId int, @StockUnit varchar(50), @StockDate datetime, @TotalMoney money , @ActMoney money , @baseId int, ...
阅读全文
摘要:在批处理中加字段或表或视图或存储过程是否存在的判断
阅读全文
摘要:/************************************************************ * 标题:MS SQLServer 批量附加数据库 * 说明:请根据下面的注释使用此脚本 * 时间: 2015/7/13 11:16:41 *******************************************************...
阅读全文
摘要:auto_copy.bat文件
阅读全文
摘要:using System.Drawing; using System.Drawing.Imaging; using System.Web.Mvc; namespace MVC2017_Sample.Controllers { public class DefaultController : Cont
阅读全文