//창 초기화
        public MessageView(Hashtable messageDetail, String userId, int messageNo)
        {
            InitializeComponent();
            this.Text = "메세지 보기";

            //회신할때 사용
            _messageNo = messageNo;

            lvFileList.View = View.Details;
            lvFileList.Columns.Add("fileName", 600, HorizontalAlignment.Left);
            lvFileList.Columns.Add("fileFullName", 0);

            lvFileList.HeaderStyle = ColumnHeaderStyle.None;

            //창 열릴때 본 시간 저장
            Hashtable _param = new Hashtable();

            _param.Add("C_INDEX", messageNo);
            _param.Add("ID_READER", MainProg.GetUserId());
            //new _Ins().UpdatetHashData(_param, "updateBoardDetail");

            PacketData_SendMessage_Read req = new PacketData_SendMessage_Read();

            req.criInfo = _param;
            MainProg.client.Send(req);

            //상세화면 표시
            viewMessageDetail(messageDetail);
        }
        private void MessageFormBox_DragDrop(object sender, DragEventArgs e)
        {
            var dropped = ((string[])e.Data.GetData(DataFormats.FileDrop));
            var files   = dropped.ToList();

            if (!files.Any())
            {
                return;
            }

            foreach (string drop in dropped)
            {
                if (Directory.Exists(drop))
                {
                    files.AddRange(Directory.GetFiles(drop, "*.*", SearchOption.AllDirectories));
                }
            }

            lvFileList.Update();

            Random r = new Random();
            String _modifyFileName = "me_" + MainProg.GetUserId() + "_" + DateTime.Now.ToString("yyyyMMddHHmmss") + "_" + r.Next(0, 1000).ToString();

            String[] _fileItem =
            {
                Path.GetFileName(files[0]),
                files[0],
                _modifyFileName
            };
            ListViewItem _itemList = new ListViewItem(_fileItem);

            lvFileList.Items.Add(_itemList);

            lvFileList.EndUpdate();
        }
示例#3
0
        private void ChatForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            PacketData_CloseRoom req = new PacketData_CloseRoom();

            req.userId = MainProg.GetUserId();
            req.roomNo = roomNo;
            MainProg.client.Send(req);
        }
示例#4
0
        //메세지 보내기
        private void btn_Send_Click(object sender, EventArgs e)
        {
            if (txt_rcv_user.Text.Length < 1)
            {
                MessageBox.Show("받을사람이 지정되어 있지 않습니다.");
                return;
            }

            //테이블 등록처리
            _Ins      _ins   = new _Ins();
            Hashtable _param = new Hashtable();

            _param.Add("TITLE", "메세지");

            _param.Add("CONTEXT", messageBody.DocumentText);
            _param.Add("REGI_ID", MainProg.GetUserId());

            _param.Add("MESSAGE_KB", "1");

            for (int i = 0; i < lvFileList.Items.Count; i++)
            {
                ListViewItem fItem = lvFileList.Items[i];
                switch (i)
                {
                case 0:
                    _param.Add("FILE_", fItem.SubItems[2].Text);
                    _param.Add("FILE_ORIGIN", fItem.SubItems[0].Text);
                    break;

                case 1:
                    _param.Add("FILE1_", fItem.SubItems[2].Text);
                    _param.Add("FILE1_ORIGIN", fItem.SubItems[0].Text);
                    break;

                case 2:
                    _param.Add("FILE2_", fItem.SubItems[2].Text);
                    _param.Add("FILE2_ORIGIN", fItem.SubItems[0].Text);
                    break;

                case 3:
                    _param.Add("FILE3_", fItem.SubItems[2].Text);
                    _param.Add("FILE3_ORIGIN", fItem.SubItems[0].Text);
                    break;

                case 4:
                    _param.Add("FILE3_", fItem.SubItems[2].Text);
                    _param.Add("FILE4_", fItem.SubItems[0].Text);
                    break;
                }
            }
            _param.Add("DISPLAY_DT", "99991231");

            //추가일 경우
            boardNo = _ins.InsertHashDataBySelectKey(_param, "insertBoard");

            FileUpload();
        }
示例#5
0
        //로그인 시 읽지 않은 메세지 표시
        private void getReadMessage()
        {
            Hashtable _param = new Hashtable();

            _param.Add("REGI_ID", MainProg.GetUserId());
            IList <Hashtable> _list = _sel.GetListHashData(_param, "getBoarderDetail");

            foreach (Hashtable _item in _list)
            {
                MessageView mv = new MessageView(_cu.rtnHtS(_item["C_INDEX"]));
                mv.Show();
            }
        }
