Пример #1
0
        /// <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 btnSelect_Click(object sender, EventArgs e)
        {
            try
            {
                /*원래 조회시 마스터에 해당되는 항목을 가져와 다시 바인딩 해야되지만
                 * 현재 빠져 있어 상수값으로 대체 한다.
                 * 추후 이동인차장이 추가 하기로 하였음
                 */
                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "조회 중 입니다...", true);
                string project = CboBox.ComboSelectedMember(this.cBProject, Parm._VALUE_MEMBER);

                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_CLOSE_DATE", dtpFrom.Text.Trim() });
                dtParm.Rows.Add(new object[] { "V_PROJECT", project });
                dtMaster.Clear();
                DataSet ds = DataLayer.ExecuteSpDataset("PKG_ZAXI01.PR_01", dtParm, DataLayer.MessageEncoding.Default);
                dtMaster.Load(ds.Tables[0].CreateDataReader());
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Пример #2
0
        /// <summary>
        /// 컨트롤을 셋팅합니다.
        /// </summary>
        private void SetControlnitialize()
        {
            try
            {
                DataTable dtBiz = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtBiz.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                DataSet ds = DataLayer.ExecuteSpDataset("PKG_ZABI01.PR_01", dtBiz, DataLayer.MessageEncoding.Default);
                CboBox.FillComboBoxDataTable(this.cBProject, ds.Tables[0], "PROJECT_NAME", "PROJECT_ID");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    this.cBProject.SelectedIndex = 0;
                }

                DataRow[] r = BizCommon.Parm.mDataTable.dtZx010ms.Select("HEAD = 'ZX000' AND USE_YN = 'Y' AND DETAIL <> ' ' ");

                if (r == null || r.Length <= 0)
                {
                    throw new Exception("더존 서버정보가 없습니다.");
                }

                SQLConnectString = string.Format(SQLConnectString, r[0]["ITEM4"].ToString().Trim()
                                                 , r[0]["ITEM5"].ToString().Trim()
                                                 , r[0]["ITEM6"].ToString().Trim()
                                                 , r[0]["ITEM7"].ToString().Trim());

                //this.dtpFrom.Properties.Mask.EditMask = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ";
                this.dtpFrom.EditValue = DateTime.Now;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
        /// <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 facilityType       = "";
                string facilityTypename   = "";
                string facilityLockerType = "";
                string facilityLockerPort = CboBox.ComboSelectedMember(this.cboLockerPort, "VAL");

                switch (cboLockerType.SelectedIndex)
                {
                case 1:
                    facilityLockerType = "CR100EM";
                    break;
                }


                if (this.lupFacility.EditValue.ToString().Trim() != "" || this.lupFacility.Text != "")
                {
                    facilityType     = this.lupFacility.EditValue.ToString().Trim();
                    facilityTypename = facilityType == "" ? "" : this.lupFacility.Text.Trim();
                }



                DataRow[] r = dtReference.Select("BIZ_CODE = '" + Parm.CurrentUserInformation.BizInfo.BizCode + "'");

                //해당사업장 정보만 날린다.
                for (int i = 0; i < r.Length; i++)
                {
                    dtReference.Rows.Remove(r[i]);
                }

                dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "FACILITY_TYPE", facilityType });
                dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "FACILITY_TYPE_NAME", facilityTypename });


                dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "FACILITY_LOCKER_PORT", facilityLockerPort });
                dtReference.Rows.Add(new object[] { Parm.CurrentUserInformation.BizInfo.BizCode, "FACILITY_LOCKER_TYPE", facilityLockerType });

                dtReference.WriteXml(System.Windows.Forms.Application.StartupPath + "\\" + Parm.mPath.PATH_FALCILITY_REFERENCE_FILE);
                Parm.CurrentUserInformation.facilityTask.FacilityType       = facilityType;
                Parm.CurrentUserInformation.facilityTask.FacilityTypeName   = facilityTypename;
                Parm.CurrentUserInformation.facilityTask.FacilityLockerType = facilityLockerType;
                Parm.CurrentUserInformation.facilityTask.FacilityLockerPort = facilityLockerPort;

                dr = DialogResult.OK;

                Basic.ShowMessage(1, "저장하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(1, ex.Message);
            }
        }
