- 博客(23)
- 收藏
- 关注
转载 c# List<List<object(Id,Name)> 转换成 Dictionary<string, string>
//源数据 List<object> li = new List<object>(); foreach (var i in list) { li.Add(new { Id = i.Id, Name = i.Name }); }//需要过...
2019-09-25 19:24:00
818
转载 c# linq List<T> To Excel
StringBuilder str = new StringBuilder(); str.Append(DateTime.Now.Millisecond); string url = "/Content/" + str + ".xlsx"; var path = Server.MapPath(url);...
2019-09-18 15:05:00
291
转载 c# 格式化easyui tree
idtextFalsepid2�û�True03����True14����ԱFalse25����Ա2False3NULLNULLNULLNULLpublic ActionResult GetIndex...
2019-09-17 17:42:00
5994
转载 定时关闭弹窗
public class message { private string _caption; public void Show(string text, string caption, int timeout) { this._caption = caption; StartTimer(t...
2019-09-02 14:44:00
236
转载 C#中HttpWebRequest的用法详解
HttpWebRequest和HttpWebResponse类是用于发送和接收HTTP数据的最好选择。它们支持一系列有用的属性。这两个类位 于System.Net命名空间,默认情况下这个类对于控制台程序来说是可访问的。请注意,HttpWebRequest对象不是利用new关键字通过构 造函数来创建的,而是利用工厂机制(factory mechanism)通过Cre...
2019-09-02 14:42:00
1192
转载 c# HttpWebRequest GetResponse时抛出异常
https://www.cnblogs.com/LL-723/p/4268020.html转载于:https://www.cnblogs.com/ruiyuan/p/11446277.html
2019-09-02 14:20:00
854
转载 c# Picturebox路径
picHeadImg.ImageLocation = string.Format("http://img3.imgtn.bdimg.com/it/u=4160106393,1595591376&fm=214&gp=0.jpg");// picHeadImg.Image = Image.FromStream(WebRequest.Create(head_img).Get...
2019-09-02 11:54:00
593
转载 c# 线程问题
//子线程调用主线程方法一 //this.Invoke(new Action(() => { // dgvScanChip.DataSource = SaveChipList;...
2019-09-02 11:49:00
102
转载 c# 打开文件库
using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Title = "请选择要插入的图片"; ofd.Filter = "JPG图片|*.jpg|BMP图片|*.bmp|Gif图片|*.gif";...
2019-09-02 11:47:00
142
转载 c# linq查询
List<DeptInfo> deptList = (from emp in empList where emp.Status == "在职" //筛选“在职”员工 orderby emp.DeptID ascending...
2019-09-02 11:42:00
100
转载 c# 异步请求demo
public static async Task<List<Syncchip>> DownSyncchipList(int id) { using (var client = new HttpClient()) { try {...
2019-09-02 11:39:00
328
转载 c# 判断是否有网
芮源:public class IsInternet { /// <summary> /// 判断是否有网 /// </summary> /// <returns>true为有网,false为无网</returns> public bool IsInternetA...
2019-09-02 11:35:00
299
转载 c# 门禁随笔
//分组去重Tag_data = Tag_data.GroupBy(p => p.epc).Select(g => g.First()).OrderBy(o=>o.epc).ToList();//去除字符串的空格string trim = Regex.Replace(epc.epc, @"\s", ""); //datag...
2019-09-02 11:33:00
423
转载 DataTable到Access
conn.Open(); OleDbDataAdapter Bada = new OleDbDataAdapter("select * from " + cmdText, conn);//建立一个DataAdapter对象 OleDbCommandBuilder ...
2019-08-26 08:55:00
831
转载 C#文件上传
//var fileName = System.IO.Path.GetFileName(upload.FileName); //var filePhysicalPath = Server.MapPath("~/Content/" + fileName);//我把它保存在网站根目录的 upload 文件夹 var fileName = Path...
2019-08-24 13:05:00
141
转载 C#操作文件
C#追加文件 StreamWriter sw = File.AppendText(Server.MapPath(".")+"\\myText.txt"); sw.WriteLine("追逐理想"); sw.WriteLine("kzlll"); sw.WriteLine(".NET笔记"); sw.Flush(); sw.Close();C#拷贝文件 ...
2019-08-24 12:50:00
103
转载 JavaScript 全局封装
只有路径 (适用于带http之类的服务):需要在<head>首先引入function getRootPath() { var curPath = window.location.href; //获取主机地址之后的目录,如: /a/b/c.html var pathName = window.location.path...
2019-07-25 19:05:00
258
转载 jsavascript 目录的操作(摘抄)
取字符串的三个函数:slice(start,[end]),substring(start,[end])和substr(start,[length])常用的路径获取方式如下:http://localhost:8020/a/b/c.htmlwindow.location.pathname.substring(1, window.location.pathname.s...
2019-07-25 17:46:00
149
转载 bootstrap仿地址管理
精要;<!--列表--> <div class="list-group-item"> <p class="list-group-item-text"> ...
2019-07-25 09:31:00
162
转载 bootstrap 模态弹出模板
<a href="javascript:shoujieditInfo()" >修改</a><!-- 模态框(Modal) --><div class="modal fade" id="zpwdupdate" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-h...
2019-07-25 09:29:00
184
转载 50个Bootstrap扩展插件
按钮、面包屑导航、日历、树形菜单、媒体播放器、以及可视化编辑器等等无障碍辅助插件Accessibility Plugin基本的按钮控件CSS3 Microsoft Modern Buttons面包屑导航Bootstrap-Breadcrumb日历Bootstrap-Calendar旋转木马幻灯片Bootstrap Modal Carousel复选框prettyCheckable颜...
2019-07-25 09:24:00
257
转载 sql 分组
表 aname ke cheng张三 1 96张三 2 80李四 1 90李四 2 81转为name 数学 语文张三 96 80张三 90 81select name,SUM( case p.ke when '1' then p.cheng else 0 end) '数学',SUM( c...
2019-07-25 08:59:00
74
转载 linq表连接
SELECT ( SELECT d.DeptName FROM Dept d WHERE d.Id=p.DeptId ) DeptName, count( p.DeptId) AS Count FROM Person pGROUP BY p.DeptIdvar dept = (from p in db.Person ...
2019-07-23 08:39:00
85
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人