示例#6
0
        //메세지 검색
        private void btn_search_Click(object sender, EventArgs e)
        {
            Hashtable _param = new Hashtable();

            _param.Add("REGI_ID", MainProg.GetUserId());
            _param.Add("MESSAGE_KB", "1");
            _param.Add("SEARCHKB", cbx01.SelectedIndex);
            _param.Add("SEARCHTXT", txt_notice_search.Text.Trim());

            PacketData_MessageSearch req = new PacketData_MessageSearch();

            req.criInfo = _param;
            MainProg.client.Send(req);
        }
        void worker_RunWorkerCompleted_Ftp(object sender, RunWorkerCompletedEventArgs e)
        {
            backgroundWorker1.DoWork             -= new DoWorkEventHandler(uploadFileFtp);
            backgroundWorker1.ProgressChanged    -= new ProgressChangedEventHandler(worker_ProgressChanged_Ftp);
            backgroundWorker1.RunWorkerCompleted -= new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted_Ftp);

            if (e.Error == null)
            {
                download_panel.Visible = false;
                MessageBox.Show("등록 되었습니다.");

                PacketData_SendNotice req = new PacketData_SendNotice();
                req.userId  = MainProg.GetUserId();
                req.boardNo = boardNo;
                MainProg.client.Send(req);
                this.DataPushEvent_Sub(false);
                this.Dispose();
            }
        }
示例#8
0
        void worker_RunWorkerCompleted_Ftp(object sender, RunWorkerCompletedEventArgs e)
        {
            backgroundWorker1.DoWork             -= new DoWorkEventHandler(uploadFileFtp);
            backgroundWorker1.ProgressChanged    -= new ProgressChangedEventHandler(worker_ProgressChanged_Ftp);
            backgroundWorker1.RunWorkerCompleted -= new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted_Ftp);

            if (e.Error == null)
            {
                download_panel.Visible = false;

                //받은사람에게 전송처리
                PacketData_SendMessage req = new PacketData_SendMessage();
                req.userId  = MainProg.GetUserId();
                req.boardNo = boardNo;

                Hashtable     _param      = new Hashtable();
                List <String> _rcvvUserId = new List <string>();
                _param.Add("C_INDEX", boardNo);

                foreach (String userNm in txt_rcv_user.Text.Split(';'))
                {
                    if (userNm.Equals(""))
                    {
                        continue;
                    }
                    String _memberId = MainProg.getUserInfoByKey("MEMBERNAME", userNm).MEMBERID;

                    _rcvvUserId.Add(_memberId);
                    _param.Remove("ID_READER");

                    //읽은 사람 등록
                    _param.Add("ID_READER", _memberId);
                    new _Ins().InsertHashData(_param, "insertBoardDetail");
                }

                MessageBox.Show("전송 되었습니다.");

                req.revUserId = _rcvvUserId;
                MainProg.client.Send(req);
                this.Close();
            }
        }