Пример #4
0
 /// <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 comboBoxProject_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         SettingMenu(CboBox.ComboSelectedMember(this.comboBoxProject, Parm._VALUE_MEMBER));
     }
     catch (Exception ex)
     {
         Basic.ShowMessage(3, ex.Message);
     }
 }
Пример #5
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                /*원래 조회시 마스터에 해당되는 항목을 가져와 다시 바인딩 해야되지만
                 * 현재 빠져 있어 상수값으로 대체 한다.
                 * 추후 이동인차장이 추가 하기로 하였음
                 */
                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "조회 중 입니다...", true);
                string project = CboBox.ComboSelectedMember(this.cBProject, Parm._VALUE_MEMBER);

                DataTable tmp = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);

                tmp.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                tmp.Rows.Add(new object[] { "V_CLOSE_DATE", dtpFrom.Text.Trim() });
                tmp.Rows.Add(new object[] { "V_PROJECT", project });
                tmp.Rows.Add(new object[] { "V_GUBUN", project });
                tmp.Rows.Add(new object[] { "V_DV", project });
                tmp.Rows.Add(new object[] { "V_EMP_NO", project });
                tmp.Rows.Add(new object[] { "V_IP", project });

                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "자료생성 중 입니다...", true);

                string Rsult = DataLayer.ExecuteSpScala("PKG_ZAXI01.PR_03", tmp, DataLayer.MessageEncoding.Default);

                if (Rsult != "OK")
                {
                    Basic.SetCursor(this, true);
                    Basic.LoadParentFunction(this, "", false);

                    Basic.ShowMessage(3, Rsult);

                    return;
                }

                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);

                Basic.ShowMessage(1, "생성하였습니다.");
                //다시 조회한다.
                //Selects();
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Пример #6
0
        /// <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 btnDisplaySEQ_Update_Click(object sender, EventArgs e)
        {
            try
            {
                //LEVEL_SORT3
                if (dtProject.Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "변경된 데이터가 없습니다.");
                    return;
                }

                DataRow[] r = dtProject.Select("isnull(LEVEL_SORT3, -99)  <> isnull(LEVEL_SORT3_ORG , -99)");

                if (r == null || r.Length <= 0)
                {
                    Basic.ShowMessage(1, "변경된 데이터가 없습니다.");
                    return;
                }

                DataTable[] dtParm  = new DataTable[r.Length];
                string      project = CboBox.ComboSelectedMember(this.comboBoxProject, Parm._VALUE_MEMBER);
                for (int i = 0; i < r.Length; i++)
                {
                    dtParm[i]           = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                    dtParm[i].TableName = "PKG_ZABI02.PR_08";
                    dtParm[i].Rows.Add(new object[] { "V_PROJECT_ID", project });
                    dtParm[i].Rows.Add(new object[] { "V_MENU_ID", r[i]["LEVEL_CODE2"].ToString().Trim() });
                    dtParm[i].Rows.Add(new object[] { "V_PROGRAM_ID", r[i]["LEVEL_CODE3"].ToString().Trim() });
                    dtParm[i].Rows.Add(new object[] { "V_DISPLAY_SEQ", r[i]["LEVEL_SORT3"].ToString().Trim() });
                    dtParm[i].Rows.Add(new object[] { "V_U_EMP_NO", Parm.CurrentUserInformation.id });
                    dtParm[i].Rows.Add(new object[] { "V_U_IP", Parm.CurrentUserInformation.ip });
                }

                DataSet dsTmp = DataLayer.AddProdedcure(dtParm);

                string g = DataLayer.ExecuteSpScalaTransaction(dsTmp, "OK", DataLayer.MessageEncoding.Default);
                if (g != "OK")
                {
                    Basic.ShowMessage(3, g);
                    return;
                }
                SettingMenu(CboBox.ComboSelectedMember(this.comboBoxProject, Parm._VALUE_MEMBER));
                Basic.ShowMessage(1, "변경 하였습니다.");
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
Пример #7
0
 /// <summary>
 /// 콤보박스를 채움니다.
 /// </summary>
 private void FillComboBox()
 {
     try
     {
         DataTable dtBiz = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
         dtBiz.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
         DataSet ds = DataLayer.ExecuteSpDataset("PKG_ZABI01.PR_01", dtBiz, DataLayer.MessageEncoding.Default);
         CboBox.FillComboBoxDataTable(this.comboBoxProject, ds.Tables[0], "PROJECT_NAME", "PROJECT_ID");
         if (ds.Tables[0].Rows.Count > 0)
         {
             this.comboBoxProject.SelectedIndex = 0;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #8
0
        /// <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);
            }
        }
Пример #9
0
        /// <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);
            }
        }
