- 博客(28)
- 资源 (1)
- 收藏
- 关注
原创 c#实现typename
Microsoft.VisualBasic.Information.TypeName(fld.Items[i + 1])另,国外网站转载using System;using System.Runtime.InteropServices;using ComTypes = System.Runtime.InteropServices.ComTypes;namespace ComUti...
2018-08-26 12:19:28 1024
原创 按yjh导出到excel表
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System....
2018-08-25 11:32:21 215
原创 大表逻辑处理过程(5/6/7)
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using CpmBigDataImportService;using System.Data;using System.Text.RegularExpress...
2018-08-25 11:29:57 279
原创 c#导出至excel(分月按天存储数据)
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using CpmBigDataImportService;using System.Data;using Excel = Microsoft.Office.I...
2018-08-25 11:25:07 617
原创 vb.net/c#更新outlook联系人列表
Imports Outlook = Microsoft.Office.Interop.OutlookImports Excel = Microsoft.Office.Interop.ExcelImports System.DataImports CpmBigDataImportServicePublic Class Form1 Private dtMain As DataTabl...
2018-08-25 11:22:02 603
原创 C#创建sqlserver数据库
public void CreateDatabase(string lx,string yf) { string sqlPart = @"if not exists(select * from master.sys.databases t where t.name='{0}')begin create database hc on primary (na...
2018-08-19 14:29:15 5278 1
原创 sqlserver数据字典
SELECT t.name tableName ,c.name columnName ,ty.name type ,CASE WHEN ty.name='nvarchar' THEN c.max_length/2 WHEN ty.name='decimal' THEN c.precision ELSE c.max_length END sizeFROM hc.s...
2018-08-18 09:39:21 1088
原创 多行sql转单行
using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Text.RegularExpressions;public partial class Hcfxgj_Other_...
2018-08-17 10:08:26 498
原创 多表工作簿导入数据库表(按日期存储表)
private void ImportHcData() { string xllPath = @"E:\CH\GENERALTOOLS"; string configTableName = "HCYSJ"; CpmVars myVar = new CpmVars(configTableName...
2018-08-16 08:55:48 283
原创 查找空wddm
private DataTable GetNotExistsWddm() { DataTable dt = new DataTable(); dt.Columns.Add("WDDM", typeof(string)); dt.Columns.Add("SL", typeof(decimal)); ...
2018-08-16 08:51:52 129
原创 分析多组差异项保存成datatable
private DataTable GetDqRqDiffs() { /* Excel.Application app = new Excel.Application(); app.Visible = true; MyCommon.FillDtToWor...
2018-08-16 08:50:34 70
原创 差异项列表自动生成
private void GenerateItems() { string str = MyCommon.ReadXmlStringFromFile("type.txt", ";", @"E:\CH\HC"); string[] rows = str.Split(';'); List<string>...
2018-08-16 08:45:10 197
原创 excel的range保存为文本
private void GetRangeText() { Excel.Application app = new Excel.Application(); app.Visible = true; string filename = @"E:\CH\aa.xlsx"; Ex...
2018-08-16 08:43:03 513
原创 C#操作access
以下代码部分是网上下载 public class AccessHelper { /// <summary> /// Access文件名 /// </summary> private string mdbFileName; /// <summary> ...
2018-08-16 08:39:29 319
原创 批量导入数据(文件夹)
#region 批量导入数据 /* */ string xllPath = @"E:\CH\通用导入工具"; string tableName = "HCYSJ"; CpmVars myVar = new CpmVars(tableName, xllPat...
2018-08-14 18:03:01 543
原创 datatable写入sqlite
public class DataTableToSQLte { private string tableName; public string TableName { get { return tableName; } set { tableName = value; } ...
2018-08-14 09:19:52 4456
原创 生成EXCEL文件
/// <summary> /// 生成附件 /// </summary> public void GenerateAttachment(string yf) { string dir = AppDomain.CurrentDomain.BaseDirectory + ...
2018-08-09 13:44:16 152
原创 c#使用outlook发送邮件
/// <summary> /// 发送邮件 /// </summary> /// <param name="yf"></param> public void SendMail(string yf) { Outlook.Appl...
2018-08-09 12:02:37 2338
原创 清空指定文件夹内文件
//清空附件文件夹内文件 string dir = AppDomain.CurrentDomain.BaseDirectory + "\\files"; if (System.IO.Directory.Exists(dir)) { EUtil.DeleteFolderF...
2018-08-09 11:55:30 300
原创 根据当前月份(如201806)生成当期上期同期日期条件
/// <summary> /// 根据当前月份生成当期上期同期日期条件 /// </summary> public class YF { private int year; public int Year { get { return year; } ...
2018-08-09 11:11:02 1126
原创 SQLite使用 (c#)
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System....
2018-08-07 20:15:06 305
原创 初识SQLite
private SQLiteConnection conn; private SQLiteCommand cmd; private void button1_Click(object sender, EventArgs e) { string dir = Environment.GetFolderPath(...
2018-08-06 20:25:19 115
原创 C# XML学习
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Xml;using System.IO;namespace TestXml{ class Program { ...
2018-08-05 20:43:52 121
原创 Excel选定区域生成XML(二)
/// <summary> /// 与表样比较 /// </summary> public class CompareSample { public CompareSample() { dtCheck = CreateDt(); } pri...
2018-08-05 20:33:57 86
原创 DataTable生成JSON
private string GetSeperator(string myType) { return "\""; } private string ToJson(DataTable dt) { if (dt.Rows.Count == 0) return "{}"; else ...
2018-08-05 20:23:20 201
原创 Excel选定区域生成xml文件
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.Office.Tools.Ribbon;using Excel = Microsoft.Office.Interop.Excel;using System.Windows.Forms;us...
2018-08-05 20:20:25 580
原创 正则表达式提取月份
/// <summary> /// 从字符串中获取月份(MM,2位数字) /// </summary> /// <returns></returns> public static string GetMonth(string str) { ...
2018-08-05 12:52:58 3761
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人