public education_board()
        {
            InitializeComponent();
            PageNavigation.CurrentPage = this; // 페이지 네비게이트 현재페이지 저장용

            ft = Main.ft;
            Main.getEducationBoard(this);
            ebo = this;

            scon = App.scon;
            // 크기 자동 조절

            DataTable dataTable = getDBtable();

            pagin_Max_RowCount = dataTable.Rows.Count;
            //최대페이지 계산
            if (pagin_Max_RowCount % paging_NoOfRecPerPage == 0)
            {
                lbMaxRowCount.Content = pagin_Max_RowCount / paging_NoOfRecPerPage;
            }
            else
            {
                lbMaxRowCount.Content = pagin_Max_RowCount / paging_NoOfRecPerPage + 1;
            }
            firstSetTable();

            gridAssignment1.Columns[6].Visibility = Visibility.Collapsed;
        }
        private void button6_Click(object sender, RoutedEventArgs e)
        {
            education_board ebo = new education_board();

            Main.pageNavigation.PushBack(this);
            Main.pageNavigation.preClear();
            Main.pageFade.ShowPage(ebo);
        }
        private void button6_Click(object sender, RoutedEventArgs e)
        {

            education_board ebo_page = new education_board();
            Main.pageNavigation.PushBack(this);
            Main.pageNavigation.preClear();

            Main.pageFade.ShowPage(ebo_page);
        }
        private void button6_Click(object sender, RoutedEventArgs e)
        {
            gridAssignment1.Columns[6].Visibility = Visibility.Collapsed;
            education_board ebo = new education_board();

            Main.pageNavigation.PushBack(this);
            Main.pageNavigation.preClear();
            Main.pageFade.ShowPage(ebo);
        }
        public education_board()
        {
            InitializeComponent();
            PageNavigation.CurrentPage = this; // 페이지 네비게이트 현재페이지 저장용

            ft = Main.ft;
            Main.getEducationBoard(this);
            ebo = this;

            scon = App.scon;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
            // 크기 자동 조절                                                                                                                              

            DataTable dataTable = getDBtable();
            pagin_Max_RowCount = dataTable.Rows.Count;
            //최대페이지 계산
            if(pagin_Max_RowCount%paging_NoOfRecPerPage == 0)
                lbMaxRowCount.Content = pagin_Max_RowCount/paging_NoOfRecPerPage ;
            else
                lbMaxRowCount.Content = pagin_Max_RowCount / paging_NoOfRecPerPage +1;
            firstSetTable();

            gridAssignment1.Columns[6].Visibility = Visibility.Collapsed;

        }