Пример #10
0
        /// <summary>
        /// 데이터의 유효성을 검사합니다.
        /// </summary>
        /// <param name="Stype">메뉴/프로그램 구분</param>
        /// <param name="Qtype">DB작업구분</param>
        /// <returns>유효성검사결과</returns>
        private bool CheckData(SelectType Stype, SQLType Qtype)
        {
            try
            {
                bool   ReturnVal = true;
                string projectid = CboBox.ComboSelectedMember(this.comboBoxProject, Parm._VALUE_MEMBER);
                if (projectid == string.Empty)
                {
                    Basic.ShowMessage(2, "프로젝트가 선택되지 않았습니다.");
                    return(false);
                }

                //메뉴/프로그램 통
                if (Stype == SelectType.Program)
                {
                    if (this.treeView.SelectedNode == null)
                    {
                        Basic.ShowMessage(2, "선택된 메뉴가 없습니다.\n\r윈쪽의 메뉴를 선택하세요");
                        return(false);
                    }
                }

                if (Stype == SelectType.Menu && Qtype != SQLType.Insert)
                {
                    if (this.treeView.SelectedNode == null)
                    {
                        Basic.ShowMessage(2, "선택된 메뉴가 없습니다.\n\r윈쪽의 메뉴를 선택하세요");
                        return(false);
                    }
                }

                if (Stype == SelectType.Program && this.treeView.SelectedNode != null && Qtype == SQLType.Delete)
                {
                    if (this.treeView.SelectedNode.Parent == null)
                    {
                        Basic.ShowMessage(2, "삭제할 프로그램을 선택해 주세요");
                        return(false);
                    }
                }



                if (Stype == SelectType.Menu)
                {
                    if (Qtype != SQLType.Delete)
                    {
                        if (this.TextBoxMenuid.Text.Trim() == string.Empty)
                        {
                            Basic.ShowMessage(2, "메뉴아이디를 입력하세요");
                            this.TextBoxMenuid.Focus();
                            return(false);
                        }
                        else if (TextBoxMenuName.Text.Trim() == string.Empty)
                        {
                            Basic.ShowMessage(2, "메뉴명을 입력하세요");
                            this.TextBoxMenuName.Focus();
                            return(false);
                        }
                    }
                }
                else
                {
                    if (Qtype != SQLType.Delete)
                    {
                        if (TextBoxMenuName.Text.Trim() == string.Empty)
                        {
                            Basic.ShowMessage(2, "메뉴명을 입력하세요");
                            this.TextBoxMenuName.Focus();
                            return(false);
                        }
                        else if (this.TextBoxProgramid.Text.Trim() == string.Empty)
                        {
                            Basic.ShowMessage(2, "프로그램아이디 입력하세요");
                            this.TextBoxProgramid.Focus();
                            return(false);
                        }
                        else if (TextBoxProgramName.Text.Trim() == string.Empty)
                        {
                            Basic.ShowMessage(2, "프로그램명을 입력하세요");
                            this.TextBoxProgramName.Focus();
                            return(false);
                        }
                        else if (TextBoxProgramNamesapce.Text.Trim() == string.Empty)
                        {
                            Basic.ShowMessage(2, "네임스페이스를 입력하세요");
                            this.TextBoxProgramNamesapce.Focus();
                            return(false);
                        }
                    }
                }

                return(ReturnVal);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #11
0
        /// <summary>
        /// 데이터 입력
        /// </summary>
        /// <param name="type">The type.</param>
        private void ExecuteUpdate(SelectType type)
        {
            try
            {
                //if (Basic.ShowMessageQuestion("수정 하시겠습니까?") == DialogResult.No) return;
                if (!CheckData(type, SQLType.Update))
                {
                    return;
                }

                string project   = CboBox.ComboSelectedMember(this.comboBoxProject, Parm._VALUE_MEMBER);
                string id        = "";
                string name      = "";
                string nameSapce = "";
                string spName    = "";
                string display   = "0";

                DataTable dtParm      = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                string    nodevalue   = "";
                string    orgnodvalue = "";

                if (this.treeView.SelectedNode.Parent == null)
                {
                    if (type == SelectType.Program)
                    {
                        Basic.ShowMessage(2, "프로그램이 선택되지 않았습니다.\n왼쪽 트리목록의 프로그램 항목을 선택하세요");
                        return;
                    }
                }
                nodevalue = this.treeView.SelectedNode.Name;

                if (type == SelectType.Menu)
                {
                    /*  PKG_ZABI02.PR_06
                     ************************************************
                     *   V_PROJECT_ID  IN VARCHAR2  --프로젝트아이디
                     *  ,V_MENU_ID     IN VARCHAR2  --메뉴아이디
                     *  ,V_MENU_NAME   IN VARCHAR2  --메뉴명
                     *  ,V_DISPLAY_SEQ IN NUMBER    --호면출력순서
                     *  ,V_U_EMP_NO    IN VARCHAR2  --등록자
                     *  ,V_ORG_MENU_ID IN VARCHAR2  --원본메뉴아이디
                     *  ,V_IP          IN VARCHAR2  --아이디
                     *  ,V_RET        OUT VARCHAR2  --결과값
                     */

                    DataRow[] r = dtProject.Select("LEVEL_CODE2 = '" + nodevalue + "'", "");
                    if (r.Length <= 0)
                    {
                        Basic.ShowMessage(2, "선택된 메뉴값이 정확하지 않습니다.");
                        return;
                    }
                    orgnodvalue = r[0]["LEVEL_CODE2"].ToString().Trim();

                    id      = this.TextBoxMenuid.Text.Trim();
                    name    = this.TextBoxMenuName.Text.Trim();
                    display = this.TextBoxMenuDisplay.Text.Trim();

                    spName = "PKG_ZABI02.PR_06";
                    dtParm.Rows.Add(new object[] { "V_PROJECT_ID", project });
                    dtParm.Rows.Add(new object[] { "V_MENU_ID", id });
                    dtParm.Rows.Add(new object[] { "V_MENU_NAME", name });
                    dtParm.Rows.Add(new object[] { "V_DISPLAY_SEQ", display });
                    dtParm.Rows.Add(new object[] { "V_ORG_MENU_ID", orgnodvalue });
                    dtParm.Rows.Add(new object[] { "V_U_EMP_NO", BizCommon.Parm.CurrentUserInformation.id });
                    dtParm.Rows.Add(new object[] { "V_IP", BizCommon.Parm.CurrentUserInformation.ip });
                }
                else
                {
                    /*  PKG_ZABI02.PR_07
                     ************************************************
                     *  V_PROJECT_ID     IN VARCHAR2   --프로젝트id
                     * ,V_MENU_ID        IN VARCHAR2   --메뉴아이디
                     * ,V_PROGRAM_ID     IN VARCHAR2   --프로그램아이디
                     * ,V_PROGRAM_NAME   IN VARCHAR2   --프로그램이름
                     * ,V_PROGRAM_PATH   IN VARCHAR2   --프로그램경로
                     * ,V_DISPLAY_SEQ    IN NUMBER     --호면출력순서
                     * ,V_U_EMP_NO       IN VARCHAR2   --입력자
                     * ,V_ORG_PROGRAM_ID IN VARCHAR2  --원본프로그램아이디
                     * ,V_U_IP           IN VARCHAR2   --아이디
                     * ,V_RET           OUT VARCHAR2
                     */
                    id        = this.TextBoxProgramid.Text.Trim();
                    name      = this.TextBoxProgramName.Text.Trim();
                    nameSapce = this.TextBoxProgramNamesapce.Text.Trim();
                    display   = this.TextBoxProgramDisplay.Text.Trim();

                    DataRow[] r = dtProject.Select("LEVEL_CODE3 = '" + nodevalue + "'", "");
                    orgnodvalue = r[0]["LEVEL_CODE3"].ToString().Trim();
                    string menuid = r[0]["LEVEL_CODE2"].ToString().Trim();

                    if (r.Length <= 0)
                    {
                        Basic.ShowMessage(2, "선택된 메뉴값이 정확하지 않습니다.");
                        return;
                    }

                    spName = "PKG_ZABI02.PR_07";
                    dtParm.Rows.Add(new object[] { "V_PROJECT_ID", project });
                    dtParm.Rows.Add(new object[] { "V_MENU_ID", menuid });
                    dtParm.Rows.Add(new object[] { "V_PROGRAM_ID", id });
                    dtParm.Rows.Add(new object[] { "V_PROGRAM_NAME", name });
                    dtParm.Rows.Add(new object[] { "V_PROGRAM_PATH", nameSapce });
                    dtParm.Rows.Add(new object[] { "V_DISPLAY_SEQ", display });
                    dtParm.Rows.Add(new object[] { "V_U_EMP_NO", BizCommon.Parm.CurrentUserInformation.id });
                    dtParm.Rows.Add(new object[] { "V_ORG_PROGRAM_ID", orgnodvalue });
                    dtParm.Rows.Add(new object[] { "V_U_IP", BizCommon.Parm.CurrentUserInformation.ip });
                }

                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "수정 중 입니다...", true);

                string Result = DataLayer.ExecuteSpScala(spName, dtParm, DataLayer.MessageEncoding.Default);

                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);

                if (Result != "OK")
                {
                    Basic.ShowMessage(3, Result);
                    return;
                }
                Basic.ShowMessage(1, "수정하였습니다.");
                SettingMenu(project);
            }
            catch (Exception ex)
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
                throw ex;
            }
        }
