190806 chi 품목정보에서 카테고리 없는 자료도 보이게 함
품목정보 정렬 기능 추가 190731 로그기록화면(beta)추가
This commit is contained in:
95
SubProject/FLG0000/LogData/Lov_LogItem.cs
Normal file
95
SubProject/FLG0000/LogData/Lov_LogItem.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
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 = "";
|
||||
|
||||
DataTable 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;
|
||||
}
|
||||
|
||||
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.AsEnumerable().Where(t => t.Field<String>(0).StartsWith(typestr) && t.Field<string>(0).Length == 8);
|
||||
foreach (var item in grplist)
|
||||
{
|
||||
//string data = string.Format("[{0}] {1}", item[0], item[1]);
|
||||
var lv = this.listBox2.Items.Add(item[1].ToString());
|
||||
lv.Tag = item[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Lov_LogItem_Load(object sender, EventArgs e)
|
||||
{
|
||||
//해다 자료를 불러와서 표시해준다.
|
||||
var typestr = logType + logDiv;
|
||||
this.Text = typestr;
|
||||
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
|
||||
|
||||
dtList = FCOMMON.DBM.getCodeTable("19");
|
||||
|
||||
var grplist = dtList.AsEnumerable().Where(t => t.Field<String>(0).StartsWith(typestr) && t.Field<string>(0).Length == 6);
|
||||
this.listBox1.Items.Clear();
|
||||
foreach (var item in grplist)
|
||||
{
|
||||
var lv = this.listBox1.Items.Add(item[1].ToString());
|
||||
lv.Tag = item[0].ToString();
|
||||
}
|
||||
binit = true;
|
||||
|
||||
this.tbGrp.Focus();
|
||||
}
|
||||
|
||||
private void btOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user