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_SALE { partial class AlarmMessageForm : XtraForm { public AlarmMessageForm() { InitializeComponent(); simpleButton_OK.Click += (sender, e) => { saveProc(); }; simpleButton_Cancel.Click += (sender, e) => { this.DialogResult = DialogResult.Cancel; this.Close(); }; this.Shown += (sender, e) => { try { SerializedSqlParam[] aParam = new SerializedSqlParam[] { ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD) }; ResultData result = ClientClass.GetData("GetAlarmRouting", aParam); if (result.isError) { throw new Exception(result.ResultValue); } UtilClass.SetLookup(lookUpEdit_ROUT_CD, result.TableData, "ROUT_CD", "ROUT_NM", true, false); } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }; } private void saveProc() { try { this.Cursor = Cursors.WaitCursor; SerializedSqlParam[] aParam = new SerializedSqlParam[] { ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD), ClientClass.CreateSqlParameter("ROUT_CD", SqlDbType.NVarChar, lookUpEdit_ROUT_CD.EditValue), ClientClass.CreateSqlParameter("ALARM_MSG", SqlDbType.NVarChar, memoEdit_ALARM_MSG.Text), ClientClass.CreateSqlParameter("DISPLAY_YN", SqlDbType.NVarChar, checkEdit_DISPLAY_YN.Checked ? "Y" : "N"), ClientClass.CreateSqlParameter("REG_ID", SqlDbType.NVarChar, ConstClass._USR_ID), ClientClass.CreateSqlParameter("RESULT_STR", SqlDbType.NVarChar, "", ParameterDirection.Output, 1000) }; ResultData result = ClientClass.SetData("SaveAlarmMessage", aParam); if (result.isError) { throw new Exception(result.ResultValue); } XtraMessageBox.Show("정상적으로 전송하였습니다."); this.DialogResult = DialogResult.Yes; this.Close(); this.Cursor = Cursors.Arrow; } catch (Exception ex) { this.Cursor = Cursors.Arrow; XtraMessageBox.Show(ex.Message); } } } }