Beispiel #1
0
        /// <summary>
        /// 먹스 인포가 변경되었을 때
        /// </summary>
        void optionForm_evtMUXInfoChanged()
        {
            //0. 오라클 접속 변수 얻어오기
            odec = DbConn.GetDbConn();

            try
            {
                // MUX 인포를 DB에서 읽어 와 세팅한다.
                StringBuilder sBuilder = new StringBuilder(100);
                sBuilder.Append(" SELECT  useflag , muxid, muxdesc, status, ip ");
                sBuilder.Append(" FROM muxInfo ");

                DataTable dTable = new DataTable();

                if (odec.openDb())
                {
                    dTable = odec.getDataTable(sBuilder.ToString(), "muxInfo");
                }


                if (dTable.Rows.Count > 0)
                {
                    //초기화
                    this.mainviewform.lvMUXInfos.Items.Clear();

                    int    i         = 0;
                    string strUse    = "사용";
                    string strStatus = "정상";
                    foreach (DataRow dRow in dTable.Rows)
                    {
                        if (dRow[0].ToString().Equals(0))
                        {
                            strUse = "미사용";
                        }
                        if (dRow[3].ToString().Equals(0))
                        {
                            strStatus = "이상";
                        }


                        ListViewItem lvItem = new ListViewItem(new string[] { strUse
                                                                              , dRow[1].ToString()
                                                                              , dRow[2].ToString()
                                                                              , strStatus
                                                                              , dRow[4].ToString() });
                        this.mainviewform.lvMUXInfos.Items.Insert(i, lvItem);
                        i++;
                    }
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine("EWSSystem.MainForm.optionForm_evtMUXInfoChanged()| " + ex.Message);
                Log.WriteLog("EWSSystem.MainForm.optionForm_evtMUXInfoChanged()| " + ex.Message);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 폼이 로드될 때
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void HistoryForm_Load(object sender, EventArgs e)
        {
            //0. 오라클 접속 변수 얻어오기
            odec = DbConn.GetDbConn();

            //1. 일반, 특수 기본값 채워주기
            //일반으로 기본값 잡음.

            //2. 날짜 세팅
            this.dtStartTime.Value = DateTime.Now.Date;
            this.dtEndTime.Value   = DateTime.Now.Date.AddMinutes(1439);

            //3. 상태 드랍박스 채워주기
            this.cbStatus.Items.Add("선택없음");
            this.cbStatus.Items.Add("대기");
            this.cbStatus.Items.Add("전송중");
            this.cbStatus.Items.Add("종료");

            this.cbStatus.SelectedIndex = 0; // "선택없음" 을 선택
        }
Beispiel #3
0
        /// <summary>
        /// 폼이 로드될 때
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OptionForm_Load(object sender, EventArgs e)
        {
            //0. 오라클 접속 변수 얻어오기
            odec = DbConn.GetDbConn();

            //1. 설정창
            //TCP Server
            this.txtPort.Text = ConfigurationManager.AppSettings["TCPPort"];
            //MUX 기본
            this.txtMUXTcId.Text  = ConfigurationManager.AppSettings["MUXTcId"];
            this.txtMUXRetry.Text = ConfigurationManager.AppSettings["MUXRetry"];

            //특수메세지
            this.txtSpcMaxId.Text     = ConfigurationManager.AppSettings["SpcMaxId"];
            this.txtSpcRepeatNum.Text = ConfigurationManager.AppSettings["SpcRepeatNum"];
            this.txtSpcWaitTime.Text  = ConfigurationManager.AppSettings["SpcWaitTime"];
            this.txtSpcCycle.Text     = ConfigurationManager.AppSettings["SpcCycle"];

            //일반메세지
            this.txtNorMaxId.Text     = ConfigurationManager.AppSettings["NorMaxId"];
            this.txtNorProcNum.Text   = ConfigurationManager.AppSettings["NorProcNum"];
            this.txtNorRepeatNum.Text = ConfigurationManager.AppSettings["NorRepeatNum"];
            this.txtNorCycle.Text     = ConfigurationManager.AppSettings["NorCycle"];
            this.txtNorTransTime.Text = ConfigurationManager.AppSettings["NorTransTime"];
            this.txtNorWaitTime.Text  = ConfigurationManager.AppSettings["NorWaitTime"];


            //2. 먹스 관리 창
            // 먹스 정보 DB 로드
            StringBuilder sBuilder = new StringBuilder(100);

            sBuilder.Append(" SELECT muxid,  useflag , ip, muxdesc ");
            sBuilder.Append(" FROM muxInfo ");

            DataTable dTable = new DataTable();

            try
            {
                if (odec.openDb())
                {
                    dTable = odec.getDataTable(sBuilder.ToString(), "muxInfo");
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine("EWSSystem.OptionDialog.OptionForm_Load()| " + ex.Message);
                Log.WriteLog("EWSSystem.OptionDialog.OptionForm_Load()| " + ex.Message);
            }


            if (dTable.Rows.Count > 0)
            {
                this.lvMUXList.Items.Clear();
                int    num    = 1;
                string strUse = "사용";
                foreach (DataRow dRow in dTable.Rows)
                {
                    if (dRow[1].ToString().Equals(0))
                    {
                        strUse = "미사용";
                    }

                    ListViewItem lvItem = new ListViewItem(new string[] { dRow[0].ToString()
                                                                          , num.ToString()
                                                                          , strUse
                                                                          , dRow[2].ToString()
                                                                          , dRow[3].ToString() });
                    this.lvMUXList.Items.Add(lvItem);
                    num++;
                }
            }
        }