随笔分类 - C#.NET
摘要:/// /// 数组比较是否相等 /// /// 数组1 /// 数组2 /// true:相等,false:不相等 public bool CompareArray(byte[] bt1, byte[] b...
阅读全文
摘要:private void button1_Click(object sender, RoutedEventArgs e) { int[] copy1 = { 1, 2, 3, 4 }; int[] copy2 = { 5, 6, 7, 8 }; ...
阅读全文
摘要:直接贴代码吧 public class PmsService { /// /// pms接口 /// /// 接口传递数据类 /// public string InvokeService(InvokeBaseDa...
阅读全文
摘要:var tb1 = Tb1.Text; if (string.IsNullOrEmpty(tb1)) { tb1 = "0000"; } var s1 = tb1.Substring...
阅读全文
摘要:DateTime:DateTime?:
阅读全文
摘要:Over the weekend, I was doing some work on the internal CMS we use over at eagleenvision.net and I wanted to scrap my custom table implementation for ...
阅读全文
摘要:之前做项目的时候要用到上传文件的功能,现在我总结一下,上传文件和删除文件的代码,在以后的使用的过程中也更方便查找。 [HttpPost] public ActionResult EditUser() { var userDal = new UserDal(); const string savePath = "/Images/Avatar/"; const string saveUrl = "/Images/Avatar/"; const string fileTypes = ...
阅读全文
摘要:在下面的示例中,DisplayProducts 方法接收一个数据表,其中包含名为 ProductName一个 DataColumn,提取 ProductName 值,然后输出值。 using System;using System.Data;class Program { public void DisplayProducts(DataTable table) { var productNames = from products in table.AsEnumerable() select products.Field("ProductName"); Console....
阅读全文
摘要:C# DataTable 转 List 方法,网上有好多,之前也收集了,感觉这个也不错,重要是自己要领会这里面的代码含义。接不来我就把代码贴出来分享一下,大家觉得如果不好,请留言我,我来改进。using System;using System.Collections.Generic;using System.Data;using System.Reflection;namespace jdrz.HumanIdentify{ public class Helper { /// /// DataTable 转换为List 集合 /// ...
阅读全文
摘要:function ajax_GetFirstData(data) { var len = data.Data.length; if (len > 0) { $("#jquery_jplayer_1").jPlayer("play", 0); window.clearInterval(interval); $("#hidd_id").val(data.Data[0].Id); $("#txt_sfzh").val(data.Data[0].IdCard); $("#txt_name").va
阅读全文
摘要:JQuery Parse JSON varobj=$.parseJSON(data);C# creates JSON string: public static class JSONHelper { public static string ToJSON(this object obj) { JavaScriptSerializer serializer = new JavaScriptSerializer(); return serializer.Serialize(obj); } ...
阅读全文
摘要:http://www.cnblogs.com/xcj26/p/3536082.html
阅读全文
摘要:/// /// 杀死进程 /// private void KillProcesses() { var cfn = GetAppsettingStr("checkin-filefolder-name"); var ofn = GetAppsettingStr("outmoney-filefolder-name"); var ifn = GetAppsettingStr("inmoney-filefolder-name"); foreach...
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace K100Dll { [StructLayout(LayoutKind.Se...
阅读全文
摘要:短信猫问题:公司有个同事在做短信猫接收功能的时候老是接收不到,不知道是为什么,使用的接收类型是StringBuilder,最后才知道只要给StringBuilder加大空间就没这个问题了,也不知道是为什么?C++ C#=====================================WO...
阅读全文
摘要:DllImport是System.Runtime.InteropServices命名空间下的一个属性类,其功能是提供从非托管DLL导出的函数的必要调用信息。 DllImport属性应用于方法,要求最少要提供包含入口点的dll的名称。DllImport的定义如下: [AttributeUsage(AttributeTargets.Method)] public class DllImportAttribute: System.Attribute { public DllImportAttribute(string dllName) {…} //定位参数为d...
阅读全文
摘要:后台:using System;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.Web;using System.Web.Script.Serialization;using HotelCheckIn_PlatformSystem.DataService.BLL;using HotelCheckIn_PlatformSystem.DataService.Bll;using HotelCheckIn_PlatformSystem.DataService.Dal;usin
阅读全文
摘要:People.csusing System;using System.Collections.Generic;using System.Data;using System.Linq;using System.Text;namespace RadGridViewControl{ public class People { public Guid Id { get; set; } public string FirstName { get; set; } public string LastName { get;...
阅读全文
摘要:/// /// 显示列顺序 /// /// private void ShowColumnIndex(List list) { foreach (var i in list) { SelectColumn selectColumn = i; foreach (var column in rgv_Control.Columns.Where(column => !column.Name.Equal...
阅读全文
摘要:问题:我想去掉红线框住的部分,希望有会的网友帮助我,谢谢!解决方法:默认:修改:【利用ContextMenuOpening事件,对应你的项目,你要自己修改那判断的字符串(你的中文)】private void radGridView1_ContextMenuOpening(object sender,Telerik.WinControls.UI.ContextMenuOpeningEventArgs e) { for (int i = 0; i < e.ContextMenu.Items.Count; i++) { Str...
阅读全文