示例#9
0
        //데이터 받았을 때 발생하는 이벤트
        void OnReceive(Client sender, int msgType, byte[] buff)
        {
            string  s        = System.Text.Encoding.UTF8.GetString(buff);
            JObject jObject  = JObject.Parse(s);
            int     packetID = (int)jObject["PacketID"];

            PacketResponse response = new PacketResponse((PacketID)packetID, s);

            if (packetID == (int)PacketID.PacketID_Connect_Req)
            {
                PacketData_ConnectReq req = response.Parsing <PacketData_ConnectReq>();
                String _connetedUsers     = String.Empty;
                Invoke((MethodInvoker) delegate
                {
                    //처음 실행시 가져오는 전체유저정보취득
                    MainProg.Instance.getUserLIst(req.userList);

                    //처음 실행시 가져오는 공지사항
                    if (req.noticeList != null)
                    {
                        ShowBoard(true, req.noticeList);
                    }

                    //처음 실행시 가져오는 읽지 않은 메세지
                    if (req.messageList != null)
                    {
                        getReadMessage(req.messageList);
                    }

                    //로그인한 사람 저장
                    presentSessionList = req.presentSessionList;
                });
                foreach (String users in presentSessionList)
                {
                    _connetedUsers += "F" + users + "^";
                }

                //로그인하면 화면 처리(로그인한사람)
                this.Invoke(new Action(() => { webBrowser1.Document.InvokeScript("onLineMark", new object[] { _connetedUsers }); }));
            }
            else if (packetID == (int)PacketID.PacketID_DisConnect_Req)
            {
                PacketData_DisConnectReq req = response.Parsing <PacketData_DisConnectReq>();
                String _connetedUsers        = String.Empty;

                _connetedUsers += "F" + req.userId + "^";

                //로그아웃이나 종료하면 화면 처리(로그인한사람)
                this.Invoke(new Action(() => { webBrowser1.Document.InvokeScript("offLineMark", new object[] { _connetedUsers }); }));
            }
            //공지사항 보기
            else if (packetID == (int)PacketID.PacketID_Notice_Detail)
            {
                PacketData_NoticeDetail req = response.Parsing <PacketData_NoticeDetail>();
                Invoke((MethodInvoker) delegate
                {
                    //ShowBoard(false);
                    //수정을 눌렀을 때
                    if (req.noticeProcess.Equals("U"))
                    {
                        NoticeWrite ni = new NoticeWrite(req.noticeDetail, req.noticeNum);
                        //    ni.DataPushEvent_Sub += new NoticeWrite.Sub_DataPushEventHandler(ShowBoard);
                        ni.Show();
                    }
                    else
                    {
                        NoticeView nv = new NoticeView(req.noticeDetail);
                        nv.Show();
                    }
                });
            }
            //공지사항 등록 및 수정시
            else if (packetID == (int)PacketID.PacketID_Send_Notice)
            {
                PacketData_SendNotice req = response.Parsing <PacketData_SendNotice>();
                Invoke((MethodInvoker) delegate
                {
                    if (req.noticeProcess.Equals("D"))
                    {
                        ShowBoard(false, req.noticeList);
                    }
                    else
                    {
                        ShowBoard(true, req.noticeList);
                    }

                    //NoticeView nv = new NoticeView(req.boardNo.ToString());
                    //nv.Show();
                });
            }
            //공지사항 찾기
            else if (packetID == (int)PacketID.PacketID_Notice_Find)
            {
                PacketData_NoticeFind req = response.Parsing <PacketData_NoticeFind>();
                Invoke((MethodInvoker) delegate
                {
                    ShowBoard(false, req.noticeList);
                });
            }
            //메세지 관리함 보기
            else if (packetID == (int)PacketID.PacketID_Message_Mng)
            {
                PacketData_MessageMng req = response.Parsing <PacketData_MessageMng>();
                Invoke((MethodInvoker) delegate
                {
                    Form fc = Application.OpenForms["MessageMng"];

                    if (fc != null)
                    {
                        DataSendMessageEvent(req.messageList, null, "1");
                    }
                    else
                    {
                        MessageMng mv = new MessageMng(req.messageList);

                        this.DataSendMessageEvent += new DataPushMessageEventHandler(mv.SetActiveValue);
                        mv.DataSendMessageEvent   += new DataGetMessageEventHandlder(this.DataMessageAction);
                        mv.ShowDialog();
                    }
                });
            }
            //메세지 상세보기
            else if (packetID == (int)PacketID.PacketID_Message_Detail)
            {
                PacketData_MessageDetail req = response.Parsing <PacketData_MessageDetail>();
                Invoke((MethodInvoker) delegate
                {
                    DataSendMessageEvent(req.messageDetail, req.messageReaderDetail, null);
                });
            }
            //메세지 찾기
            else if (packetID == (int)PacketID.PacketID_Message_Search)
            {
                PacketData_MessageSearch req = response.Parsing <PacketData_MessageSearch>();
                Invoke((MethodInvoker) delegate
                {
                    DataSendMessageEvent(req.messageList, null, "1");
                });
            }
            //메세지 회신쓰기
            else if (packetID == (int)PacketID.PacketID_Message_ReWrite)
            {
                PacketData_MessageReWrite req = response.Parsing <PacketData_MessageReWrite>();
                Invoke((MethodInvoker) delegate
                {
                    //DataSendMessageEvent(req.messageDetail, null, "1");
                    MessageFormBox mfb = new MessageFormBox(req.rcvUser, null, req.messageDetail);
                    mfb.Show();
                });
            }

            //메세지 받기
            else if (packetID == (int)PacketID.PacketID_Send_Msg)
            {
                PacketData_SendMessage req = response.Parsing <PacketData_SendMessage>();
                Invoke((MethodInvoker) delegate
                {
                    //MessageView mv = new MessageView(req.boardNo.ToString());
                    Form fc = Application.OpenForms["MessageMng"];

                    if (fc != null)
                    {
                        PacketData_MessageMng req_2 = new PacketData_MessageMng();
                        Hashtable _param            = new Hashtable();
                        _param.Add("MESSAGE_KB", "1");
                        _param.Add("REGI_ID", MainProg.GetUserId());
                        req_2.criInfo = _param;
                        req_2.process = "1";
                        MainProg.client.Send(req_2);
                    }

                    MessageView mv = new MessageView(req.messageDetail, req.userId, req.boardNo);
                    mv.Show();
                });
            }
            //채팅방 만들기
            else if (packetID == (int)PacketID.PacketID_Make_Room)
            {
                PacketData_MakeRoom req = response.Parsing <PacketData_MakeRoom>();
                Invoke((MethodInvoker) delegate
                {
                    if (!_userId.Equals(req.makeUserId))
                    {
                        ChatForm cf = new ChatForm(false, req, _userId, null);

                        this.DataSendEvent += new DataPushEventHandler(cf.SetActiveValue);
                        cf.DataSendEvent   += new DataGetEventHandlder(this.DataAction);

                        cf.Show();
                    }
                });
            }
            //방없애기
            else if (packetID == (int)PacketID.PacketID_Close_Room)
            {
                PacketData_CloseRoom req = response.Parsing <PacketData_CloseRoom>();
                Invoke((MethodInvoker) delegate
                {
                    DataSendEvent("close_theRoom", req.roomNo, req.userId);
                });
            }
            //방채팅
            else if (packetID == (int)PacketID.PacketID_Room_Msg)
            {
                PacketData_SendRoomMessage req = response.Parsing <PacketData_SendRoomMessage>();
                Invoke((MethodInvoker) delegate
                {
                    rb2.Text += req.message;
                    DataSendEvent(req.message, req.roomNo, req.sendUserId);
                });
            }
            //조직도 Reload
            else if (packetID == (int)PacketID.PacketID_ReloadGroup)
            {
                //화면 리로드 처리
                webBrowser1.Refresh();
            }
            //else
            //{
            //    RecvConnectAck(sender, response);
            //}
        }
