
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
using ClientLib;
using ClientLib.CommonService;
using DevExpress.XtraEditors;
using PublicLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace HANMI_J_SALE
{
partial class SelectOutPosForm : XtraForm
{
private string m_CUST_CD;
private string m_CUST_NN;
public string m_LOCATION_NM;
public SelectOutPosForm(string cust_cd, string cust_nm)
{
InitializeComponent();
m_CUST_CD = cust_cd;
m_CUST_NN = cust_nm;
textEdit_CUST_CD.Text = cust_cd;
textEdit_CUST_NM.Text = cust_nm;
this.Shown += (sender, e) =>
{
searchProc();
};
textEdit_LOCATION_NM.KeyPress += (sender, e) =>
{
if (e.KeyChar == '\r')
{
searchProc();
}
};
simpleButton_Text_Clear.Click += (sender, e) =>
{
textEdit_LOCATION_NM.Text = "";
};
simpleButton_Search.Click += (sender, e) =>
{
searchProc();
};
simpleButton_SAVE.Click += (sender, e) =>
{
if (UtilClass.isNull(textEdit_LOCATION_NM.Text))
{
return;
}
saveProc();
};
simpleButton_RELOAD.Click += (sender, e) =>
{
textEdit_LOCATION_NM.Text = "";
searchProc();
};
simpleButton_DELETE.Click += (sender, e) =>
{
if (MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes)
{
return;
}
deleteProc();
};
gridView_Main.FocusedRowChanged += (sender, e) =>
{
DataRow row = gridView_Main.GetFocusedDataRow();
if (row == null)
{
return;
}
textEdit_LOCATION_NM.Text = UtilClass.toStr(row["LOCATION_NM"]);
};
gridView_Main.KeyPress += (sender, e) =>
{
if (e.KeyChar == '\r')
{
DataRow row = gridView_Main.GetFocusedDataRow();
if (row != null)
{
m_LOCATION_NM = UtilClass.toStr(row["LOCATION_NM"]);
this.DialogResult = DialogResult.Yes;
this.Close();
}
}
};
gridView_Main.DoubleClick += (sender, e) =>
{
DataRow row = gridView_Main.GetFocusedDataRow();
if (row != null)
{
m_LOCATION_NM = UtilClass.toStr(row["LOCATION_NM"]);
this.DialogResult = DialogResult.Yes;
this.Close();
}
};
simpleButton_SELECT.Click += (sender, e) =>
{
DataRow row = gridView_Main.GetFocusedDataRow();
if (row != null)
{
m_LOCATION_NM = UtilClass.toStr(row["LOCATION_NM"]);
this.DialogResult = DialogResult.Yes;
this.Close();
}
};
simpleButton_Cancel.Click += (sender, e) =>
{
this.DialogResult = DialogResult.Cancel;
this.Close();
};
}
public void searchProc()
{
try
{
this.Cursor = Cursors.WaitCursor;
gridControl_Main.DataSource = null;
SerializedSqlParam[] aParam = new SerializedSqlParam[] {
ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),
ClientClass.CreateSqlParameter("CUST_CD", SqlDbType.NVarChar, textEdit_CUST_CD.Text),
ClientClass.CreateSqlParameter("LOCATION_NM", SqlDbType.NVarChar, textEdit_LOCATION_NM.Text)
};
ResultData resultData = ClientClass.GetData("GetCustLocationSelectPopup", aParam);
if (resultData.isError)
{
throw new Exception(resultData.ResultValue);
}
gridControl_Main.DataSource = resultData.TableData;
gridView_Main.Focus();
this.Cursor = Cursors.Arrow;
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
MessageBox.Show(ex.Message);
}
}
private void saveProc()
{
try
{
this.Cursor = Cursors.WaitCursor;
gridControl_Main.DataSource = null;
SerializedSqlParam[] aParam = new SerializedSqlParam[] {
ClientClass.CreateSqlParameter("MODE", SqlDbType.NVarChar, "I"),
ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),
ClientClass.CreateSqlParameter("CUST_CD", SqlDbType.NVarChar, textEdit_CUST_CD.Text),
ClientClass.CreateSqlParameter("LOCATION_NM", SqlDbType.NVarChar, textEdit_LOCATION_NM.Text),
ClientClass.CreateSqlParameter("REG_ID", SqlDbType.NVarChar, ConstClass._USR_ID),
};
ResultData resultData = ClientClass.SetData("SaveCustLocationSelectPopup", aParam);
if (resultData.isError)
{
throw new Exception(resultData.ResultValue);
}
searchProc();
this.Cursor = Cursors.Arrow;
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
MessageBox.Show(ex.Message);
}
}
private void deleteProc()
{
try
{
this.Cursor = Cursors.WaitCursor;
gridControl_Main.DataSource = null;
SerializedSqlParam[] aParam = new SerializedSqlParam[] {
ClientClass.CreateSqlParameter("MODE", SqlDbType.NVarChar, "D"),
ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),
ClientClass.CreateSqlParameter("CUST_CD", SqlDbType.NVarChar, textEdit_CUST_CD.Text),
ClientClass.CreateSqlParameter("LOCATION_NM", SqlDbType.NVarChar, textEdit_LOCATION_NM.Text),
ClientClass.CreateSqlParameter("REG_ID", SqlDbType.NVarChar, ConstClass._USR_ID),
};
ResultData resultData = ClientClass.SetData("SaveCustLocationSelectPopup", aParam);
if (resultData.isError)
{
throw new Exception(resultData.ResultValue);
}
searchProc();
this.Cursor = Cursors.Arrow;
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
MessageBox.Show(ex.Message);
}
}
}
}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235·using ClientLib;using ClientLib.CommonService;using DevExpress.XtraEditors;using PublicLib;using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq;using System.Reflection;using System.Text;using System.Threading;using System.Windows.Forms;namespace HANMI_J_SALE{partial class SelectOutPosForm : XtraForm{private string m_CUST_CD;private string m_CUST_NN;public string m_LOCATION_NM;public SelectOutPosForm(string cust_cd, string cust_nm){InitializeComponent();m_CUST_CD = cust_cd;m_CUST_NN = cust_nm;textEdit_CUST_CD.Text = cust_cd;textEdit_CUST_NM.Text = cust_nm;this.Shown += (sender, e) =>{searchProc();};textEdit_LOCATION_NM.KeyPress += (sender, e) =>{if (e.KeyChar == '\r'){searchProc();}};simpleButton_Text_Clear.Click += (sender, e) =>{textEdit_LOCATION_NM.Text = "";};simpleButton_Search.Click += (sender, e) =>{searchProc();};simpleButton_SAVE.Click += (sender, e) =>{if (UtilClass.isNull(textEdit_LOCATION_NM.Text)){return;}saveProc();};simpleButton_RELOAD.Click += (sender, e) =>{textEdit_LOCATION_NM.Text = "";searchProc();};simpleButton_DELETE.Click += (sender, e) =>{if (MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes){return;}deleteProc();};gridView_Main.FocusedRowChanged += (sender, e) =>{DataRow row = gridView_Main.GetFocusedDataRow();if (row == null){return;}textEdit_LOCATION_NM.Text = UtilClass.toStr(row["LOCATION_NM"]);};gridView_Main.KeyPress += (sender, e) =>{if (e.KeyChar == '\r'){DataRow row = gridView_Main.GetFocusedDataRow();if (row != null){m_LOCATION_NM = UtilClass.toStr(row["LOCATION_NM"]);this.DialogResult = DialogResult.Yes;this.Close();}}};gridView_Main.DoubleClick += (sender, e) =>{DataRow row = gridView_Main.GetFocusedDataRow();if (row != null){m_LOCATION_NM = UtilClass.toStr(row["LOCATION_NM"]);this.DialogResult = DialogResult.Yes;this.Close();}};simpleButton_SELECT.Click += (sender, e) =>{DataRow row = gridView_Main.GetFocusedDataRow();if (row != null){m_LOCATION_NM = UtilClass.toStr(row["LOCATION_NM"]);this.DialogResult = DialogResult.Yes;this.Close();}};simpleButton_Cancel.Click += (sender, e) =>{this.DialogResult = DialogResult.Cancel;this.Close();};}public void searchProc(){try{this.Cursor = Cursors.WaitCursor;gridControl_Main.DataSource = null;SerializedSqlParam[] aParam = new SerializedSqlParam[] {ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),ClientClass.CreateSqlParameter("CUST_CD", SqlDbType.NVarChar, textEdit_CUST_CD.Text),ClientClass.CreateSqlParameter("LOCATION_NM", SqlDbType.NVarChar, textEdit_LOCATION_NM.Text)};ResultData resultData = ClientClass.GetData("GetCustLocationSelectPopup", aParam);if (resultData.isError){throw new Exception(resultData.ResultValue);}gridControl_Main.DataSource = resultData.TableData;gridView_Main.Focus();this.Cursor = Cursors.Arrow;}catch (Exception ex){this.Cursor = Cursors.Arrow;MessageBox.Show(ex.Message);}}private void saveProc(){try{this.Cursor = Cursors.WaitCursor;gridControl_Main.DataSource = null;SerializedSqlParam[] aParam = new SerializedSqlParam[] {ClientClass.CreateSqlParameter("MODE", SqlDbType.NVarChar, "I"),ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),ClientClass.CreateSqlParameter("CUST_CD", SqlDbType.NVarChar, textEdit_CUST_CD.Text),ClientClass.CreateSqlParameter("LOCATION_NM", SqlDbType.NVarChar, textEdit_LOCATION_NM.Text),ClientClass.CreateSqlParameter("REG_ID", SqlDbType.NVarChar, ConstClass._USR_ID),};ResultData resultData = ClientClass.SetData("SaveCustLocationSelectPopup", aParam);if (resultData.isError){throw new Exception(resultData.ResultValue);}searchProc();this.Cursor = Cursors.Arrow;}catch (Exception ex){this.Cursor = Cursors.Arrow;MessageBox.Show(ex.Message);}}private void deleteProc(){try{this.Cursor = Cursors.WaitCursor;gridControl_Main.DataSource = null;SerializedSqlParam[] aParam = new SerializedSqlParam[] {ClientClass.CreateSqlParameter("MODE", SqlDbType.NVarChar, "D"),ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),ClientClass.CreateSqlParameter("CUST_CD", SqlDbType.NVarChar, textEdit_CUST_CD.Text),ClientClass.CreateSqlParameter("LOCATION_NM", SqlDbType.NVarChar, textEdit_LOCATION_NM.Text),ClientClass.CreateSqlParameter("REG_ID", SqlDbType.NVarChar, ConstClass._USR_ID),};ResultData resultData = ClientClass.SetData("SaveCustLocationSelectPopup", aParam);if (resultData.isError){throw new Exception(resultData.ResultValue);}searchProc();this.Cursor = Cursors.Arrow;}catch (Exception ex){this.Cursor = Cursors.Arrow;MessageBox.Show(ex.Message);}}}}