[성현모] TRA 버그 수정, Json Convert Tool 추가
This commit is contained in:
46
CPXV2 TRA V2/JsonConvertTool/Form1.cs
Normal file
46
CPXV2 TRA V2/JsonConvertTool/Form1.cs
Normal file
@ -0,0 +1,46 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using SystemX.Common.Util;
|
||||
using CPXV2Log = SystemX.Net.Platform.SystemX.Net.XEFCore.DBContext.CPXV2Log;
|
||||
|
||||
namespace JsonConvertTool
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
richInput.Clear();
|
||||
textEdit1.Text = string.Empty;
|
||||
dataGridView1.DataSource = null;
|
||||
}
|
||||
|
||||
private void btnConvert_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string strDecomp = richInput.Text;
|
||||
string json = strDecomp.GzipDecompress();
|
||||
var list = JsonConvert.DeserializeObject<List<CPXV2Log.Tables.HIST_TestResult>>(json);
|
||||
|
||||
dataGridView1.DataSource = list.ToDataTable();
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
textEdit1.Text = ex.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user