![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MVC
小法师丶法
这个作者很懒,什么都没留下…
展开
-
.net C# 日期比较
TimeSpan ts1 = new TimeSpan(Convert.ToDateTime(ooKaQi_Token.CreateTime).Ticks);TimeSpan ts2 = new TimeSpan(DateTime.Now.Ticks);TimeSpan ts = ts1.Subtract(ts2).Duration();string dateDiff = ts.Days.ToString() + “天” + ts.Hours.ToString() + “小时” + ts.Minute原创 2022-12-04 20:55:57 · 472 阅读 · 0 评论 -
C# Post 传输 json格式
【代码】C# Post 传输 json格式。原创 2022-11-27 07:59:08 · 1074 阅读 · 0 评论 -
.net 重定向 301 SEO MVC
string url = Request.Url.ToString();if (!url.Contains(“location”))//本地访问不处理{if (!url.Contains(“www.”))//如果不是本地 不带www.直接 走301 重定向流程{Response.Clear();Response.StatusCode = 301;Response.Status = “301 Moved Permanently”;Response.AddHeader(“Location”, “原创 2022-04-21 10:29:34 · 122 阅读 · 0 评论 -
JQ ajax 循环 table遍历 .net
function XianHuoList() {$.ajax({type: “POST”,dataType: “Json”,//服务器返回的数据类型url: “/ajaxjson/XianHuoList”,data: {Name: $("#names").val(), //KSClassGuid: $("#KSClassGuid").val(), }, beforeSend: function () {原创 2022-03-10 09:14:27 · 980 阅读 · 0 评论 -
.net LINQ 分组求和 单表 MVC c#
var list = from a in oQuListModellist //数据源 group a by new { a.khid, a.khname, a.khq, a.th } into g select new { g.Key, g.Key.khid, ...原创 2022-02-14 16:09:50 · 355 阅读 · 0 评论 -
C# 读取csv datatable
public static DataTable OpenCSV(string filePath)//从csv读取数据返回table { System.Text.Encoding encoding = GetType(filePath); //Encoding.ASCII;// DataTable dt = new DataTable(); System.IO.FileStream fs = new System.IO.FileStream(fi...原创 2021-07-01 09:49:16 · 582 阅读 · 0 评论 -
MUI 上下啦分页 触发列表AJAX 无整理 比较乱
@{Layout = null;} 装车 <!--标准mui.css--><link href="~/mui-master/examples/hello-mui/css/mui.min.css" rel="stylesheet" /><!--App自定义的css--><link href="~/mui-master/examples/hello-mui/css/app.css" rel="stylesh原创 2021-03-15 12:54:28 · 113 阅读 · 0 评论 -
.net post 模拟提交信息
if (!IsPostBack) { string url = "https://www.ccccccc.com"; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); string postdata = "tel=11111111111"; byte[] requestBytes = System.Text.E...原创 2021-01-21 21:36:21 · 282 阅读 · 0 评论 -
MSSQL MSQL 删除所有的表
use vrksdeclare @table varchar(600)while (select count(*) from sysobjects where type=‘u’)>=1beginset @table=(select top 1 name from sysobjects where type=‘u’)set @table='drop table '+@tableexec(@table)end原创 2021-01-20 10:40:42 · 172 阅读 · 0 评论 -
.net C# MVC前台CHTML 调用 控制器的方法【本控制器】
@{ string sa9 = ViewBag.pclass.Titles(1569); @sa9; } public string Titles(int ID) { string Name = ""; ...原创 2021-01-17 14:37:57 · 1103 阅读 · 0 评论 -
.net C# 创建TXT文本信息 MVC
/// <summary> /// 文本记录 /// </summary> /// <param name="code"></param> /// <param name="name"></param> public static void Txt(string code, string name) { string fileLogPath = AppDomain....原创 2020-12-18 20:56:54 · 447 阅读 · 2 评论 -
Layui显示 隐藏 操作 按钮删除 编辑 审核
{{# if(d.ShTypes == 0){ }} <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="KaiPiao"><i class="layui-icon layui-icon-edit"></i>开票</a> <a class="layui-btn layui-btn-normal layui-btn-x.原创 2020-11-17 09:49:01 · 1796 阅读 · 0 评论 -
.net 微信模板消息DEMO 已测试好用
/// <summary> /// 发送模板消息 /// </summary> /// <param name="accessToken">AccessToken</param> /// <param name="data">发送的模板数据</param> /// <returns></returns> public static string SendTe...原创 2020-10-23 16:54:06 · 222 阅读 · 0 评论 -
.net 上传 Excel MVC
<input type="file" name="WenJian" id="FileUpload1" style="display:none;" /> <button type="button" id="UploadFile1" onclick="UploadFile()" class="btn btn-primary">保存</button>...原创 2019-12-18 10:04:37 · 136 阅读 · 0 评论 -
tree 树结构 无限分类小法师日志
[HttpPost] public JsonResult TreeList() { List<GTree> GTreeList = new List<GTree>(); List<RXJH_QU> Listorder = blladminrxjhqn.GetList<RXJH_QU>(u =...原创 2019-07-24 22:52:45 · 142 阅读 · 0 评论 -
linq 左连接
var list = from a in S_Userlist join b in S_ToexamineLoglist on a.ID equals b.UserID into a_b from subpet in a_b.DefaultIfEmpty() ...原创 2019-06-18 13:14:42 · 3410 阅读 · 0 评论 -
.net MVC 文件上传
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using System.IO;namespace UploadFileTest.Controllers{ public class UploadTestControl...转载 2019-05-15 12:38:03 · 939 阅读 · 0 评论