随笔分类 -  .net

.net
摘要:private T createObj<T>() { Type t = typeof(T); PropertyInfo[] propertys = t.GetProperties(); object entity = t.Assembly.CreateInstance(t.FullName); fo 阅读全文
posted @ 2022-08-01 01:20 全栈攻城师 阅读(323) 评论(0) 推荐(0)
摘要:/// <summary> /// CSV读取并解析为DataTable /// </summary> /// <param name="path">文件路径</param> /// <param name="splitString">切割符号诸如|</param> /// <param name= 阅读全文
posted @ 2022-07-28 23:58 全栈攻城师 阅读(254) 评论(0) 推荐(0)
摘要:export class CommonHtttpRequestUtils { static getClientUrl(): string { //@ts-ignore return Xrm.Utility.getGlobalContext().getClientUrl(); } static get 阅读全文
posted @ 2021-11-15 00:24 全栈攻城师 阅读(325) 评论(0) 推荐(0)
摘要://错误内容项=>> //Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. try { } catch (DbEntityValidationExce 阅读全文
posted @ 2021-06-15 16:37 全栈攻城师 阅读(58) 评论(0) 推荐(0)
摘要:$.ajax({ url: ".....call.aspx/FuncName", data: "{value:'value'}", type: "post", dataType: "json", contentType: "application/json", success: function ( 阅读全文
posted @ 2021-05-06 16:12 全栈攻城师
摘要:using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Blob; string strConnect = "AZURE 阅读全文
posted @ 2021-03-23 15:52 全栈攻城师
摘要:<configuration> <system.web> <webServices> <protocols> <add name="HttpGet"/> <add name="HttpPost"/> </protocols> </webServices> </system.web> </config 阅读全文
posted @ 2021-01-18 16:06 全栈攻城师
摘要:public class ImpersonateUser : IDisposable { [DllImport("advapi32.dll", SetLastError = true)] private static extern bool LogonUser(string lpszUsername 阅读全文
posted @ 2021-01-18 14:56 全栈攻城师
摘要://classifylist 为你要进行序列化的内容 JsonSerializerSettings settings = new JsonSerializerSettings(); settings.ReferenceLoopHandling = ReferenceLoopHandling.Igno 阅读全文
posted @ 2021-01-14 16:45 全栈攻城师 阅读(957) 评论(0) 推荐(0)
摘要://需要引用Renci.SshNet.dll /// <summary> /// SFTP操作类 /// </summary> public class SFTPHelper { #region 字段或属性 private string pwd = string.Empty; private Sft 阅读全文
posted @ 2020-07-20 14:25 全栈攻城师 阅读(357) 评论(0) 推荐(0)
摘要://工具SoapUI<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wser="http://www.wservicedddddd.com/"> <soapenv:Header> <o 阅读全文
posted @ 2020-04-28 16:30 全栈攻城师
摘要:public static class CommonLog { public static string path { get { string pt = HttpContext.Current.Server.MapPath("~/logs"); if (!Directory.Exists(pt)) 阅读全文
posted @ 2019-11-20 02:47 全栈攻城师 阅读(407) 评论(0) 推荐(0)
摘要://获取POST-Stream结果 public static string GetPostString(HttpRequestBase HttpRequestBase) { Int32 intLen = Convert.ToInt32(HttpRequestBase.InputStream.Len 阅读全文
posted @ 2019-11-11 02:41 全栈攻城师 阅读(407) 评论(0) 推荐(0)
摘要:/// <summary> /// DataTable 转换为 List<T> /// </summary> /// <typeparam name="T"></typeparam> /// <param name="dt"></param> /// <returns></returns> publ 阅读全文
posted @ 2019-11-11 02:33 全栈攻城师 阅读(291) 评论(0) 推荐(0)
摘要://将QueryString参数转换为Model public static T GetQueryStringModel<T>(HttpRequestBase HttpRequestBase) { Type type = typeof(T); T Tmodel = (T)type.Assembly. 阅读全文
posted @ 2019-11-11 02:17 全栈攻城师 阅读(766) 评论(0) 推荐(0)
摘要://POST获取数据 public static string PostToUrl(string url, string postData) { HttpWebRequest hwr = (HttpWebRequest)HttpWebRequest.Create(url); hwr.Method = 阅读全文
posted @ 2019-11-11 02:07 全栈攻城师 阅读(550) 评论(0) 推荐(0)
摘要:public static T ConvertToModel<T>(this DataTable DataTable, T Tmodel) { //不进行处理 if (DataTable.Rows.Count == 0) return Tmodel; //递归MODEL处理 Type t = Tmo 阅读全文
posted @ 2019-11-11 01:04 全栈攻城师 阅读(234) 评论(0) 推荐(0)