
asp.net
文章平均质量分 71
Eichee
卖阿胶的程序员,纯手工熬制,质量保证!
展开
-
DataTable转List
将DataTable转划成List的方法public static List> DataTableToList(DataTable dt) { List> list = new List>(); foreach (DataRow dr in dt.Rows) { Di原创 2016-12-26 09:47:42 · 298 阅读 · 0 评论 -
单例模式
为什么需要单例模式:有的类在系统中只能有一个类的对象,例如资源管理器、缓存管理器等。实现方法:饿汉式将构造函数申明为private,避免外界访问。定义一个private static final的对象实例,static 成员的初始化只在类的第一次使用的时候执行一次。定义一个public static 的getInstance方法,返回唯一实例//饿汉式单原创 2017-02-22 13:45:31 · 342 阅读 · 0 评论 -
PayPal支付功能实现
系统要添加PayPal支付功能,使用最简单的方式,在网页上添加一个PayPal的支付按钮,进入PayPal支付页面,支付成功后返回系统。1、支付按钮添加 在支付页面创建一个Form表单,包含以下重要字段原创 2017-07-07 16:04:49 · 2659 阅读 · 0 评论 -
[Docker] 建立docker 镜像是的一个异常信息
异常信息:image operating system "windows" cannot be used on this platform背景:建立了一个asp.net core mvc的项目,然后在项目中添加了docker支持文件,使用docker build 指令生成docker 镜像时,出现上面的错误。出现错误的原因,在建立docker 支持文件的时候,有一个弹框这个弹框...原创 2019-06-18 23:55:55 · 969 阅读 · 0 评论 -
[Asp.Net]NPOI操作Excel
NPOI是Excel的优秀操作类库,就不多说了。直接上代码,记录一下这段代码方法一:读取Excel /// <summary> /// Excel转换成DataTable(.xls) /// </summary> /// <param name="filePath">Excel文件路径...原创 2019-06-29 09:30:31 · 644 阅读 · 0 评论 -
Polly 故障处理策略
Polly故障处理策略,记录代码,不详细解释了~~using Polly;using Polly.Retry;using System;using System.Collections.Generic;using System.Threading;namespace pollyDemo{ class Program { static void M...原创 2019-07-28 10:31:45 · 420 阅读 · 0 评论 -
aspose.words生成word,创建表格以及段落的几段代码
class Program { static void Main(string[] args) { Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); //页面设置 ...原创 2019-08-15 16:01:26 · 2232 阅读 · 0 评论 -
NPOI的几个扩展方法
#region NPOI 扩展 public static ISheet GetSheet2(this IWorkbook workbook, string name) { ISheet sheet = workbook.GetSheet(name); if (sheet == null) ...原创 2019-08-15 16:33:38 · 462 阅读 · 0 评论