示例#10
0
        //공지사항
        //처음 로그인 시에만 않읽은 공지사항이 있으면 팝업처리한다.
        public void ShowBoard(Boolean initFg, IList <Hashtable> _list)
        {
            lv_notice.Items.Clear();

            lv_notice.View = View.Details;

            lv_notice.GridLines     = true;
            lv_notice.FullRowSelect = true;

            Hashtable _param = new Hashtable();

            _param.Add("MESSAGE_KB", "0");
            //IList<Hashtable> _list = _sel.GetListHashData(_param, "getBoarderList");

            if (_list != null && _list.Count > 0)
            {
                foreach (Hashtable _item in _list)
                {
                    String[] _boardItem =
                    {
                        _cu.rtnHtS(_item["C_INDEX"]),
                        _cu.rtnHtS(_item["TITLE"]),
                        _cu.rtnHtS(_item["NAME"]),
                        //_cu.ToYYYYMMDD(_cu.rtnHtS(_item["REGI_DT"]), true),
                        _cu.GetDateTimeFormat(DateTime.Parse(_cu.rtnHtS(_item["REGI_DT"])),"yyyy년 mm월 dd일"),
                        _cu.rtnHtS(_item["REGI_ID"])
                    };
                    ListViewItem _itemList = new ListViewItem(_boardItem);

                    lv_notice.Items.Add(_itemList);
                }
                //새로운 공지사항을 팝업으로 띄운다.
                if (initFg)
                {
                    IList <Hashtable> _newnoticeList = _list.Where(w => !_cu.rtnHtS(w["ID_READER"]).Split(',').Contains(MainProg.GetUserId())).ToList <Hashtable>();

                    foreach (Hashtable _item in _newnoticeList)
                    {
                        //NoticeView nv = new NoticeView(_cu.rtnHtS(_item["C_INDEX"]));
                        //nv.Show();
                        PacketData_NoticeDetail req = new PacketData_NoticeDetail();
                        req.noticeProcess = "R";
                        req.noticeNum     = _cu.rtnHtS(_item["C_INDEX"]);
                        MainProg.client.Send(req);
                    }
                }
            }
        }
