181210 chi NR구매등록시 이미지 표시 및 추가 기능

NR구매목록에서 권한 없는 사람이 더블클릭으로 편집할 수 있는 버그 수정
This commit is contained in:
chikyun.kim
2018-12-10 12:29:18 +09:00
parent 43841e6c52
commit 6b374123fd
184 changed files with 78917 additions and 70460 deletions

View File

@@ -1,55 +1,55 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FCOMMON
{
public partial class fLovDateList : Form
{
public string selectedDate = string.Empty;
public fLovDateList(List<string> dateList)
{
InitializeComponent();
this.KeyPreview = true;
this.KeyDown += fLovDateList_KeyDown;
this.listBox1.Items.Clear();
foreach (var dateStr in dateList)
this.listBox1.Items.Add(dateStr);
}
private void __Load(object sender, EventArgs e)
{
}
void fLovDateList_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape) this.Close();
}
void selectItem()
{
selectedDate = string.Empty;
if (listBox1.Items.Count < 1) DialogResult = System.Windows.Forms.DialogResult.Cancel;
if (listBox1.SelectedItem == null) DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.selectedDate = listBox1.SelectedItem.ToString();
DialogResult = System.Windows.Forms.DialogResult.OK;
}
private void listBox1_DoubleClick(object sender, EventArgs e)
{
selectItem();
}
private void listBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
selectItem();
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FCOMMON
{
public partial class fLovDateList : Form
{
public string selectedDate = string.Empty;
public fLovDateList(List<string> dateList)
{
InitializeComponent();
this.KeyPreview = true;
this.KeyDown += fLovDateList_KeyDown;
this.listBox1.Items.Clear();
foreach (var dateStr in dateList)
this.listBox1.Items.Add(dateStr);
}
private void __Load(object sender, EventArgs e)
{
}
void fLovDateList_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape) this.Close();
}
void selectItem()
{
selectedDate = string.Empty;
if (listBox1.Items.Count < 1) DialogResult = System.Windows.Forms.DialogResult.Cancel;
if (listBox1.SelectedItem == null) DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.selectedDate = listBox1.SelectedItem.ToString();
DialogResult = System.Windows.Forms.DialogResult.OK;
}
private void listBox1_DoubleClick(object sender, EventArgs e)
{
selectItem();
}
private void listBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
selectItem();
}
}
}