Пример #12
0
        /// <summary>
        /// 데이터 삭제
        /// </summary>
        /// <param name="type">The type.</param>
        private void ExecuteDelete(SelectType type)
        {
            try
            {
                if (Basic.ShowMessageQuestion("삭제 하시겠습니까?") == DialogResult.No)
                {
                    return;
                }
                if (!CheckData(type, SQLType.Delete))
                {
                    return;
                }

                string    project = CboBox.ComboSelectedMember(this.comboBoxProject, Parm._VALUE_MEMBER);
                DataTable dtParm  = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);

                string nodevalue    = "";
                string subnodevalue = "";
                if (this.treeView.SelectedNode.Parent == null)
                {
                    nodevalue = this.treeView.SelectedNode.Name;
                }
                else
                {
                    nodevalue    = this.treeView.SelectedNode.Parent.Name;
                    subnodevalue = this.treeView.SelectedNode.Name;
                }

                string spName = "";
                if (type == SelectType.Menu)
                {
                    spName = "PKG_ZABI02.PR_04";
                    dtParm.Rows.Add(new object[] { "V_PROJECT_ID", project });
                    dtParm.Rows.Add(new object[] { "V_MENU_ID", nodevalue });
                }
                else
                {
                    spName = "PKG_ZABI02.PR_05";
                    dtParm.Rows.Add(new object[] { "V_PROJECT_ID", project });
                    dtParm.Rows.Add(new object[] { "V_MENU_ID", nodevalue });
                    dtParm.Rows.Add(new object[] { "V_PROGRAM_ID", subnodevalue });
                }

                Basic.SetCursor(this, false);
                Basic.LoadParentFunction(this, "삭제 중 입니다.", true);

                string Result = DataLayer.ExecuteSpScala(spName, dtParm, DataLayer.MessageEncoding.Default);

                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);

                if (Result != "OK")
                {
                    Basic.ShowMessage(3, Result);
                    return;
                }
                Basic.ShowMessage(1, "삭제하였습니다.");
                SettingMenu(project);
            }
            catch (Exception ex)
            {
                Basic.SetCursor(this, true);
                Basic.LoadParentFunction(this, "", false);
                throw ex;
            }
        }