示例#11
0
        //메세지 보내기
        private void btn_Send_Click(object sender, EventArgs e)
        {
            if (txt_rcv_user.Text.Length < 1)
            {
                MessageBox.Show("받을사람이 지정되어 있지 않습니다.");
                return;
            }

            //테이블 등록처리
            //_Ins _ins = new _Ins();
            Hashtable _param = new Hashtable();

            _param.Add("TITLE", "메세지");

            _param.Add("CONTEXT", messageBody.DocumentText);
            _param.Add("REGI_ID", MainProg.GetUserId());

            _param.Add("MESSAGE_KB", "1");

            for (int i = 0; i < lvFileList.Items.Count; i++)
            {
                ListViewItem fItem = lvFileList.Items[i];
                switch (i)
                {
                case 0:
                    _param.Add("FILE_", fItem.SubItems[2].Text);
                    _param.Add("FILE_ORIGIN", fItem.SubItems[0].Text);
                    break;

                case 1:
                    _param.Add("FILE1_", fItem.SubItems[2].Text);
                    _param.Add("FILE1_ORIGIN", fItem.SubItems[0].Text);
                    break;

                case 2:
                    _param.Add("FILE2_", fItem.SubItems[2].Text);
                    _param.Add("FILE2_ORIGIN", fItem.SubItems[0].Text);
                    break;

                case 3:
                    _param.Add("FILE3_", fItem.SubItems[2].Text);
                    _param.Add("FILE3_ORIGIN", fItem.SubItems[0].Text);
                    break;

                case 4:
                    _param.Add("FILE3_", fItem.SubItems[2].Text);
                    _param.Add("FILE4_", fItem.SubItems[0].Text);
                    break;
                }
            }
            _param.Add("DISPLAY_DT", "99991231");

            //추가일 경우
            //boardNo = _ins.InsertHashDataBySelectKey(_param, "insertBoard");

            List <String> _rcvvUserId = new List <string>();

            foreach (String userNm in txt_rcv_user.Text.Split(';'))
            {
                if (userNm.Equals(""))
                {
                    continue;
                }
                String _memberId = MainProg.getUserInfoByKey("MEMBERNAME", userNm).MEMBERID;

                _rcvvUserId.Add(_memberId);
            }

            PacketData_SendMessage req = new PacketData_SendMessage();

            req.revUserId     = _rcvvUserId;
            req.messageDetail = _param;
            MainProg.client.Send(req);

            FileUpload();
        }
