프로젝트에 category 추가, 컬럼명을 한글로 변경
This commit is contained in:
97
SubProject/FLG0000/LogSMTRepare/Lov_LogItem.cs
Normal file
97
SubProject/FLG0000/LogSMTRepare/Lov_LogItem.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
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;
|
||||
|
||||
namespace FLG0000.LogData
|
||||
{
|
||||
public partial class Lov_LogItem : Form
|
||||
{
|
||||
bool binit = false;
|
||||
string logType = "";
|
||||
string logDiv = "";
|
||||
|
||||
DSLog.Log_SMTRepare_ItemDataTable dtList = null;
|
||||
public Lov_LogItem(string logType_, string logDiv_)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.logType = logType_;
|
||||
this.logDiv = logDiv_;
|
||||
this.listBox1.MultiSelect = false;
|
||||
this.listBox1.FullRowSelect = true;
|
||||
this.listBox1.GridLines = true;
|
||||
this.listBox1.SelectedIndexChanged += listBox1_SelectedIndexChanged;
|
||||
|
||||
|
||||
this.listBox2.MultiSelect = false;
|
||||
this.listBox2.FullRowSelect = true;
|
||||
this.listBox2.GridLines = true;
|
||||
this.listBox2.SelectedIndexChanged += listBox2_SelectedIndexChanged;
|
||||
}
|
||||
|
||||
private void __Load(object sender, EventArgs e)
|
||||
{
|
||||
//해다 자료를 불러와서 표시해준다.
|
||||
var typestr = logType + logDiv;
|
||||
this.Text = typestr;
|
||||
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
|
||||
|
||||
dtList = taItem.GetData(FCOMMON.info.Login.gcode);// FCOMMON.DBM.getCodeTable("19");
|
||||
|
||||
var grplist = dtList.AsEnumerable().Where(t => t.code.StartsWith(typestr) && t.code.Length == 6);
|
||||
this.listBox1.Items.Clear();
|
||||
foreach (var item in grplist)
|
||||
{
|
||||
var lv = this.listBox1.Items.Add(item.Title);
|
||||
lv.Tag = item.code;// item[0].ToString();
|
||||
}
|
||||
binit = true;
|
||||
|
||||
this.tbGrp.Focus();
|
||||
}
|
||||
|
||||
void listBox2_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (binit == false) return;
|
||||
var listview = sender as ListView;
|
||||
if (listview.SelectedItems.Count > 0)
|
||||
{
|
||||
this.tbItem.Text = listview.SelectedItems[0].Text;
|
||||
}
|
||||
}
|
||||
|
||||
void listBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (binit == false) return;
|
||||
var listview = sender as ListView;
|
||||
this.listBox2.Items.Clear();
|
||||
if (listview.SelectedItems.Count > 0)
|
||||
{
|
||||
this.tbGrp.Text = listview.SelectedItems[0].Text;
|
||||
var typestr = listBox1.SelectedItems[0].Tag.ToString();// listBox1.Items[listBox1.SelectedIndex].ToString();
|
||||
var grplist = dtList .Where(t=>t.code.StartsWith(typestr) && t.code.Length == 8);
|
||||
foreach (var item in grplist)
|
||||
{
|
||||
//string data = string.Format("[{0}] {1}", item[0], item[1]);
|
||||
var lv = this.listBox2.Items.Add(item.Title);// item[1].ToString());
|
||||
lv.Tag = item.code;// item[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user