/// <summary> /// 컨트롤을 셋팅합니다. /// </summary> private void SetCtlInitialize() { try { dtReference.Columns.Add("BIZ_CODE"); dtReference.Columns.Add("VALUE_LIST"); dtReference.Columns.Add("VALUE_NAME"); this.pnlPrintDriver.Enabled = false; this.pnlSerial.Enabled = false; cboComPrintMachine.Enabled = false; //영업장설정 Cls.Common.LookUp.SetFillCode(this.lupFacility, Basic.GetdtSelect(BizCommon.Parm.mDataTable.dtJaa010ms, " USE_YN = 'Y' AND FACILITY_TYPE = '20'", "FACILITY_CODE"), "FACILITY_NAME", "FACILITY_CODE", LookUp.CaptoinStyle.SelectText); DataTable dtPort = new DataTable(); dtPort.Columns.Add("PORT"); dtPort.Columns.Add("PORT_NAME"); DataTable dtPrint = new DataTable(); dtPrint.Columns.Add("PRINT"); dtPrint.Columns.Add("PRINT_NAME"); //사용가능한 시리얼포트를 가져온다. string[] strPort = System.IO.Ports.SerialPort.GetPortNames(); if (strPort != null) { for (int i = 0; i < strPort.Length; i++) { dtPort.Rows.Add(new object[] { strPort[i], strPort[i] }); } } //프린터가져오기 for (int p = 0; p < System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count; p++) { string printer = System.Drawing.Printing.PrinterSettings.InstalledPrinters[p]; dtPrint.Rows.Add(new object[] { printer, printer }); } //////////////////////////////////////////////////////////////////////////////////////////////////// //영수증프린터를 설정합니다. //////////////////////////////////////////////////////////////////////////////////////////////////// //드라이버 Cls.Common.CboBox.FillComboBoxDataTable(cboPrintTSP800, dtPrint, "PRINT_NAME", "PRINT", "선택하세요"); cboPrintTSP800.SelectedIndex = 0; //시리얼 Cls.Common.CboBox.FillComboBoxDataTable(cboComPort, dtPort, "PORT_NAME", "PORT", "선택하세요"); cboComPort.SelectedIndex = 0; Cls.Common.CboBox.FillComboBoxDataTable(cboComBoundRate, RS232Info.GetBaundRate(), "TXT", "VAL", "선택하세요"); cboComBoundRate.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndexRemain(cboComBoundRate, "9600"); Cls.Common.CboBox.FillComboBoxDataTable(cboComDataBit, RS232Info.GetDataBit(), "TXT", "VAL", "선택하세요"); cboComDataBit.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndexRemain(cboComDataBit, "8"); Cls.Common.CboBox.FillComboBoxDataTable(cboComParity, RS232Info.GetParity(), "TXT", "VAL", "없음"); cboComParity.SelectedIndex = 0; Cls.Common.CboBox.FillComboBoxDataTable(cboComStopBit, RS232Info.GetStopBit(), "TXT", "VAL", "선택하세요"); cboComStopBit.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndexRemain(cboComStopBit, "1"); DataTable dtmachine = new DataTable(); dtmachine.Columns.Add("TXT"); dtmachine.Columns.Add("VAL"); dtmachine.Rows.Add(new object[] { "", "NONE" }); dtmachine.Rows.Add(new object[] { "LUKHAN", "LUKHAN" }); //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //싸인패드설정 Cls.Common.CboBox.FillComboBoxDataTable(cboSignPort, dtPort, "PORT_NAME", "PORT", "선택하세요"); cboSignPort.SelectedIndex = 0; DataTable dtSignPad = new DataTable(); dtSignPad.Columns.Add("VAL"); dtSignPad.Columns.Add("TXT"); dtSignPad.Rows.Add(new object[] { "EP791R", "EP-791R" }); dtSignPad.Rows.Add(new object[] { "KSP100S", "KSP-100S" }); dtSignPad.Rows.Add(new object[] { "KISSP30", "KIS-SP30" }); Cls.Common.CboBox.FillComboBoxDataTable(cboSignPad, dtSignPad, "TXT", "VAL", "선택하세요"); cboSignPad.SelectedIndex = 0; DataTable dtprintstyle = new DataTable(); dtprintstyle.Columns.Add("VAL"); dtprintstyle.Columns.Add("TXT"); dtprintstyle.Rows.Add(new object[] { "LUKHAN", "LUKHAN" }); Cls.Common.CboBox.FillComboBoxDataTable(cboComPrintMachine, dtprintstyle, "TXT", "VAL", "선택하세요"); cboComPrintMachine.SelectedIndex = 1; //////////////////////////////////////////////////////////////////////////////////////////////////// } catch (Exception ex) { throw ex; } }
/// <summary> /// 저장버튼을 눌렀을 경우 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void btnSave_Click(object sender, EventArgs e) { try { string facilitycode = ""; string facilityname = ""; string signpadport = CboBox.ComboSelectedMember(this.cboSignPort, "VAL"); string tsp800print = CboBox.ComboSelectedMember(this.cboPrintTSP800, "VAL"); string signpad = CboBox.ComboSelectedMember(this.cboSignPad, "VAL"); bool signpaduse = chkSignPadUse.Checked; string machinestyle = CboBox.ComboSelectedMember(this.cboComPrintMachine, "VAL"); string printcomport = CboBox.ComboSelectedMember(this.cboComPort, "VAL"); string printstopbit = CboBox.ComboSelectedMember(this.cboComStopBit, "VAL"); string printdatabit = CboBox.ComboSelectedMember(this.cboComDataBit, "VAL"); string printbaundrate = CboBox.ComboSelectedMember(this.cboComBoundRate, "VAL"); string printparity = CboBox.ComboSelectedMember(this.cboComParity, "VAL"); string printmode = ""; if (chkRS232.Checked) { printmode = "SERIALPORT"; } else if (chkDriver.Checked) { printmode = "DRIVER"; } if (this.lupFacility.EditValue.ToString().Trim() != "" && this.lupFacility.Text.Trim() != "") { facilitycode = this.lupFacility.EditValue.ToString(); facilityname = this.lupFacility.Text.Trim(); } Parm.CurrentUserInformation.golfTask.CardTid = ""; Parm.CurrentUserInformation.golfTask.CashTid = ""; if (Parm.CurrentUserInformation.golfTask.FacilityCode != "") { DataTable dtParmGolf = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter); dtParmGolf.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode }); dtParmGolf.Rows.Add(new object[] { "V_FACILITY_CODE", Parm.CurrentUserInformation.golfTask.FacilityCode }); dtParmGolf.Rows.Add(new object[] { "V_POS_NO", "01" }); DataSet dsGolfTmp = DataLayer.ExecuteSpDataset("PKG_REFERENCE_TASK.PR_04", dtParmGolf, DataLayer.MessageEncoding.Default); if (dsGolfTmp.Tables[0].Rows.Count > 0) { Parm.CurrentUserInformation.golfTask.CardTid = dsGolfTmp.Tables[0].Rows[0]["CARD_TID"].ToString().Trim(); Parm.CurrentUserInformation.golfTask.CashTid = dsGolfTmp.Tables[0].Rows[0]["CASH_TID"].ToString().Trim(); } } //해당사업장 거만 삭제 DataRow[] rr = dtReference.Select("BIZ_CODE = '" + Parm.CurrentUserInformation.BizInfo.BizCode + "'"); string str = "BIZ_CODE = '" + Parm.CurrentUserInformation.BizInfo.BizCode + "'"; for (int j = 0; j < rr.Length; j++) { dtReference.Rows.Remove(rr[j]); } dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "FACILITY_CODE", facilitycode }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "FACILITY_NAME", facilityname }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "SIGNPAD_PORT", signpadport }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "SIGNPAD", signpad }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "SIGNPAD_USE", signpaduse ? "Y" : "N" }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_TSP800", tsp800print }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_PORT", printcomport }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_BAUND", printbaundrate }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_PARITY", printparity }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_STOPBIT", printstopbit }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_DATABIT", printdatabit }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_MACHINE", machinestyle }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_MODE", printmode }); dtReference.WriteXml(System.Windows.Forms.Application.StartupPath + "\\" + Parm.mPath.PATH_GOLF_REFERENCE_FILE); Parm.CurrentUserInformation.golfTask.FacilityCode = facilitycode; Parm.CurrentUserInformation.golfTask.FacilityName = facilityname; Parm.CurrentUserInformation.golfTask.SignPort = signpadport; Parm.CurrentUserInformation.golfTask.TSP800 = tsp800print; Parm.CurrentUserInformation.golfTask.IsUseSignpad = signpaduse; Parm.CurrentUserInformation.golfTask.SerialPrintInfo.ComPort = printcomport; Parm.CurrentUserInformation.golfTask.SerialPrintInfo.BaundRate = printbaundrate; Parm.CurrentUserInformation.golfTask.SerialPrintInfo.DataBit = printdatabit; Parm.CurrentUserInformation.golfTask.SerialPrintInfo.Parity = RS232Info.GetConvertParity(printparity); Parm.CurrentUserInformation.golfTask.SerialPrintInfo.StopBit = RS232Info.GetConvertStopBit(printstopbit); PrintMode printMode = PrintMode.NONE; switch (printmode) { case "SERIALPORT": printMode = PrintMode.SERIALPORT; break; case "DRIVER": printMode = PrintMode.DRIVER; break; } Parm.CurrentUserInformation.golfTask.PrintMode = printMode; SignPad stPad = SignPad.NONE; switch (signpad) { case "EP791R": stPad = SignPad.EP791R; break; case "KSP100S": stPad = SignPad.KSP100S; break; case "KISSP30": stPad = SignPad.KISSP30; break; } Parm.CurrentUserInformation.golfTask.SignPad = stPad; ComPortPrintStyle comprintstyle = ComPortPrintStyle.NONE; switch (machinestyle) { case "LUKHAN": comprintstyle = ComPortPrintStyle.LUKHAN; break; } Parm.CurrentUserInformation.golfTask.SerialPrintStyle = comprintstyle; dr = DialogResult.OK; Basic.ShowMessage(1, "모든설정을 저장하였습니다."); } catch (Exception ex) { Basic.ShowMessage(3, ex.Message); } }
/// <summary> /// 컨트롤을 셋팅합니다. /// </summary> private void SetCtlInitialize() { try { this.pnlPrintDriver.Enabled = false; this.pnlSerial.Enabled = false; cboComPrintMachine.Enabled = false; dtReference.Columns.Add("BIZ_CODE"); dtReference.Columns.Add("VALUE_LIST"); dtReference.Columns.Add("VALUE_NAME"); dtFacilityPart.Columns.Add("FACILITY_CODE"); dtFacilityPart.Columns.Add("FACI_PART"); dtFacilityPart.Columns.Add("FACI_PART_NAME"); dtFacilityPart.Columns.Add("FACI_PART_NAME_SHORT"); dtFacilityPart.Columns.Add("FACI_PART_NAME_ENG"); dtFacilityPart.Columns.Add("PROD_GROUP_CODE"); dtFacilityPart.Columns.Add("PROD_GROUP_CODE_NAME"); dtFacilityPart.Columns.Add("PROD_AREA_CODE"); dtFacilityPart.Columns.Add("PROD_AREA_CODE_NAME"); dtPort.Columns.Add("PORT"); dtPort.Columns.Add("PORT_NAME"); dtPrint.Columns.Add("PRINT"); dtPrint.Columns.Add("PRINT_NAME"); DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter); dtParm.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode }); dtParm.Rows.Add(new object[] { "V_FACILITY_TYPE", "10" }); DataSet dsTmp = DataLayer.ExecuteSpDataset("PKG_REFERENCE_TASK.PR_02", dtParm, DataLayer.MessageEncoding.Default); dtFacilityPart.Load(dsTmp.Tables[0].CreateDataReader()); //영업장설정 Cls.Common.LookUp.SetFillCode(this.lupFacility, Basic.GetdtSelect(BizCommon.Parm.mDataTable.dtZaa140ms, " USE_YN = 'Y' AND FACILITY_TYPE = '10' AND PROJECT_ID = 'PROJECT_D'", "FACILITY_CODE"), "FACILITY_NAME", "FACILITY_CODE", LookUp.CaptoinStyle.SelectText); //사용가능한 시리얼포트를 가져온다. string[] strPort = System.IO.Ports.SerialPort.GetPortNames(); if (strPort != null) { for (int i = 0; i < strPort.Length; i++) { dtPort.Rows.Add(new object[] { strPort[i], strPort[i] }); } } //프린터가져오기 for (int p = 0; p < System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count; p++) { string printer = System.Drawing.Printing.PrinterSettings.InstalledPrinters[p]; dtPrint.Rows.Add(new object[] { printer, printer }); } //////////////////////////////////////////////////////////////////////////////////////////////////// //RFID장비를 설정합니다. Cls.Common.CboBox.FillComboBoxDataTable(cboRFIDPort, dtPort, "PORT_NAME", "PORT", "선택하세요"); cboRFIDPort.SelectedIndex = 0; dtRFID.Columns.Add("RF"); dtRFID.Columns.Add("RF_NAME"); Cls.Common.CboBox.FillComboBoxDataTable(cboRFID, dtRFID, "RF_NAME", "RF", "선택하세요"); cboRFID.SelectedIndex = 0; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //영수증프린터를 설정합니다. //////////////////////////////////////////////////////////////////////////////////////////////////// //드라이버 Cls.Common.CboBox.FillComboBoxDataTable(cboPrintTSP800, dtPrint, "PRINT_NAME", "PRINT", "선택하세요"); cboPrintTSP800.SelectedIndex = 0; //시리얼 Cls.Common.CboBox.FillComboBoxDataTable(cboComPort, dtPort, "PORT_NAME", "PORT", "선택하세요"); cboComPort.SelectedIndex = 0; Cls.Common.CboBox.FillComboBoxDataTable(cboComBoundRate, RS232Info.GetBaundRate(), "TXT", "VAL", "선택하세요"); cboComBoundRate.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndexRemain(cboComBoundRate, "9600"); Cls.Common.CboBox.FillComboBoxDataTable(cboComDataBit, RS232Info.GetDataBit(), "TXT", "VAL", "선택하세요"); cboComDataBit.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndexRemain(cboComDataBit, "8"); Cls.Common.CboBox.FillComboBoxDataTable(cboComParity, RS232Info.GetParity(), "TXT", "VAL", "없음"); cboComParity.SelectedIndex = 0; Cls.Common.CboBox.FillComboBoxDataTable(cboComStopBit, RS232Info.GetStopBit(), "TXT", "VAL", "선택하세요"); cboComStopBit.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndexRemain(cboComStopBit, "1"); DataTable dtmachine = new DataTable(); dtmachine.Columns.Add("TXT"); dtmachine.Columns.Add("VAL"); dtmachine.Rows.Add(new object[] { "", "NONE" }); dtmachine.Rows.Add(new object[] { "LUKHAN", "LUKHAN" }); //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //싸인패드설정 Cls.Common.CboBox.FillComboBoxDataTable(cboSignPort, dtPort, "PORT_NAME", "PORT", "선택하세요"); cboSignPort.SelectedIndex = 0; dtSignPad.Columns.Add("VAL"); dtSignPad.Columns.Add("TXT"); dtSignPad.Rows.Add(new object[] { "EP791R", "EP-791R" }); dtSignPad.Rows.Add(new object[] { "KSP100S", "KSP-100S" }); dtSignPad.Rows.Add(new object[] { "KISSP30", "KIS-SP30" }); Cls.Common.CboBox.FillComboBoxDataTable(cboSignPad, dtSignPad, "TXT", "VAL", "선택하세요"); cboSignPad.SelectedIndex = 0; DataTable dtprintstyle = new DataTable(); dtprintstyle.Columns.Add("VAL"); dtprintstyle.Columns.Add("TXT"); dtprintstyle.Rows.Add(new object[] { "LUKHAN", "LUKHAN" }); Cls.Common.CboBox.FillComboBoxDataTable(cboComPrintMachine, dtprintstyle, "TXT", "VAL", "선택하세요"); cboComPrintMachine.SelectedIndex = 1; //////////////////////////////////////////////////////////////////////////////////////////////////// } catch (Exception ex) { throw ex; } }
/// <summary> /// 컨트롤에 환경을 셋팅합니다. /// </summary> private void LoadSetting() { try { if (System.IO.File.Exists(System.Windows.Forms.Application.StartupPath + "\\" + Parm.mPath.PATH_GOLF_REFERENCE_FILE)) { dtReference.ReadXml(System.Windows.Forms.Application.StartupPath + "\\" + Parm.mPath.PATH_GOLF_REFERENCE_FILE); } lupFacility.EditValue = Parm.CurrentUserInformation.golfTask.FacilityCode; cboSignPort.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndex(cboSignPort, Parm.CurrentUserInformation.golfTask.SignPort); cboPrintTSP800.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndex(cboPrintTSP800, Parm.CurrentUserInformation.golfTask.TSP800); string signpadvalue = ""; switch (Parm.CurrentUserInformation.golfTask.SignPad) { case SignPad.EP791R: signpadvalue = "EP791R"; break; case SignPad.KSP100S: signpadvalue = "KSP100S"; break; case SignPad.KISSP30: signpadvalue = "KISSP30"; break; } chkSignPadUse.Checked = Parm.CurrentUserInformation.golfTask.IsUseSignpad; cboSignPad.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndex(cboSignPad, signpadvalue); cboComPort.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndex(cboComPort, Parm.CurrentUserInformation.golfTask.SerialPrintInfo.ComPort.ToString()); cboComBoundRate.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndex(cboComBoundRate, Parm.CurrentUserInformation.golfTask.SerialPrintInfo.BaundRate.ToString()); cboComDataBit.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndex(cboComDataBit, Parm.CurrentUserInformation.golfTask.SerialPrintInfo.DataBit.ToString()); string machinestyle = ""; switch (Parm.CurrentUserInformation.golfTask.SerialPrintStyle) { case ComPortPrintStyle.LUKHAN: machinestyle = "LUKHAN"; break; } cboComPrintMachine.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndex(cboComPrintMachine, machinestyle); cboComStopBit.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndex(cboComStopBit, RS232Info.GetConvertStopBit(Parm.CurrentUserInformation.golfTask.SerialPrintInfo.StopBit)); cboComParity.SelectedIndex = Cls.Common.CboBox.GetComboSelectedIndex(cboComParity, RS232Info.GetConvertParity(Parm.CurrentUserInformation.golfTask.SerialPrintInfo.Parity)); chkDriver.Checked = false; chkRS232.Checked = false; switch (Parm.CurrentUserInformation.golfTask.PrintMode) { case PrintMode.DRIVER: chkDriver.Checked = true; break; case PrintMode.SERIALPORT: chkRS232.Checked = true; break; } } catch (Exception ex) { throw ex; } }
/// <summary> /// 저장버튼을 눌렀을 경우 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void btnSave_Click(object sender, EventArgs e) { try { string facilitycode = ""; string facililtyname = ""; string facilitypart = ""; string facilitypartname = ""; string rfiddest = CboBox.ComboSelectedMember(this.cboRFID, "VAL"); string rfidport = CboBox.ComboSelectedMember(this.cboRFIDPort, "VAL"); string signpadport = CboBox.ComboSelectedMember(this.cboSignPort, "VAL"); string tsp800print = CboBox.ComboSelectedMember(this.cboPrintTSP800, "VAL"); string signpad = CboBox.ComboSelectedMember(this.cboSignPad, "VAL"); bool signpaduse = chkSignPadUse.Checked; string cardtid = ""; string cashtid = ""; string depositwindowyn = ""; string roomviewyn = ""; string taskDate = ""; string machinestyle = CboBox.ComboSelectedMember(this.cboComPrintMachine, "VAL"); string printcomport = CboBox.ComboSelectedMember(this.cboComPort, "VAL"); string printstopbit = CboBox.ComboSelectedMember(this.cboComStopBit, "VAL"); string printdatabit = CboBox.ComboSelectedMember(this.cboComDataBit, "VAL"); string printbaundrate = CboBox.ComboSelectedMember(this.cboComBoundRate, "VAL"); string printparity = CboBox.ComboSelectedMember(this.cboComParity, "VAL"); string printmode = ""; if (chkRS232.Checked) { printmode = "SERIALPORT"; } else if (chkDriver.Checked) { printmode = "DRIVER"; } if (this.lupFacility.EditValue.ToString().Trim() != "" && this.lupFacility.Text.Trim() != "") { facilitycode = this.lupFacility.EditValue.ToString(); } if (this.lupFacilityPart.EditValue.ToString().Trim() != "" && this.lupFacilityPart.Text.Trim() != "") { facilitypart = this.lupFacilityPart.EditValue.ToString(); } DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter); dtParm.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode }); dtParm.Rows.Add(new object[] { "V_FACILITY_CODE", facilitycode }); dtParm.Rows.Add(new object[] { "V_FACI_PART", facilitypart }); dtParm.Rows.Add(new object[] { "V_POS_NO", Parm._ROOM_POS_NO }); DataSet dsTmp = DataLayer.ExecuteSpDataset("PKG_REFERENCE_TASK.PR_01", dtParm, DataLayer.MessageEncoding.Default); if (dsTmp.Tables[0].Rows.Count > 0) { facililtyname = dsTmp.Tables[0].Rows[0]["FACILITY_NAME"].ToString().Trim(); facilitypartname = dsTmp.Tables[0].Rows[0]["FACI_PART_NAME"].ToString().Trim(); cardtid = dsTmp.Tables[0].Rows[0]["CARD_TID"].ToString().Trim(); cashtid = dsTmp.Tables[0].Rows[0]["CASH_TID"].ToString().Trim(); } else { Basic.ShowMessage(2, "영업장별특성[DZA010MS] , 영업장별POS[JAA020MS] , 영업장정보[JAA010MS], 동구분[DZA021MS] 테이블에 정보가 없습니다."); return; } if (dsTmp.Tables[1].Rows.Count > 0) { taskDate = dsTmp.Tables[1].Rows[0][0].ToString().Trim(); } else { Basic.ShowMessage(1, "TaskDate가 없습니다."); } DataTable dtParm13 = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter); dtParm13.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode }); dtParm13.Rows.Add(new object[] { "V_FACILITY_TYPE", Parm.CurrentUserInformation.roomTask.gsDFacility }); DataSet dsTmp13 = DataLayer.ExecuteSpDataset("PKG_REFERENCE_TASK.PR_03", dtParm13, DataLayer.MessageEncoding.Default); if (dsTmp13.Tables[0].Rows.Count > 0) { Parm.CurrentUserInformation.roomTask.gsTaskDate = dsTmp13.Tables[0].Rows[0][0].ToString().Trim(); } //객실특성 if (dsTmp13.Tables[1].Rows.Count > 0) { for (int u = 0; u < dsTmp13.Tables[1].Rows.Count; u++) { switch (dsTmp13.Tables[1].Rows[u]["PART_CODE"].ToString().Trim()) { case "100": //회원제여부 Parm.CurrentUserInformation.roomTask.IsMember = dsTmp13.Tables[1].Rows[u][1].ToString().Trim() == "Y" ? true : false; break; case "200": //인테리어사용여부 / 온돌 / 침실 욥션등.. Parm.CurrentUserInformation.roomTask.IsInterior = dsTmp13.Tables[1].Rows[u][1].ToString().Trim() == "Y" ? true : false; break; } } } if (dsTmp13.Tables[2].Rows.Count > 0) { Parm.CurrentUserInformation.roomTask.IsForcasting = dsTmp13.Tables[2].Rows[0][0].ToString().Trim() == "Y" ? true : false; Parm.CurrentUserInformation.roomTask.IsDePosit = dsTmp13.Tables[2].Rows[0][1].ToString().Trim() == "Y" ? true : false; } //해당사업장 거만 삭제 DataRow[] rr = dtReference.Select("BIZ_CODE = '" + Parm.CurrentUserInformation.BizInfo.BizCode + "'"); string str = "BIZ_CODE = '" + Parm.CurrentUserInformation.BizInfo.BizCode + "'"; for (int j = 0; j < rr.Length; j++) { dtReference.Rows.Remove(rr[j]); } dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "FACILITY_CODE", facilitycode }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "FACILITY_PART", facilitypart }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "RFID_DEST", rfiddest }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "RFID_PORT", rfidport }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "SIGNPAD_PORT", signpadport }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "SIGNPAD", signpad }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "SIGNPAD_USE", signpaduse ? "Y" : "N" }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_TSP800", tsp800print }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_PORT", printcomport }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_BAUND", printbaundrate }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_PARITY", printparity }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_STOPBIT", printstopbit }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_DATABIT", printdatabit }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_COM_MACHINE", machinestyle }); dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "PRINT_MODE", printmode }); dtReference.WriteXml(System.Windows.Forms.Application.StartupPath + "\\" + Parm.mPath.PATH_ROOM_REFERENCE_FILE); Parm.CurrentUserInformation.roomTask.gsCardTerminalID = cardtid; Parm.CurrentUserInformation.roomTask.gsCashTerminalID = cashtid; Parm.CurrentUserInformation.roomTask.gsDFacility = facilitycode; Parm.CurrentUserInformation.roomTask.gsDFacilityName = facililtyname; Parm.CurrentUserInformation.roomTask.gsDFaciPart = facilitypart; Parm.CurrentUserInformation.roomTask.gsDFaciPartName = facilitypartname; Parm.CurrentUserInformation.roomTask.gsEtcSignPort = signpadport; Parm.CurrentUserInformation.roomTask.gsRFCOMPort = rfidport; Parm.CurrentUserInformation.roomTask.gsRFDest = rfiddest; Parm.CurrentUserInformation.roomTask.TSP800 = tsp800print; Parm.CurrentUserInformation.roomTask.gsTaskDate = taskDate; Parm.CurrentUserInformation.roomTask.IsUseSignpad = signpaduse; Parm.CurrentUserInformation.roomTask.SerialPrintInfo.ComPort = printcomport; Parm.CurrentUserInformation.roomTask.SerialPrintInfo.BaundRate = printbaundrate; Parm.CurrentUserInformation.roomTask.SerialPrintInfo.DataBit = printdatabit; Parm.CurrentUserInformation.roomTask.SerialPrintInfo.Parity = RS232Info.GetConvertParity(printparity); Parm.CurrentUserInformation.roomTask.SerialPrintInfo.StopBit = RS232Info.GetConvertStopBit(printstopbit); PrintMode printMode = PrintMode.NONE; switch (printmode) { case "SERIALPORT": printMode = PrintMode.SERIALPORT; break; case "DRIVER": printMode = PrintMode.DRIVER; break; } Parm.CurrentUserInformation.roomTask.gsPrintMode = printMode; SignPad stPad = SignPad.NONE; switch (signpad) { case "EP791R": stPad = SignPad.EP791R; break; case "KSP100S": stPad = SignPad.KSP100S; break; case "KISSP30": stPad = SignPad.KISSP30; break; } Parm.CurrentUserInformation.roomTask.gsEtcSignPad = stPad; ComPortPrintStyle comprintstyle = ComPortPrintStyle.NONE; switch (machinestyle) { case "LUKHAN": comprintstyle = ComPortPrintStyle.LUKHAN; break; } Parm.CurrentUserInformation.roomTask.SerialPrintStyle = comprintstyle; dr = DialogResult.OK; Basic.ShowMessage(1, "Van TID 는 서버에 셋팅된 값으로 저장됩니다. \n\r모든설정을 저장하였습니다."); } catch (Exception ex) { Basic.ShowMessage(3, ex.Message); } }