示例#12
0
        public void SetActiveValue(IList <Hashtable> _message, IList <Hashtable> _readers, String process)
        {
            if (process != null && process.Equals("1"))
            {
                IList <Hashtable> _slist = _message.Where(w => w["REGI_ID"].ToString().Equals(MainProg.GetUserId())).ToList <Hashtable>();
                IList <Hashtable> _rlist = _message.Where(w => !w["REGI_ID"].ToString().Equals(MainProg.GetUserId())).ToList <Hashtable>();

                lb_userNm.Text           = "-";
                lb_date.Text             = "-";
                messageBody.DocumentText = "";
                lvFileList.Items.Clear();

                if (msgList.SelectedTab == msgList.TabPages["tabPage1"])
                {//받은메세지
                    lvRcv.Items.Clear();
                    foreach (Hashtable _item in _rlist)
                    {
                        String        _rcvUserNm = String.Empty;
                        StringBuilder sb         = new StringBuilder();
                        sb.Append(MainProg.getUserInfoByKey("MEMBERID", _cu.rtnHtS(_item["REGI_ID"])).MEMBERNAME);
                        sb.Append(";");
                        _rcvUserNm += sb.ToString();

                        String[] _boardItem =
                        {
                            _cu.rtnHtS(_item["C_INDEX"]),
                            _rcvUserNm,
                            //_cu.ToYYYYMMDD(_cu.rtnHtS(_item["REGI_DT"]), true)
                            _cu.GetDateTimeFormat(DateTime.Parse(_cu.rtnHtS(_item["REGI_DT"])), "yyyy-mm-dd hh:nn:ss")
                        };
                        ListViewItem _itemList = new ListViewItem(_boardItem);

                        lvRcv.Items.Add(_itemList);
                    }

                    if (lvRcv.Items.Count > 0)
                    {
                        lvRcv.Items[0].Selected = true;
                    }
                }
                else
                {//보낸메세지
                    lvSend.Items.Clear();

                    foreach (Hashtable _item in _slist)
                    {
                        String   _rcvUserNm = String.Empty;
                        String[] _usersNm   = _cu.rtnHtS(_item["ID_READER"]).Split(',');

                        foreach (String _user in _usersNm)
                        {
                            if (_user.Equals(""))
                            {
                                continue;
                            }
                            StringBuilder sb = new StringBuilder();
                            sb.Append(MainProg.getUserInfoByKey("MEMBERID", _user).MEMBERNAME);
                            sb.Append(";");
                            _rcvUserNm += sb.ToString();
                        }

                        String[] _boardItem =
                        {
                            _cu.rtnHtS(_item["C_INDEX"]),
                            _rcvUserNm,
                            //_cu.ToYYYYMMDD(_cu.rtnHtS(_item["REGI_DT"]), true)
                            _cu.GetDateTimeFormat(DateTime.Parse(_cu.rtnHtS(_item["REGI_DT"])), "yyyy-mm-dd hh:nn:ss")
                        };
                        ListViewItem _itemList = new ListViewItem(_boardItem);

                        lvSend.Items.Add(_itemList);
                    }
                    if (lvSend.Items.Count > 0)
                    {
                        lvSend.Items[0].Selected = true;
                    }
                }
            }
            else
            {
                foreach (Hashtable _item in _readers)
                {
                    ListViewItem lvi = new ListViewItem(MainProg.getUserInfoByKey("MEMBERID", _cu.rtnHtS(_item["ID_READER"])).MEMBERNAME);
                    lvi.SubItems.Add(_cu.rtnHtS(_item["READ_TIME"]));
                    lvRcvResult.Items.Add(lvi);
                }

                foreach (Hashtable _item in _message)
                {
                    lb_cindex.Text = _cu.rtnHtS(_item["C_INDEX"]);

                    if (msgList.SelectedTab == msgList.TabPages["tabPage1"])
                    {
                        lb_userNm.Text = MainProg.getUserInfoByKey("MEMBERID", _cu.rtnHtS(_item["REGI_ID"])).MEMBERNAME;
                    }
                    else
                    {
                        lb_userNm.Text = MainProg.getUserInfoByKey("MEMBERID", _cu.rtnHtS(_item["ID_READER"])).MEMBERNAME;
                    }
                    //lb_date.Text = _cu.ToYYYYMMDD(_cu.rtnHtS(_item["REGI_DT"]), true);

                    lb_date.Text             = _cu.GetDateTimeFormat(DateTime.Parse(_cu.rtnHtS(_item["REGI_DT"])), "yyyy-mm-dd hh:nn:ss");
                    messageBody.DocumentText = _cu.rtnHtS(_item["CONTEXT"]);

                    if (!_cu.rtnHtS(_item["FILE_"]).Equals(""))
                    {
                        ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_item["FILE_ORIGIN"]));
                        lvi.SubItems.Add(_cu.rtnHtS(_item["FILE_"]));
                        lvFileList.Items.Add(lvi);
                    }

                    if (!_cu.rtnHtS(_item["FILE1_"]).Equals(""))
                    {
                        ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_item["FILE1_ORIGIN"]));
                        lvi.SubItems.Add(_cu.rtnHtS(_item["FILE1_"]));
                        lvFileList.Items.Add(lvi);
                    }

                    if (!_cu.rtnHtS(_item["FILE2_"]).Equals(""))
                    {
                        ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_item["FILE2_ORIGIN"]));
                        lvi.SubItems.Add(_cu.rtnHtS(_item["FILE2_"]));
                        lvFileList.Items.Add(lvi);
                    }

                    if (!_cu.rtnHtS(_item["FILE3_"]).Equals(""))
                    {
                        ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_item["FILE3_ORIGIN"]));
                        lvi.SubItems.Add(_cu.rtnHtS(_item["FILE3_"]));
                        lvFileList.Items.Add(lvi);
                    }

                    if (!_cu.rtnHtS(_item["FILE4_"]).Equals(""))
                    {
                        ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_item["FILE4_ORIGIN"]));
                        lvi.SubItems.Add(_cu.rtnHtS(_item["FILE4_"]));
                        lvFileList.Items.Add(lvi);
                    }
                }
            }
        }
