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 DevExpress.XtraGrid.Views.Grid.ViewInfo;
using PublicLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Windows.Forms;
using System.Xml;
namespace HANMI_SALE
{
partial class CostManagerPopup : XtraForm
{
private string m_Type;
private string m_ROUT_CD;
private string m_ORDER_NO;
private bool m_Change_Date;
private DataTable m_ORDER_M;
private CommonMDI m_Parent;
public CostManagerPopup(CommonMDI parent)
{
InitializeComponent();
m_Parent = parent;
this.Icon = ConstClass._MAIN.Icon;
m_ORDER_M = null;
textEdit_CUST_NM.ImeMode = System.Windows.Forms.ImeMode.Hangul;
textEdit_FILE_NM.ImeMode = System.Windows.Forms.ImeMode.Hangul;
textEdit_ITEM_NM.ImeMode = System.Windows.Forms.ImeMode.Hangul;
textEdit_ORDER_NORM.ImeMode = System.Windows.Forms.ImeMode.Hangul;
m_Type = "I";
m_ROUT_CD = "";
m_ORDER_NO = "";
m_Change_Date = false;
simpleButton_DELETE.Enabled = false;
simpleButton_UPDATE.Enabled = false;
dateEdit_ORDER_DATE.DateTime = DateTime.Now;
DataView orderUnitCD = new DataView(ConstClass._DATA);
orderUnitCD.RowFilter = "CATE_CD = 'C' and GRP_CD = 'C03'";
UtilClass.SetLookup(lookUpEdit_ORDER_UNIT_CD, orderUnitCD, "NO_CD", "NO_CD_NM", true);
getLookup();
simpleButton_Print.Click += (sender, e) =>
{
DataTable aData = gridControl_Main.DataSource as DataTable;
if (m_ORDER_M.Rows.Count <= 0)
{
return;
}
if (aData == null)
{
return;
}
CostInputReport report = new CostInputReport();
report.SetData("원가내역서", m_ORDER_M.Rows[0], aData);
};
simpleButton_COPY.Click += (sender, e) =>
{
if (XtraMessageBox.Show("원가 내용을 견적서로 복사하시겠습니까?", "복사", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes)
{
return;
}
try
{
this.Cursor = Cursors.WaitCursor;
SerializedSqlParam[] aParam = new SerializedSqlParam[]
{
ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),
ClientClass.CreateSqlParameter("COST_NO", SqlDbType.NVarChar, m_ORDER_NO),
ClientClass.CreateSqlParameter("REG_ID", SqlDbType.NVarChar, ConstClass._USR_ID),
ClientClass.CreateSqlParameter("RESULT_STR", SqlDbType.NVarChar, "", ParameterDirection.Output, 1000)
};
ResultData resultData = ClientClass.SetData("CopyInitialToCost", aParam);
if (resultData.isError || !UtilClass.isNull(resultData.ResultValue))
{
throw new Exception(resultData.ResultValue);
}
this.Cursor = Cursors.Arrow;
XtraMessageBox.Show("정상적으로 복사하였습니다.");
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
XtraMessageBox.Show(ex.Message);
}
};
textEdit_LN_RMK.KeyPress += (sender, e) =>
{
if (e.KeyChar == '\r')
{
textEdit_CURR_UNIT_MY.Focus();
//simpleButton_ADD.Focus();
}
};
textEdit_VAT_MY.KeyPress += (sender, e) =>
{
if (e.KeyChar == '\r')
{
if (gridView_Main.RowCount > 0)
{
simpleButton_MOD.Focus();
}
else
{
simpleButton_ADD.Focus();
}
}
};
textEdit_CUST_NM.KeyPress += (sender, e) =>
{
if (e.KeyChar == '\r')
{
selectCustProc();
}
};
dateEdit_ORDER_DATE.EditValueChanged += (sender, e) =>
{
if (m_Type == "M")
{
m_Change_Date = true;
}
};
textEdit_ITEM_NM.KeyPress += (sender, e) =>
{
if (e.KeyChar == '\r')
{
selectItemProc();
}
};
textEdit_ORDER_NORM.KeyPress += (sender, e) =>
{
if (e.KeyChar == '\r')
{
selectNormProc();
}
};
textEdit_CURR_UNIT_MY.EditValueChanged += (sender, e) =>
{
int order_qty = UtilClass.toInt(textEdit_ORDER_QTY.Text);
int curr_unit_my = UtilClass.toInt(textEdit_CURR_UNIT_MY.Text);
int curr_my = order_qty * curr_unit_my;
textEdit_CURR_MY.Text = curr_my.ToString("n0");
textEdit_VAT_MY.Text = Math.Truncate(curr_my * 0.1).ToString("n0");
textEdit_ORDER_MY.Text = Math.Truncate(curr_my * 1.1).ToString("n0");
};
textEdit_CURR_MY.EditValueChanged += (sender, e) =>
{
int curr_my = UtilClass.toInt(textEdit_CURR_MY.Text);
textEdit_VAT_MY.Text = Math.Truncate(curr_my * 0.1).ToString("n0");
textEdit_ORDER_MY.Text = Math.Truncate(curr_my * 1.1).ToString("n0");
};
textEdit_VAT_MY.EditValueChanged += (sender, e) =>
{
int curr_my = UtilClass.toInt(textEdit_CURR_MY.Text);
int vat_my = UtilClass.toInt(textEdit_VAT_MY.Text);
textEdit_ORDER_MY.Text = (curr_my + vat_my).ToString("n0");
};
simpleButton_Cust_Search.Click += (sender, e) =>
{
selectCustProc();
};
simpleButton_ITEM_Search.Click += (sender, e) =>
{
selectItemProc();
};
simpleButton_NORM_Search.Click += (sender, e) =>
{
selectNormProc();
};
textEdit_ORDER_QTY.Properties.Mask.UseMaskAsDisplayFormat = true;
textEdit_CURR_UNIT_MY.Properties.Mask.UseMaskAsDisplayFormat = true;
textEdit_CURR_MY.Properties.Mask.UseMaskAsDisplayFormat = true;
textEdit_VAT_MY.Properties.Mask.UseMaskAsDisplayFormat = true;
textEdit_ORDER_QTY.MouseUp += textEditMouseUp;
textEdit_CURR_UNIT_MY.MouseUp += textEditMouseUp;
textEdit_CURR_MY.MouseUp += textEditMouseUp;
textEdit_VAT_MY.MouseUp += textEditMouseUp;
gridView_Main.FocusedRowChanged += (sender, e) =>
{
DataRow row = gridView_Main.GetFocusedDataRow();
if (row == null)
{
return;
}
textEdit_LN_SEQ.Text = UtilClass.toInt(row["LN_SEQ"]).ToString("00");
textEdit_ITEM_CD.Text = UtilClass.toStr(row["ITEM_CD"]);
textEdit_ITEM_NM.Text = UtilClass.toStr(row["ITEM_NM"]);
textEdit_ORDER_NORM.Text = UtilClass.toStr(row["ORDER_NORM"]);
lookUpEdit_ORDER_UNIT_CD.EditValue = UtilClass.toStr(row["ORDER_UNIT_CD"]);
textEdit_ORDER_QTY.Text = UtilClass.toInt(row["ORDER_QTY"]).ToString("n0");
textEdit_LN_RMK.Text = UtilClass.toStr(row["LN_RMK"]);
textEdit_CURR_UNIT_MY.Text = UtilClass.toInt(row["CURR_UNIT_MY"]).ToString("n0");
textEdit_CURR_MY.Text = UtilClass.toInt(row["CURR_MY"]).ToString("n0");
textEdit_VAT_MY.Text = UtilClass.toInt(row["VAT_MY"]).ToString("n0");
textEdit_ORDER_MY.Text = UtilClass.toInt(row["ORDER_MY"]).ToString("n0");
};
simpleButton_ADD.Click += (sender, e) =>
{
if (UtilClass.isNull(textEdit_ITEM_CD.Text))
{
XtraMessageBox.Show("[필수입력]상품코드를 입력하세요.");
return;
}
DataTable aData = gridControl_Main.DataSource as DataTable;
DataRow row = aData.NewRow();
row["COMP_CD"] = ConstClass._COMP_CD;
row["ORDER_NO"] = textEdit_ORDER_SEQ.Text;
row["LN_SEQ"] = (aData.Rows.Count + 1).ToString("00");
row["ROUT_CD"] = m_ROUT_CD;
row["ITEM_CD"] = textEdit_ITEM_CD.Text;
row["ITEM_NM"] = textEdit_ITEM_NM.Text;
row["ORDER_NORM"] = textEdit_ORDER_NORM.Text;
row["ORDER_UNIT_CD"] = UtilClass.toStr(lookUpEdit_ORDER_UNIT_CD.EditValue);
row["ORDER_UNIT_NM"] = lookUpEdit_ORDER_UNIT_CD.Text;
row["ORDER_QTY"] = UtilClass.toInt(textEdit_ORDER_QTY.Text);
row["CURR_UNIT_MY"] = UtilClass.toInt(textEdit_CURR_UNIT_MY.Text);
row["CURR_MY"] = UtilClass.toInt(textEdit_CURR_MY.Text);
row["VAT_MY"] = UtilClass.toInt(textEdit_VAT_MY.Text);
row["ORDER_MY"] = UtilClass.toInt(textEdit_ORDER_MY.Text);
row["LN_RMK"] = textEdit_LN_RMK.Text;
aData.Rows.Add(row);
};
simpleButton_MOD.Click += (sender, e) =>
{
DataRow row = gridView_Main.GetFocusedDataRow();
if (row == null)
{
return;
}
row["ROUT_CD"] = m_ROUT_CD;
row["ITEM_CD"] = textEdit_ITEM_CD.Text;
row["ITEM_NM"] = textEdit_ITEM_NM.Text;
row["ORDER_NORM"] = textEdit_ORDER_NORM.Text;
row["ORDER_UNIT_CD"] = UtilClass.toStr(lookUpEdit_ORDER_UNIT_CD.EditValue);
row["ORDER_UNIT_NM"] = lookUpEdit_ORDER_UNIT_CD.Text;
row["ORDER_QTY"] = UtilClass.toInt(textEdit_ORDER_QTY.Text);
row["CURR_UNIT_MY"] = UtilClass.toInt(textEdit_CURR_UNIT_MY.Text);
row["CURR_MY"] = UtilClass.toInt(textEdit_CURR_MY.Text);
row["VAT_MY"] = UtilClass.toInt(textEdit_VAT_MY.Text);
row["ORDER_MY"] = UtilClass.toInt(textEdit_ORDER_MY.Text);
row["LN_RMK"] = textEdit_LN_RMK.Text;
};
simpleButton_DEL.Click += (sender, e) =>
{
DataRow row = gridView_Main.GetFocusedDataRow();
if (row == null)
{
return;
}
if (XtraMessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes)
{
return;
}
row.Delete();
};
simpleButton_CLEAR.Click += (sender, e) =>
{
m_ROUT_CD = "";
textEdit_ITEM_CD.Text = "";
textEdit_ITEM_NM.Text = "";
textEdit_ORDER_NORM.Text = "";
lookUpEdit_ORDER_UNIT_CD.EditValue = "01";
textEdit_ORDER_QTY.Text = "0";
textEdit_LN_RMK.Text = "";
textEdit_CURR_UNIT_MY.Text = "0";
textEdit_CURR_MY.Text = "0";
textEdit_VAT_MY.Text = "0";
textEdit_ORDER_MY.Text = "0";
};
simpleButton_CLOSE.Click += (sender, e) =>
{
this.Close();
m_Parent.searchProc();
};
simpleButton_CANCEL.Click += (sender, e) =>
{
textEdit_ORDER_SEQ.Text = "";
textEdit_LN_SEQ.Text = "";
textEdit_CUST_NM.Text = "";
textEdit_CUST_CD.Text = "";
textEdit_FILE_NM.Text = "";
};
simpleButton_INPUT.Click += (sender, e) =>
{
m_Type = "I";
string order_seq = getMaxOrderno();
if (XtraMessageBox.Show("[" + order_seq +"] 작업을 등록하시겠습니까?", "등록", MessageBoxButtons.YesNo, MessageBoxIcon.Information) != DialogResult.Yes)
{
return;
}
saveProc();
};
simpleButton_UPDATE.Click += (sender, e) =>
{
m_Type = "M";
string order_seq = "";
if (m_Change_Date)
{
order_seq = getMaxOrderno();
}
else
{
order_seq = textEdit_ORDER_SEQ.Text;
}
if (XtraMessageBox.Show("[" + order_seq + "] 번호 자료를 수정하시겠습니까?", "등록", MessageBoxButtons.YesNo, MessageBoxIcon.Information) != DialogResult.Yes)
{
return;
}
updateProc();
};
simpleButton_DELETE.Click += (sender, e) =>
{
if (XtraMessageBox.Show("[" + textEdit_ORDER_SEQ.Text + "] 번호 자료를 삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes)
{
return;
}
deleteProc();
};
this.FormClosed += (sender, e) =>
{
bool isFind = false;
for (int i = 0; i < Application.OpenForms.Count; i++)
{
if (Application.OpenForms[i] is CostManagerPopup)
{
isFind = true;
Application.OpenForms[i].BringToFront();
Application.OpenForms[i].Focus();
(Application.OpenForms[i] as CostManagerPopup).textEdit_CUST_NM.Focus();
break;
}
}
if (!isFind)
{
if (m_Parent != null)
{
m_Parent.Activate();
m_Parent.Focus();
(m_Parent as CostManager).textEdit_CUST_NM.Focus();
}
}
};
this.Shown += (sender, e) =>
{
m_Change_Date = false;
searchProc();
};
}
private void textEditMouseUp(object sender, MouseEventArgs e)
{
TextEdit edit = sender as TextEdit;
BeginInvoke(new Action(() => edit.SelectAll()));
}
private void getLookup()
{
}
private string getMaxOrderno()
{
try
{
SerializedSqlParam[] aParam = new SerializedSqlParam[]
{
ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),
ClientClass.CreateSqlParameter("ORDER_DT", SqlDbType.NVarChar, dateEdit_ORDER_DATE.DateTime.ToString("yyyy.MM.dd")),
ClientClass.CreateSqlParameter("RESULT_STR", SqlDbType.NVarChar, "", ParameterDirection.Output, 1000)
};
ResultData resultData = ClientClass.GetData("GetMaxCostno", aParam);
if (resultData.isError)
{
throw new Exception(resultData.ResultValue);
}
string returnvalue = "";
if (resultData.TableData.Rows.Count > 0)
{
returnvalue = UtilClass.toStr(resultData.TableData.Rows[0]["ORDER_SEQ"]);
}
else
{
returnvalue = "0000";
}
return returnvalue;
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
XtraMessageBox.Show(ex.Message);
return "0000";
}
}
private void selectCustProc()
{
SelectCustomerForm form = new SelectCustomerForm(textEdit_CUST_NM.Text);
form.TopMost = true;
if (form.ShowDialog() != System.Windows.Forms.DialogResult.Yes)
{
return;
}
textEdit_CUST_NM.Text = form.m_CUST_NN;
textEdit_CUST_CD.Text = form.m_CUST_CD;
textEdit_TEL_NO.Text = form.m_TEL_NO;
textEdit_OWNER_TEL_NO.Text = form.m_OWNER_TEL_NO;
textEdit_MGR_TEL_NO.Text = form.m_MGR_TEL_NO;
}
private void selectItemProc()
{
SelectItemForm form = new SelectItemForm(textEdit_ITEM_NM.Text);
form.TopMost = true;
if (form.ShowDialog() != System.Windows.Forms.DialogResult.Yes)
{
return;
}
m_ROUT_CD = form.m_ROUT_CD;
textEdit_ITEM_CD.Text = form.m_ITEM_CD;
textEdit_ITEM_NM.Text = form.m_ITEM_NM;
textEdit_ORDER_NORM.Focus();
}
private void selectNormProc()
{
SelectNormForm form = new SelectNormForm(textEdit_ITEM_CD.Text);
form.TopMost = true;
if (form.ShowDialog() != System.Windows.Forms.DialogResult.Yes)
{
return;
}
textEdit_ORDER_NORM.Text = form.m_NORM;
textEdit_ORDER_QTY.Focus();
}
public string initProc(string order_no)
{
string result = "";
try
{
SerializedSqlParam[] aParam = new SerializedSqlParam[]
{
ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),
ClientClass.CreateSqlParameter("ORDER_NO", SqlDbType.NVarChar, order_no)
};
ResultData resultData = ClientClass.GetData("GetCostManagerPopup", aParam);
if (resultData.isError)
{
throw new Exception(resultData.ResultValue);
}
if (resultData.DataList.Tables[0].Rows.Count > 0)
{
m_Type = "M";
simpleButton_INPUT.Enabled = true;
simpleButton_DELETE.Enabled = true;
simpleButton_UPDATE.Enabled = true;
m_ORDER_M = resultData.DataList.Tables[0];
DataRow row = resultData.DataList.Tables[0].Rows[0];
m_ORDER_NO = UtilClass.toStr(row["ORDER_NO"]);
dateEdit_ORDER_DATE.Text = UtilClass.toStr(row["ORDER_DATE"]);
textEdit_ORDER_SEQ.Text = UtilClass.toInt(row["ORDER_SEQ"]).ToString("0000");
textEdit_CUST_NM.Text = UtilClass.toStr(row["CUST_NM"]);
textEdit_CUST_CD.Text = UtilClass.toStr(row["CUST_CD"]);
textEdit_FILE_NM.Text = UtilClass.toStr(row["FILE_NM"]);
textEdit_TEL_NO.Text = UtilClass.toStr(row["TEL_NO"]);
textEdit_OWNER_TEL_NO.Text = UtilClass.toStr(row["OWNER_TEL_NO"]);
textEdit_MGR_TEL_NO.Text = UtilClass.toStr(row["MGR_TEL_NO"]);
textEdit_COST_UNIT_MY.Text = UtilClass.toInt(row["COST_UNIT_MY"]).ToString("n0");
textEdit_COST_MY.Text = UtilClass.toInt(row["COST_MY"]).ToString("n0");
}
gridControl_Main.DataSource = resultData.DataList.Tables[1];
}
catch (Exception ex)
{
result = ex.Message;
}
return result;
}
private void searchProc()
{
try
{
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
XtraMessageBox.Show(ex.Message);
}
}
private void saveProc()
{
try
{
this.Cursor = Cursors.WaitCursor;
gridView_Main.PostEditor();
gridView_Main.UpdateCurrentRow();
Application.DoEvents();
if (UtilClass.isNull(dateEdit_ORDER_DATE.EditValue))
{
dateEdit_ORDER_DATE.Focus();
throw new Exception("작성일을 선택하십시오.");
}
if (UtilClass.isNull(textEdit_CUST_CD.EditValue))
{
textEdit_FILE_NM.Focus();
throw new Exception("거래선이 등록되어있지 않습니다.");
}
if (UtilClass.isNull(textEdit_FILE_NM.EditValue))
{
textEdit_FILE_NM.Focus();
throw new Exception("파일이름을 입력하십시오.");
}
DataTable aData = gridControl_Main.DataSource as DataTable;
foreach(DataRow inrow in aData.Rows)
{
if (inrow.RowState == DataRowState.Deleted)
{
continue;
}
inrow["REG_ID"] = "MOD";
}
DataTable dtData = UtilClass.GetDataTable(aData, true,
"LN_SEQ", "ROUT_CD", "ITEM_CD", "ORDER_NORM", "ORDER_UNIT_CD",
"ORDER_QTY", "CURR_UNIT_MY", "CURR_MY", "VAT_MY", "ORDER_MY", "LN_RMK"
);
if (dtData.Rows.Count < 1 && m_Type == "I")
{
throw new Exception("작업내역이 없습니다. 작업명을 추가하세요.");
}
dtData.TableName = "ADATA";
ResultData data1 = new ResultData();
data1.TableData = dtData;
ResultData[] dataList = new ResultData[] { data1 };
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("ORDER_DATE", SqlDbType.NVarChar, dateEdit_ORDER_DATE.DateTime.ToString("yyyy-MM-dd")),
ClientClass.CreateSqlParameter("FILE_NM", SqlDbType.NVarChar, textEdit_FILE_NM.Text),
ClientClass.CreateSqlParameter("COST_UNIT_MY", SqlDbType.Int, UtilClass.toInt(textEdit_COST_UNIT_MY.Text)),
ClientClass.CreateSqlParameter("COST_MY", SqlDbType.Int, UtilClass.toInt(textEdit_COST_MY.Text)),
ClientClass.CreateSqlParameter("REG_ID", SqlDbType.NVarChar, ConstClass._USR_ID)
};
ResultData resultData = ClientClass.SetTableData("SaveCostManagerPopup", dataList, aParam);
if (resultData.isError)
{
throw new Exception(resultData.ResultValue);
}
this.Cursor = Cursors.Arrow;
this.Close();
m_Parent.searchProc();
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
XtraMessageBox.Show(ex.Message);
}
}
private void updateProc()
{
try
{
this.Cursor = Cursors.WaitCursor;
gridView_Main.PostEditor();
gridView_Main.UpdateCurrentRow();
Application.DoEvents();
if (UtilClass.isNull(dateEdit_ORDER_DATE.EditValue))
{
dateEdit_ORDER_DATE.Focus();
throw new Exception("작성일을 선택하십시오.");
}
if (UtilClass.isNull(textEdit_CUST_CD.EditValue))
{
textEdit_FILE_NM.Focus();
throw new Exception("거래선이 등록되어있지 않습니다.");
}
if (UtilClass.isNull(textEdit_FILE_NM.EditValue))
{
textEdit_FILE_NM.Focus();
throw new Exception("파일이름을 입력하십시오.");
}
DataTable aData = gridControl_Main.DataSource as DataTable;
DataTable dtData = UtilClass.GetDataTable(aData, true,
"LN_SEQ", "ROUT_CD", "ITEM_CD", "ORDER_NORM", "ORDER_UNIT_CD",
"ORDER_QTY", "CURR_UNIT_MY", "CURR_MY", "VAT_MY", "ORDER_MY", "LN_RMK"
);
dtData.TableName = "ADATA";
ResultData data1 = new ResultData();
data1.TableData = dtData;
ResultData[] dataList = new ResultData[] { data1 };
SerializedSqlParam[] aParam = new SerializedSqlParam[]
{
ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),
ClientClass.CreateSqlParameter("ORDER_NO", SqlDbType.NVarChar, m_ORDER_NO),
ClientClass.CreateSqlParameter("CUST_CD", SqlDbType.NVarChar, textEdit_CUST_CD.Text),
ClientClass.CreateSqlParameter("ORDER_DT", SqlDbType.NVarChar, dateEdit_ORDER_DATE.DateTime.ToString("yyyy.MM.dd")),
ClientClass.CreateSqlParameter("FILE_NM", SqlDbType.NVarChar, textEdit_FILE_NM.Text),
ClientClass.CreateSqlParameter("COST_UNIT_MY", SqlDbType.Int, UtilClass.toInt(textEdit_COST_UNIT_MY.Text)),
ClientClass.CreateSqlParameter("COST_MY", SqlDbType.Int, UtilClass.toInt(textEdit_COST_MY.Text)),
ClientClass.CreateSqlParameter("REG_ID", SqlDbType.NVarChar, ConstClass._USR_ID)
};
ResultData resultData = ClientClass.SetTableData("UpdateCostManagerPopup", dataList, aParam);
if (resultData.isError)
{
throw new Exception(resultData.ResultValue);
}
this.Cursor = Cursors.Arrow;
this.Close();
m_Parent.searchProc();
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
XtraMessageBox.Show(ex.Message);
}
}
private void deleteProc()
{
try
{
this.Cursor = Cursors.WaitCursor;
gridView_Main.PostEditor();
gridView_Main.UpdateCurrentRow();
Application.DoEvents();
SerializedSqlParam[] aParam = new SerializedSqlParam[]
{
ClientClass.CreateSqlParameter("COMP_CD", SqlDbType.NVarChar, ConstClass._COMP_CD),
ClientClass.CreateSqlParameter("ORDER_NO", SqlDbType.NVarChar, m_ORDER_NO),
ClientClass.CreateSqlParameter("RESULT_STR", SqlDbType.NVarChar, "", ParameterDirection.Output, 1000)
};
ResultData resultData = ClientClass.SetData("DeleteCostManager", aParam);
if (resultData.isError)
{
throw new Exception(resultData.ResultValue);
}
if (!UtilClass.isNull(resultData.ResultValue))
{
throw new Exception(resultData.ResultValue);
}
this.Cursor = Cursors.Arrow;
this.Close();
m_Parent.searchProc();
}
catch (Exception ex)
{
this.Cursor = Cursors.Arrow;
XtraMessageBox.Show(ex.Message);
}
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == (Keys.P | Keys.Alt))
{
return true;
}
else if (keyData == (Keys.A | Keys.Alt))
{
simpleButton_CANCEL.PerformClick();
return true;
}
else if (keyData == (Keys.I | Keys.Alt))
{
simpleButton_INPUT.PerformClick();
return true;
}
else if (keyData == (Keys.M | Keys.Alt))
{
simpleButton_UPDATE.PerformClick();
return true;
}
else if (keyData == (Keys.D | Keys.Alt))
{
simpleButton_DELETE.PerformClick();
return true;
}
else if (keyData == (Keys.X | Keys.Alt))
{
simpleButton_CLOSE.PerformClick();
return true;
}
else if (keyData == (Keys.F5))
{
simpleButton_ADD.PerformClick();
return true;
}
else if (keyData == (Keys.F6))
{
simpleButton_MOD.PerformClick();
return true;
}
else if (keyData == (Keys.F7))
{
simpleButton_DEL.PerformClick();
return true;
}
else if (keyData == (Keys.F8))
{
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
}