Beispiel #6
0
 public static void getEducationBoard(education_board handle) //게시판 페이지에 접근하기 위한 핸들 받아오기
 {
     education = handle;
 }
 public static void getEducationBoard(education_board handle) //게시판 페이지에 접근하기 위한 핸들 받아오기
 {
     education = handle;
 }
        private void enter_Click(object sender, RoutedEventArgs e)
        {
            if (filpath != "")
            {
                FileInfo send_file = new FileInfo(filpath);

                txtExtHelper.OpenFile(filpath);
                IOfficeFile ioffice = txtExtHelper.get_file();

                txtExtHelper.ShowContentsFunc(ioffice);

                IWordFile wordfile = txtExtHelper.getwordFile();
                string    curDoc   = wordfile.ParagraphText; //텍스트 추출~

                curDoc = curDoc.Replace("\r\n", "");

                int firstIndex = curDoc.IndexOf("및 동기") + "및 동기".Length; //첫번째 인덱스 구하기
                int lastIndex  = curDoc.LastIndexOf("개발 환경  및");
                if (lastIndex == -1)
                {
                    lastIndex = curDoc.LastIndexOf("개발 환경및");
                }

                if (lastIndex == -1)
                {
                    lastIndex = curDoc.LastIndexOf("개발 환경 및");
                }

                string descString = curDoc.Substring(firstIndex, lastIndex - firstIndex);
                descString = descString.Replace("'", "");
                Console.WriteLine(descString.Length);

                txtExtHelper.CloseFile();

                //파일 정보 메시지 작성하기, 파일이름, 파일크기
                string msg = "CTOC_FILE_TRANS_INFO\a" + send_file.Name + "\a" + send_file.Length.ToString();
                //파일전송에 필요한 정보, 파일이름, 파일크기


                Console.WriteLine("디비열엄");
                string name = titleTxt.Text.ToString();

                string type = comboBox1.Text;
                string des  = descrip.Text.ToString();

                string sDate = start.Text.ToString();
                string eDate = end.Text.ToString();

                string field    = comboBox2.Text;
                string plat     = comboBox3.Text;
                string is_used  = "대기중";
                int    status   = 1;
                int    startIdx = 0;
                int    endIdx   = 1;
                //string path = lbFilePath.Content.ToString();
                string path = send_file.Name;
                int    idx  = 1;

                // file 이름

                string sendData = "CTOC_SEND_SQL_AND_File_Trans\a" + name + "\a" + type + "\a" + des + "\a" +
                                  sDate + "\a" + eDate + "\a" + status + "\a" + startIdx + "\a" + endIdx + "\a" +
                                  plat + "\a" + is_used + "\a" + path + "\a" + descString + "\a" + send_file.Name + "\a" + send_file.Length.ToString();

                this.ft.Send(sendData);
                this.ft.file_info = send_file;
                Thread.Sleep(300);

                education_board ebo = new education_board();
                Main.pageNavigation.PushBack(this);
                Main.pageNavigation.preClear();
                Main.pageFade.ShowPage(ebo);
            }
            else
            {
                MessageBox.Show("파일을 선택해주세요");
            }
        }
        private void enter_Click(object sender, RoutedEventArgs e)
        {
            
            if (filpath != "")
            {
                FileInfo send_file = new FileInfo(filpath);

                txtExtHelper.OpenFile(filpath);
                IOfficeFile ioffice = txtExtHelper.get_file();

                txtExtHelper.ShowContentsFunc(ioffice);

                IWordFile wordfile = txtExtHelper.getwordFile();
                string curDoc = wordfile.ParagraphText; //텍스트 추출~ 
                
                curDoc = curDoc.Replace("\r\n","");

                int firstIndex = curDoc.IndexOf("및 동기") + "및 동기".Length; //첫번째 인덱스 구하기
                int lastIndex = curDoc.LastIndexOf("개발 환경  및");
                if (lastIndex == -1)
                {
                    lastIndex = curDoc.LastIndexOf("개발 환경및");
                }

                if (lastIndex == -1)
                {
                    lastIndex = curDoc.LastIndexOf("개발 환경 및");
                }

                string descString = curDoc.Substring(firstIndex, lastIndex - firstIndex);
                descString = descString.Replace("'", "");
                Console.WriteLine(descString.Length);

                txtExtHelper.CloseFile();

                //파일 정보 메시지 작성하기, 파일이름, 파일크기
                string msg = "CTOC_FILE_TRANS_INFO\a" + send_file.Name + "\a" + send_file.Length.ToString();
                //파일전송에 필요한 정보, 파일이름, 파일크기


                Console.WriteLine("디비열엄");
                string name = titleTxt.Text.ToString();

                string type = comboBox1.Text;
                string des = descrip.Text.ToString();

                string sDate = start.Text.ToString();
                string eDate = end.Text.ToString();

                string field = comboBox2.Text;
                string plat = comboBox3.Text;
                string is_used = "대기중";
                int status = 1;
                int startIdx = 0;
                int endIdx = 1;
                //string path = lbFilePath.Content.ToString();
                string path = send_file.Name;
                int idx = 1;

                // file 이름

                string sendData = "CTOC_SEND_SQL_AND_File_Trans\a" + name + "\a" + type + "\a" + des + "\a" +
                    sDate + "\a" + eDate + "\a" + status + "\a" + startIdx + "\a" + endIdx + "\a" +
                        plat + "\a" + is_used + "\a" + path + "\a" + descString + "\a"+ send_file.Name + "\a" + send_file.Length.ToString() ;
                
                this.ft.Send(sendData);
                this.ft.file_info = send_file;
                Thread.Sleep(300);

                education_board ebo = new education_board();
                Main.pageNavigation.PushBack(this);
                Main.pageNavigation.preClear();
                Main.pageFade.ShowPage(ebo);
            }
            else
            {
                MessageBox.Show("파일을 선택해주세요");
            }
            
        }
 private void button6_Click(object sender, RoutedEventArgs e)
 {
     gridAssignment1.Columns[6].Visibility = Visibility.Collapsed;
     education_board ebo = new education_board();
     Main.pageNavigation.PushBack(this);
     Main.pageNavigation.preClear();
     Main.pageFade.ShowPage(ebo);
 }