private void btnSearch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_IssueSearch_SELECT"; dbA.Procedure.ParamAdd("@From", dtFrom.DateTime.ToString("yyyyMMdd")); dbA.Procedure.ParamAdd("@To", dtTo.DateTime.ToString("yyyyMMdd")); dbA.Procedure.ParamAdd("@CustCode", ctiCustInfo.CustCode); dbA.Procedure.ParamAdd("@DeptCode", _strDeptCode); dbA.Procedure.ParamAdd("@UserId", _strUserID); Cesco.FW.Global.DBAdapter.Utils.DebugingTools debug = new Cesco.FW.Global.DBAdapter.Utils.DebugingTools(); string sqlQuery = debug.GetExcuteSqlString(dbA.Procedure); DataSet ds = dbA.ProcedureToDataSetCompress(); if (ds.Tables[0].Rows.Count > 0) { grd이슈.DataSource = ds.Tables[0]; } else { grd이슈.DataSource = null; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void getSmall() { if (gv_Medium.GetFocusedRowCellValue(col중분류VOCID.FieldName) == null) { gc_Small.DataSource = null; return; } else { gc_Small.DataSource = null; Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_CATEGORY_SMALL_SELECT"; dbA.Procedure.ParamAdd("@SMALLPID", gv_Medium.GetFocusedRowCellValue(col중분류VOCID.FieldName).ToString()); DataSet ds = dbA.ProcedureToDataSetCompress(); if (ds == null || ds.Tables[0].Rows.Count < 1) { text_M_vocid.Text = ""; text_M_Name.Text = ""; return; } gc_Small.DataSource = ds.Tables[0]; } }
private void GetHistroy() { try { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_Get고객요청HIS"; dbA.Procedure.ParamAdd("@클레임번호", teCate_ClaimNum.Text); Cesco.FW.Global.DBAdapter.Utils.DebugingTools debug = new Cesco.FW.Global.DBAdapter.Utils.DebugingTools(); string sqlQuery = debug.GetExcuteSqlString(dbA.Procedure); DataSet ds = dbA.ProcedureToDataSetCompress(); if (ds.Tables[0].Rows.Count > 0) { grd이력.DataSource = ds.Tables[0]; } else { grd이력.DataSource = null; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void getMedium() { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_CATEGORY_MEDIUM_SELECT"; dbA.Procedure.ParamAdd("@MIDIUMPID", gv_Large.GetFocusedRowCellValue(col대분류VOCID.FieldName).ToString()); DataSet ds = dbA.ProcedureToDataSetCompress(); if (ds == null || ds.Tables[0].Rows.Count < 1) { gc_Medium.DataSource = null; gc_Small.DataSource = null; text_M_Code.Text = ""; text_M_MediumName.Text = ""; text_M_vocid.Text = ""; text_M_Name.Text = ""; lueEquip.EditValue = ""; lueBugs.EditValue = ""; //te_EquipCD.Text = ""; return; } gc_Medium.DataSource = null; gc_Small.DataSource = null; gc_Medium.DataSource = ds.Tables[0]; }
private void getLarge() { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_CATEGORY_LARGE_SELECT"; DataSet ds = dbA.ProcedureToDataSetCompress(); if (ds == null || ds.Tables[0].Rows.Count < 1) { return; } gc_Large.DataSource = ds.Tables[0]; }
private void SNew() { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_SCODE_SELECT"; DataSet ds = dbA.ProcedureToDataSetCompress(); text_S_Code.Text = ds.Tables[0].Rows[0]["VOCID"].ToString(); text_S_SmallName.Text = ""; rdio_S_Usegubun.EditValue = "Y"; sp_S_Num.EditValue = "0"; lu_S_GubunCode.EditValue = "BM01"; lueBugs_S.EditValue = ""; }
private void LNew() { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_LCODE_SELECT"; DataSet ds = dbA.ProcedureToDataSetCompress(); text_L_Code.Text = ds.Tables[0].Rows[0]["VOCID"].ToString(); sp_L_Num.EditValue = "0"; text_L_LargeName.Text = ""; rdio_L_Usegubun.EditValue = "Y"; lu_M_Multi.EditValue = ""; //text_L_Code.Text = ""; }
private void SmallEssen() { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); try { dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_SMALLESSEN_SELECT"; lu_S_Essen.Properties.ValueMember = "코드구분"; lu_S_Essen.Properties.DisplayMember = "코드명"; DataSet ds = dbA.ProcedureToDataSetCompress(); lu_S_Essen.Properties.DataSource = ds.Tables[0]; } catch (Exception ex) { XtraMessageBox.Show(ex.ToString()); } }
private void LSave() { string strLCode = text_L_Code.Text; try { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_LARGE_INSERT_NEW"; dbA.Procedure.ParamAdd("@VOCID", text_L_Code.Text); dbA.Procedure.ParamAdd("@ORDERNO", sp_L_Num.EditValue); dbA.Procedure.ParamAdd("@VOCNAME", text_L_LargeName.Text); dbA.Procedure.ParamAdd("@USEYN", rdio_L_Usegubun.EditValue); dbA.Procedure.ParamAdd("@MULTIYN", lu_M_Multi.EditValue); dbA.Procedure.ParamAdd("@PROBLEMYN", chkProb_LVOC.Checked ? "Y" : "N"); dbA.Procedure.ParamAdd("@PROBLEMLV", lue_L_ProblemLv.EditValue == null ? "" : lue_L_ProblemLv.EditValue.ToString()); dbA.Procedure.ParamAdd("@MAINORDER", sp_L_Main.EditValue); dbA.Procedure.ParamAdd("@REGID", _strUserID); dbA.Procedure.ParamAdd("@KINDGB", lu_L_Kind.EditValue == null ? "" : lu_L_Kind.EditValue.ToString()); DataSet ds = dbA.ProcedureToDataSetCompress(); MessageBox.Show("저장 완료하였습니다.", "저장 완료", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message); } LRefresh(); LNew(); //저장된 행 선택되어 있도록 ColumnView view = (ColumnView)gc_Large.FocusedView; GridColumn column = view.Columns["대분류VOCID"]; if (column != null) { int rhFound = view.LocateByValue(0, column, strLCode); if (rhFound != GridControl.InvalidRowHandle) { view.FocusedRowHandle = rhFound; } } gv_Large_FocusedRowChanged(null, null); }
/// <summary> /// 조회 버튼 클릭 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSearch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Cesco.FW.Global.DBAdapter.DBAdapters db = new Cesco.FW.Global.DBAdapter.DBAdapters(strUserID, System.Reflection.MethodBase.GetCurrentMethod()); db.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_STATELIST_SELECT"; db.Procedure.ParamAdd("@RecvStartDate", deStart_Date.Text.Replace("-", "").Replace("-", "")); db.Procedure.ParamAdd("@RecvEndDate", deEnd_Date.Text.Replace("-", "").Replace("-", "")); db.Procedure.ParamAdd("@DeptCode", luePro_Dept.EditValue == null ? "" : luePro_Dept.EditValue); db.Procedure.ParamAdd("@UserID", luePro_User.EditValue == null ? "" : luePro_User.EditValue); db.Procedure.ParamAdd("@Industry", lueWork_Gubun.EditValue == null ? "" : lueWork_Gubun.EditValue); db.Procedure.ParamAdd("@DeptCode_Login", strDeptCode); db.Procedure.ParamAdd("@Category", lue_BigCate.EditValue == null ? "" : lue_BigCate.EditValue); db.Procedure.ParamAdd("@DelayTime", lueDelayTime.EditValue == null ? "" : lueDelayTime.EditValue); try { this.Cursor = Cursors.WaitCursor; DateTime de = DateTime.Now; DataSet ds = db.ProcedureToDataSetCompress(); DateTime de1 = DateTime.Now; //ds.Tables[0].Rows.Count(); this.Cursor = Cursors.Default; MessageBox.Show(de.TimeOfDay.ToString() + "/" + de1.TimeOfDay.ToString() + "/" + ds.Tables[1].Rows[0][1].ToString()); if (ds == null || ds.Tables.Count < 1 || ds.Tables[0].Rows.Count == 0) { //XtraMessageBox.Show("조회할 항목이 없습니다."); return; } dt_Work = ds.Tables[0]; gcStateList.DataSource = ds.Tables[0]; } catch (Cesco.FW.Global.DBAdapter.WcfException ex) { MessageBox.Show(ex.Message, "DB 에러"); } catch (Exception ex) { MessageBox.Show(ex.Message, "처리되지 않은 에러"); } }
private void btnSearch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_CurrentState_SELECT_MULTI"; //SP_VOC_CurrentState_SELECT_MULTI 다중처리자 적용 프로시저 dbA.Procedure.ParamAdd("@From", dtFrom.DateTime.ToString("yyyyMMdd")); dbA.Procedure.ParamAdd("@To", dtTo.DateTime.ToString("yyyyMMdd")); dbA.Procedure.ParamAdd("@DeptCode", luePro_Dept.EditValue.ToString()); dbA.Procedure.ParamAdd("@UserID", luePro_User.EditValue.ToString()); dbA.Procedure.ParamAdd("@PartCode", luePro_Part.EditValue == null ? "" : luePro_Part.EditValue.ToString()); Cesco.FW.Global.DBAdapter.Utils.DebugingTools debug = new Cesco.FW.Global.DBAdapter.Utils.DebugingTools(); string sqlQuery = debug.GetExcuteSqlString(dbA.Procedure); this.Cursor = Cursors.WaitCursor; DataSet ds = dbA.ProcedureToDataSetCompress(); if (ds.Tables[0].Rows.Count > 0) { pv현황.RefreshData(); pv현황.DataSource = null; pv현황.DataSource = ds.Tables[0]; this.Cursor = Cursors.Default; } else { pv현황.RefreshData(); pv현황.DataSource = null; this.Cursor = Cursors.Default; } } catch (Exception ex) { this.Cursor = Cursors.Default; MessageBox.Show(ex.ToString()); } }
public VOC_VoluntaryReport(string pUserID, string pCustCode, string pClaimNum) { InitializeComponent(); _strUserID = pUserID; _CustCode = pCustCode; _ClaimNum = pClaimNum; Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_VoluntaryReport_SELECT"; dbA.Procedure.ParamAdd("@CustCode", _CustCode); dbA.Procedure.ParamAdd("@CLAIMNUM", _ClaimNum); Cesco.FW.Global.DBAdapter.Utils.DebugingTools debug = new Cesco.FW.Global.DBAdapter.Utils.DebugingTools(); string sqlQuery = debug.GetExcuteSqlString(dbA.Procedure); DataSet ds = dbA.ProcedureToDataSetCompress(); if (ds.Tables[0].Rows.Count > 0) { dt = ds.Tables[0]; txt고객코드.Text = ds.Tables[0].Rows[0]["CUSTCODE"].ToString(); txt대분류.Text = ds.Tables[0].Rows[0]["대분류"].ToString(); txt중분류.Text = ds.Tables[0].Rows[0]["중분류"].ToString(); txt클레임번호.Text = ds.Tables[0].Rows[0]["CLAIMNUM"].ToString(); } else { MessageBox.Show("Before Voice 건이 없습니다.", "확인", MessageBoxButtons.OK, MessageBoxIcon.Information); strYN = "N"; //this.Close(); //grd자진신고.DataSource = null; //strYN = "N"; } }
private void SSave() { if (text_S_Code.Text.Equals("")) { MessageBox.Show("소분류의 신규 버튼을 눌러주세요.", "저장 실패", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } string strLCode = text_L_Code.Text; string strMCode = text_M_Code.Text; string strSCode = text_S_Code.Text; try { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_SMALL_INSERT_NEW"; dbA.Procedure.ParamAdd("@VOCID", text_S_Code.Text); dbA.Procedure.ParamAdd("@PARENTID", text_M_Code.Text); dbA.Procedure.ParamAdd("@VOCNAME", text_S_SmallName.Text); dbA.Procedure.ParamAdd("@USEYN", rdio_S_Usegubun.EditValue); dbA.Procedure.ParamAdd("@ORDERNO", sp_S_Num.EditValue); dbA.Procedure.ParamAdd("@PROBLEMYN", chkProb_SVOC.Checked ? "Y" : "N"); dbA.Procedure.ParamAdd("@PROBLEMLV", lue_S_ProblemLv.EditValue == null ? "" : lue_S_ProblemLv.EditValue.ToString()); dbA.Procedure.ParamAdd("@TYPECODE", lu_S_GubunCode.EditValue == null ? "" : lu_S_GubunCode.EditValue.ToString()); dbA.Procedure.ParamAdd("@REGID", _strUserID); dbA.Procedure.ParamAdd("@KINDGB", lu_S_Kind.EditValue == null ? "" : lu_S_Kind.EditValue.ToString()); DataSet ds = dbA.ProcedureToDataSetCompress(); MessageBox.Show("저장 완료하였습니다.", "저장 완료", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message); } MRefresh(); SRefresh(); SNew(); //저장된 행 선택되어 있도록 ColumnView view = (ColumnView)gc_Large.FocusedView; GridColumn column = view.Columns["대분류VOCID"]; if (column != null) { int rhFound = view.LocateByValue(0, column, strLCode); if (rhFound != GridControl.InvalidRowHandle) { view.FocusedRowHandle = rhFound; } } ColumnView view2 = (ColumnView)gc_Medium.FocusedView; GridColumn column2 = view2.Columns["중분류VOCID"]; if (column2 != null) { int rhFound = view2.LocateByValue(0, column2, strMCode); if (rhFound != GridControl.InvalidRowHandle) { view2.FocusedRowHandle = rhFound; } } ColumnView view3 = (ColumnView)gc_Small.FocusedView; GridColumn column3 = view3.Columns["소분류VOCID"]; if (column3 != null) { int rhFound = view3.LocateByValue(0, column3, strSCode); if (rhFound != GridControl.InvalidRowHandle) { view3.FocusedRowHandle = rhFound; } } //gv_Large_FocusedRowChanged(null, null); //gv_Medium_FocusedRowChanged(null, null); //gv_Small_FocusedRowChanged(null, null); }
private void MSave() { if (text_M_Code.Text.Equals("")) { MessageBox.Show("중분류의 신규 버튼을 눌러주세요.", "저장 실패", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } //if (te_EquipCD.Text.Equals("") && gv_Large.GetFocusedRowCellValue("대분류VOCID").ToString() == "Q") //{ // MessageBox.Show("장비코드를 입력해주세요.", "저장 실패", MessageBoxButtons.OK, MessageBoxIcon.Error); // return; //} if (lueEquip.EditValue.ToString().Equals("") && gv_Large.GetFocusedRowCellValue("대분류VOCID").ToString() == "Q") { MessageBox.Show("장비코드를 입력해주세요.", "저장 실패", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } string strLCode = text_L_Code.Text; string strMCode = text_M_Code.Text; try { Cesco.FW.Global.DBAdapter.DBAdapters dbA = new Cesco.FW.Global.DBAdapter.DBAdapters(); dbA.LocalInfo = new Cesco.FW.Global.DBAdapter.LocalInfo(_strUserID, System.Reflection.MethodBase.GetCurrentMethod()); dbA.Procedure.ProcedureName = "CESCOEIS.dbo.SP_VOC_MEDIUM_INSERT_NEW"; dbA.Procedure.ParamAdd("@VOCID", text_M_Code.Text); dbA.Procedure.ParamAdd("@PARENTID", text_L_vocid.Text); dbA.Procedure.ParamAdd("@VOCNAME", text_M_MediumName.Text); dbA.Procedure.ParamAdd("@MULTIYN", lu_M_Multi.EditValue); dbA.Procedure.ParamAdd("@USEYN", rdio_M_Usegubun.EditValue); dbA.Procedure.ParamAdd("@ORDERNO", sp_M_Num.EditValue); dbA.Procedure.ParamAdd("@SUBCLASSESSEN", lu_S_Essen.EditValue); dbA.Procedure.ParamAdd("@PROBLEMYN", chkProb_MVOC.Checked ? "Y" : "N"); dbA.Procedure.ParamAdd("@PROBLEMLV", lue_M_ProblemLv.EditValue == null ? "" : lue_M_ProblemLv.EditValue.ToString()); dbA.Procedure.ParamAdd("@EQUICODE", lueEquip.EditValue == null ? "" : lueEquip.EditValue.ToString()); dbA.Procedure.ParamAdd("@TYPECODE", lu_M_GubunCode.EditValue); dbA.Procedure.ParamAdd("@REGID", _strUserID); dbA.Procedure.ParamAdd("@KINDGB", lu_M_Kind.EditValue == null ? "" : lu_M_Kind.EditValue.ToString()); dbA.Procedure.ParamAdd("@BUGCODE", lueBugs.EditValue == null ? "" : lueBugs.EditValue.ToString()); DataSet ds = dbA.ProcedureToDataSetCompress(); MessageBox.Show("저장 완료하였습니다.", "저장 완료", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message); } MRefresh(); MNew(); //저장된 행 선택되어 있도록 ColumnView view = (ColumnView)gc_Large.FocusedView; GridColumn column = view.Columns["대분류VOCID"]; if (column != null) { int rhFound = view.LocateByValue(0, column, strLCode); if (rhFound != GridControl.InvalidRowHandle) { view.FocusedRowHandle = rhFound; } } ColumnView view2 = (ColumnView)gc_Medium.FocusedView; GridColumn column2 = view2.Columns["중분류VOCID"]; if (column2 != null) { int rhFound = view2.LocateByValue(0, column2, strMCode); if (rhFound != GridControl.InvalidRowHandle) { view2.FocusedRowHandle = rhFound; } } }