Initial commit
This commit is contained in:
104
Handler/Project/Dialog/fNewSID.cs
Normal file
104
Handler/Project/Dialog/fNewSID.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using AR;
|
||||
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 Project.Dialog
|
||||
{
|
||||
public partial class fNewSID : Form
|
||||
{
|
||||
public int FindSIDCount = -1;
|
||||
public string NewSID { get; set; }
|
||||
public fNewSID(string presid)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.tbOldSid.Text = presid;
|
||||
|
||||
}
|
||||
|
||||
private void fNewSID_Load(object sender, EventArgs e)
|
||||
{
|
||||
//해당 sid 로 101,103,106 가능한 sid 목록을 표시한다
|
||||
var sid = tbOldSid.Text.Trim();
|
||||
var presid = this.tbOldSid.Text;
|
||||
|
||||
var newsid = PUB.SIDCovert(presid, "fNewSID_Load", out bool converr);
|
||||
if (converr == false)
|
||||
{
|
||||
tbNewSid.Text = newsid;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newsid.Contains('|'))
|
||||
{
|
||||
//multi sid list
|
||||
var lst = new List<String>();
|
||||
foreach (var SIDTo in newsid.Split('|'))
|
||||
{
|
||||
var msidto = presid + ";" + SIDTo;
|
||||
lst.Add(msidto);
|
||||
}
|
||||
var f = new Dialog.fSelectSID(lst);
|
||||
if (f.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var v = f.Value.Split(';'); //0은 old .1=new
|
||||
tbNewSid.Text = v[1].Trim();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tbNewSid.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.NewSID = tbNewSid.Text.Trim();
|
||||
|
||||
if (NewSID.isEmpty())
|
||||
{
|
||||
UTIL.MsgE("SID값이 입력(선택) 되지 않았습니다");
|
||||
return;
|
||||
}
|
||||
|
||||
if (NewSID == tbOldSid.Text)
|
||||
{
|
||||
UTIL.MsgE($"기존 SID와 동일한 SID값이 확인되었습니다\n\n" +
|
||||
$"기존:{tbOldSid.Text}\n" +
|
||||
$"신규:{NewSID}");
|
||||
return;
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
UTIL.TouchKeyShow(tbNewSid, "Input SID");
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
var old = this.tbOldSid.Text.Trim();
|
||||
var newsid = PUB.SIDCovert(old, "fNewSID_Button2Click", out bool err);
|
||||
|
||||
if (err == false)
|
||||
tbNewSid.Text = newsid;
|
||||
else
|
||||
{
|
||||
tbNewSid.Text = string.Empty;
|
||||
UTIL.MsgE(newsid);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user