Exemple #1
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            UpFile objsh2 = new UpFile();

            objsh2 = objsh2.Retrieveq(comboBox1.Text);

            label1.Text          = "公文標題:" + objsh2.GetFileTitle();
            progressBar1.Maximum = 4;
            progressBar1.Value   = Convert.ToInt32(objsh2.GetFileStatus()) + 1;
            ModifyProgressBarColor.SetState(progressBar1, 1);
            if (objsh2.GetFileStatus().Equals("0"))
            {
                label2.Text = "目前狀態:公文以上傳審核中";
            }
            else if (objsh2.GetFileStatus().Equals("1"))
            {
                ModifyProgressBarColor.SetState(progressBar1, 2);
                label2.Text = "目前狀態:公文被退件請修正";
            }
            else if (objsh2.GetFileStatus().Equals("2"))
            {
                label2.Text = "目前狀態:公文已通過待歸檔";
            }
            else if (objsh2.GetFileStatus().Equals("3"))
            {
                label2.Text = "目前狀態:公文已歸檔";
            }
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                UpFile u = new UpFile();
                u.SetFileNumber(comboBox2.Text);
                u.SetFileTitle(textBox3.Text);
                u.SetFileContent(textBox2.Text);
                u.SetFileStatus("0");

                if (u.UpfdateFileInfo(u))
                {
                    MessageBox.Show("更新公文編號:" + comboBox2.Text + "成功");
                    textBox1.Text = "";
                    textBox2.Text = "";
                    textBox3.Text = "";
                }
                else
                {
                    MessageBox.Show("更新公文編號:" + comboBox2.Text + " 失敗");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            UpFile u2 = new UpFile();

            u2             = u2.Retrieveq(comboBox2.Text);
            textBox1.Text  = u2.GetFileContent();
            label1.Text    = "公文標題:" + u2.GetFileTitle();
            label6.Text    = "需修改內容:" + u2.GetFFixContent();
            comboBox1.Text = "";
            comboBox2.Text = "";
        }
Exemple #3
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            UpFile objsh2 = new UpFile();

            objsh2 = objsh2.Retrieveq(comboBox1.Text);

            label3.Text   = "公文標題:" + objsh2.GetFileTitle();
            textBox2.Text = objsh2.GetFileContent();
        }
Exemple #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            UpFile objsh = new UpFile();

            objsh = objsh.Retrieveq(comboBox1.Text);
            MessageBox.Show(objsh.GetFileContent(), "公文內容",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Asterisk);
        }
Exemple #5
0
        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            UpFile u = new UpFile();

            u             = u.Retrieveq(comboBox2.Text);
            textBox1.Text = u.GetFileContent();
            label1.Text   = "公文標題:" + u.GetFileTitle();
            label6.Text   = "需修改內容:" + u.GetFFixContent();
        }
Exemple #6
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            UpFile u = new UpFile();

            u = u.Retrieveq(comboBox1.Text);
            comboBox1.DataSource = u.retrieveAllFile();
            label1.Text          = "公文標題:" + u.GetFileTitle();
            label2.Text          = "上傳日期:" + u.GetUpD();
            label3.Text          = "上傳時間:" + u.GetUpT();
            textBox1.Text        = u.GetFileContent();
        }
Exemple #7
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox1.SelectedIndex.Equals(0))
            {
                UpFile u = new UpFile();
                u.SetFileStatus("0");
                comboBox2.DataSource = u.retrieveAllFile();
                u             = u.Retrieveq(comboBox2.Text);
                textBox1.Text = u.GetFileContent();
            }


            else
            {
                UpFile u = new UpFile();
                u.SetFileStatus("1");
                comboBox2.DataSource = u.retrieveAllFile();

                u             = u.Retrieveq(comboBox2.Text);
                textBox1.Text = u.GetFileContent();
            }
        }