摘要: using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Title = "请选择要插入的图片"; ofd.Filter = "JPG图片|*.jpg|BMP图片|*.bmp|Gif图片|*.gif"; ofd.CheckFileExists = 阅读全文
posted @ 2019-09-02 11:47 芮源 阅读(223) 评论(0) 推荐(0)
摘要: List<DeptInfo> deptList = (from emp in empList where emp.Status == "在职" //筛选“在职”员工 orderby emp.DeptID ascending //按“部门ID”排序 group emp by new //按“部门ID” 阅读全文
posted @ 2019-09-02 11:42 芮源 阅读(1726) 评论(0) 推荐(0)
摘要: public static async Task<List<Syncchip>> DownSyncchipList(int id) { using (var client = new HttpClient()) { try { string url = ApiServer.url+"/school/ 阅读全文
posted @ 2019-09-02 11:39 芮源 阅读(1079) 评论(0) 推荐(0)
摘要: 芮源: public class IsInternet { /// <summary> /// 判断是否有网 /// </summary> /// <returns>true为有网,false为无网</returns> public bool IsInternetAvailable() { try 阅读全文
posted @ 2019-09-02 11:35 芮源 阅读(584) 评论(0) 推荐(0)
摘要: //分组去重 Tag_data = Tag_data.GroupBy(p => p.epc).Select(g => g.First()).OrderBy(o=>o.epc).ToList(); //去除字符串的空格 string trim = Regex.Replace(epc.epc, @"\s 阅读全文
posted @ 2019-09-02 11:33 芮源 阅读(474) 评论(0) 推荐(0)
摘要: conn.Open(); OleDbDataAdapter Bada = new OleDbDataAdapter("select * from " + cmdText, conn);//建立一个DataAdapter对象 OleDbCommandBuilder cb = new OleDbComm 阅读全文
posted @ 2019-08-26 08:55 芮源 阅读(732) 评论(0) 推荐(0)
摘要: //var fileName = System.IO.Path.GetFileName(upload.FileName); //var filePhysicalPath = Server.MapPath("~/Content/" + fileName);//我把它保存在网站根目录的 upload 文 阅读全文
posted @ 2019-08-24 13:05 芮源 阅读(1611) 评论(0) 推荐(0)
摘要: C#追加文件 StreamWriter sw = File.AppendText(Server.MapPath(".")+"\\myText.txt"); sw.WriteLine("追逐理想"); sw.WriteLine("kzlll"); sw.WriteLine(".NET笔记"); sw. 阅读全文
posted @ 2019-08-24 12:50 芮源 阅读(178) 评论(0) 推荐(0)
摘要: 只有路径 (适用于带http之类的服务): 需要在<head>首先引入 function getRootPath() { var curPath = window.location.href; //获取主机地址之后的目录,如: /a/b/c.html var pathName = window.lo 阅读全文
posted @ 2019-07-25 19:05 芮源 阅读(514) 评论(0) 推荐(0)
摘要: 取字符串的三个函数:slice(start,[end]),substring(start,[end])和substr(start,[length]) 常用的路径获取方式如下: http://localhost:8020/a/b/c.html window.location.pathname.subs 阅读全文
posted @ 2019-07-25 17:46 芮源 阅读(204) 评论(0) 推荐(0)