02 2025 档案
摘要:服务端 1、新建WebService服务,添加函数 [WebMethod] public List<Test> GetData(string time) { try { List<Test> testList= new List<Test>(); //中间调用获取数据的逻辑代码 return tes
阅读全文
摘要:从JSON转为指定根节点的XML,需要先引用Newtonsoft.Json DataTable localTable = new DataTable(); JObject res = new JObject { ["List"] = JArray.Parse(JsonConvert.Serializ
阅读全文
摘要:直接使用OpenFileDialog时,有时候会导致程序直接崩溃,所以需要进行处理 OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = $"请选择【{type}】Excel文件"; ofd.Filter = "Excel文件| *.xlsx;
阅读全文