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_STD
{
partial class InsertCateForm : XtraForm
{
string m_RowStatus = "ADD";
public InsertCateForm()
{
InitializeComponent();
simpleButton_Save.Click += (sender, e) =>
{
saveProc(false);
};
simpleButton_SaveClose.Click += (sender, e) =>
{
saveProc(true);
};
simpleButton_Cancel.Click += (sender, e) =>
{
this.DialogResult = DialogResult.Cancel;
this.Close();
};
}
public void setData(DataRow row)
{
try
{
this.Cursor = Cursors.WaitCursor;
m_RowStatus = "MOD";
textEdit_CATE_CD.ReadOnly = true;
textEdit_CATE_CD.Text = UtilClass.toStr(row["CATE_CD"]);
textEdit_CATE_CD_NM.Text = UtilClass.toStr(row["CATE_CD_NM"]);
textEdit_PRNNO.Text = UtilClass.toStr(row["PRNNO"]);
this.Cursor = Cursors.Arrow;
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
MessageBox.Show(ex.Message);
}
}
private void saveProc(bool candClose)
{
if (UtilClass.isNull(textEdit_CATE_CD.Text))
{
textEdit_CATE_CD.Focus();
throw new Exception("분류코드를 입력하십시오.");
}
if (UtilClass.isNull(textEdit_CATE_CD_NM.Text))
{
textEdit_CATE_CD_NM.Focus();
throw new Exception("분류명 입력하십시오.");
}
try
{
this.Cursor = Cursors.WaitCursor;
SerializedSqlParam[] aParam = new SerializedSqlParam[] {
ClientClass.CreateSqlParameter("ROW_STATUS", SqlDbType.NVarChar, m_RowStatus),
ClientClass.CreateSqlParameter("CATE_CD", SqlDbType.NVarChar, textEdit_CATE_CD.Text),
ClientClass.CreateSqlParameter("CATE_CD_NM", SqlDbType.NVarChar, textEdit_CATE_CD_NM.Text),
ClientClass.CreateSqlParameter("PRNNO", SqlDbType.Int, UtilClass.toInt(textEdit_PRNNO.Text)),
ClientClass.CreateSqlParameter("RESULT_STR", SqlDbType.NVarChar, "", ParameterDirection.Output, 1000)
};
ResultData result = ClientClass.SetData("SaveCodeCateInfo", aParam);
if (result.isError || !UtilClass.isNull(result.ResultValue))
{
throw new Exception(result.ResultValue);
}
textEdit_CATE_CD.Text = "";
textEdit_CATE_CD_NM.Text = "";
textEdit_PRNNO.Text = "";
if (candClose)
{
this.DialogResult = DialogResult.Yes;
this.Close();
}
this.Cursor = Cursors.Arrow;
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
MessageBox.Show(ex.Message);
}
}
}
}