原创 C# 網絡圖片轉Base64字符串

參考: https://www.cnblogs.com/hezhengyi/p/11172197.html /// <summary> /// Image 轉成 base64 /// </summary

原创 C# 更換微信小程序碼中間的logo圖層

        /// <summary>         /// 更換小程序碼中間的logo         /// </summary>         /// <param name="wxQrCodePath">微信接口返回生成的

原创 Echarts根據數據長度變換柱狀圖柱狀的顏色

 //查詢圖表數據             function GetData() {                 //獲取輸入值                 //var txtYear = $("#txtYear").val();

原创 linq查詢根據list的一個字段去重,某個字段數據相同的只取一條

//篩選同一分鐘內的數據,只取一條 var zb_wb = (from a in list_pos                          from b in list_wb                          w

原创 c# 批量導入Excel數據到數據庫,根據兩個字段比對List取不重複的數據。

前臺代碼: html: <div class="panel panel-primary" style="max-width:400px;float:left;margin-left:20px;">     <div class="pa

原创 Linq where根據字符串格式的時間,取範圍記錄

因爲數據庫設計的時間字段是vachar,用linq取得話不能直接轉換成DateTime,,就按照字符串直接來進行篩選了。               var list = (from a in db.p_realdata         

原创 c#根據年月獲取所有日期集合、根據年份計算總週數,根據年份和週數獲取一週的開始及結束時間

        //根據年月獲取所有日期          //txt="2019-04"         public List<string> CalTime(string txt) {            DateTime b

原创 WebAPi接收xml格式數據。解決方案

WebAPi接收xml格式數據,會出現“從客戶端(messageText="<?xml version="1.0" ...")中檢測到有潛在危險的 Request.Form 值。” ,在Action上面加一個標識  [ValidateIn

原创 C# DataTable取列中重複的數據,並取出行數

取出Datatable指定列的重複數據,並取出對應的行數索引 code: //取出重複數據 var dis_dat

原创 c#生成條碼

前端代碼: <label>請輸入代碼:</label> <br/> <input id="barcode" class="form-control" width="100" height="30"/> <br/> <button id=

原创 c#根據年月獲取所有日期集合

        //根據年月獲取所有日期          //txt="2019-04"         public List<string> CalTime(string txt) {            DateTime beg

原创 Wpf Reportviewer 生成報表、柱狀圖

主要後臺邏輯: using Microsoft.Reporting.WinForms; using System; using System.Collections.Generic; using System.Data; using Sy

原创 c#後臺定時查庫,socket給前臺發送消息,前臺websocket接收消息;取代前端輪詢查庫;

後臺代碼: using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Linq; u

原创 jquery對已得日期進行加天數、月數、年數等

js代碼:   let lastDate = new Date(lastTime);//已得日期 let nextTime;//計算所得日期  switch (e) {                 default: nextTime

原创 bootstrap table新增行編輯,後臺進行json反序列化,進行增刪改查

效果圖先貼上: 點擊新增增加一條新行、行內點擊可進行修改、刪除; 引用文件     <link rel="stylesheet" type="text/css" href="~/Content/bootstrap.min.css" /