示例#13
0
        //공지사항
        //처음 로그인 시에만 않읽은 공지사항이 있으면 팝업처리한다.
        public void ShowBoard(Boolean initFg)
        {
            lv_notice.Items.Clear();

            lv_notice.View = View.Details;

            lv_notice.GridLines     = true;
            lv_notice.FullRowSelect = true;

            Hashtable _param = new Hashtable();

            _param.Add("MESSAGE_KB", "0");
            IList <Hashtable> _list = _sel.GetListHashData(_param, "getBoarderList");

            if (_list.Count > 0)
            {
                foreach (Hashtable _item in _list)
                {
                    String[] _boardItem =
                    {
                        _cu.rtnHtS(_item["C_INDEX"]),
                        _cu.rtnHtS(_item["TITLE"]),
                        _cu.rtnHtS(_item["NAME"]),
                        _cu.ToYYYYMMDD(_cu.rtnHtS(_item["REGI_DT"]),true),
                        _cu.rtnHtS(_item["REGI_ID"])
                    };
                    ListViewItem _itemList = new ListViewItem(_boardItem);

                    lv_notice.Items.Add(_itemList);
                }
            }

            //새로운 공지사항을 팝업으로 띄운다.
            if (initFg)
            {
                IList <Hashtable> _newnoticeList = _list.Where(w => !_cu.rtnHtS(w["ID_READER"]).Split(',').Contains(MainProg.GetUserId())).ToList <Hashtable>();

                foreach (Hashtable _item in _newnoticeList)
                {
                    NoticeView nv = new NoticeView(_cu.rtnHtS(_item["C_INDEX"]));
                    nv.Show();
                }
            }
        }
示例#14
0
        private void viewBorderDetail(String noticeNum)
        {
            Hashtable _param = new Hashtable();

            _param.Add("C_INDEX", noticeNum);
            _param.Add("MESSAGE_KB", "0");

            _param.Add("ID_READER", MainProg.GetUserId());
            //읽음으로 표시
            _Ins.UpdatetHashData(_param, "mergeNoticeMessageMsgDetail");

            IList <Hashtable> _list = _sel.GetListHashData(_param, "getBoarderList");

            if (_list.Count > 0)
            {
                NoticeTitle.Text        = _cu.rtnHtS(_list[0]["TITLE"]);
                NoticeBody.DocumentText = _cu.rtnHtS(_list[0]["CONTEXT"]);

                NoticeName.Text = _cu.rtnHtS(_list[0]["NAME"]);
                NoticeDay.Text  = _cu.ToYYYYMMDD(_cu.rtnHtS(_list[0]["REGI_DT"]), true);

                lvFileList.View        = View.Details;
                lvFileList.HeaderStyle = ColumnHeaderStyle.None;

                lvFileList.BeginUpdate();

                if (!_cu.rtnHtS(_list[0]["FILE_"]).Equals(""))
                {
                    ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_list[0]["FILE_ORIGIN"]));
                    lvi.SubItems.Add(_cu.rtnHtS(_list[0]["FILE_"]));
                    lvFileList.Items.Add(lvi);
                }

                if (!_cu.rtnHtS(_list[0]["FILE1_"]).Equals(""))
                {
                    ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_list[0]["FILE1_ORIGIN"]));
                    lvi.SubItems.Add(_cu.rtnHtS(_list[0]["FILE1_"]));
                    lvFileList.Items.Add(lvi);
                }

                if (!_cu.rtnHtS(_list[0]["FILE2_"]).Equals(""))
                {
                    ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_list[0]["FILE2_ORIGIN"]));
                    lvi.SubItems.Add(_cu.rtnHtS(_list[0]["FILE2_"]));
                    lvFileList.Items.Add(lvi);
                }

                if (!_cu.rtnHtS(_list[0]["FILE3_"]).Equals(""))
                {
                    ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_list[0]["FILE3_ORIGIN"]));
                    lvi.SubItems.Add(_cu.rtnHtS(_list[0]["FILE3_"]));
                    lvFileList.Items.Add(lvi);
                }

                if (!_cu.rtnHtS(_list[0]["FILE4_"]).Equals(""))
                {
                    ListViewItem lvi = new ListViewItem(_cu.rtnHtS(_list[0]["FILE4_ORIGIN"]));
                    lvi.SubItems.Add(_cu.rtnHtS(_list[0]["FILE4_"]));
                    lvFileList.Items.Add(lvi);
                }

                lvFileList.EndUpdate();
            }
        }