Ejemplo n.º 1
0
        //生成电子案卷
        void tsbtnscdzaj_Click(object sender, EventArgs e)
        {
            if (dgvYj.CurrentCell != null)
            {
                DialogResult result = MessageBox.Show("此操作将对整个案卷进行转换\t\n\t\n确认要执行此操作?",
                                                      "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                if (result == DialogResult.OK)
                {
                    int FileID = bz_yj.getFileID(DocID);

                    try
                    {
                        //UI.PdfMerger.BianZhi_Merger merger =
                        //    new Archives.UI.PdfMerger.BianZhi_Merger(BZ_Input.TopClassID, FileID);
                        //merger.ShowDialog();
                        //if (merger.DialogResult == DialogResult.OK)
                        //{
                        //    merger.Close();
                        //}

                        PdfMerger.PdfMergerCommand pdfmerger = new PdfMerger.PdfMergerCommand(UIPublicClass.Enum.ArchivesType.编制档案);
                        pdfmerger.MakePdf(FileID);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        //生成电子案卷
        void tsbtnscdzaj_Click(object sender, EventArgs e)
        {
            if (dgvFile.CurrentCell != null)
            {
                if (dgvFile.SelectedRows.Count > 0)
                {
                    System.Collections.ArrayList list = new System.Collections.ArrayList();
                    for (int i = 0; i < dgvFile.SelectedRows.Count; i++)
                    {
                        object FileID = dgvFile.SelectedRows[i].Cells["案卷ID"].Value;
                        if (!Object.Equals(FileID, null) && !Object.Equals(FileID, string.Empty) && !Object.Equals(FileID, DBNull.Value))
                        {
                            object FileNum = dgvFile.SelectedRows[i].Cells["案卷号"].Value;
                            if (!Object.Equals(FileNum, null) && !Object.Equals(FileNum, string.Empty) && !Object.Equals(FileNum, DBNull.Value))
                            {
                                list.Add(FileNum);
                            }
                        }
                    }
                    if (list.Count > 0)
                    {
                        //案卷号进行排序
                        list.Sort();

                        int FromFile = (int)list[0];
                        int ToFile   = (int)list[list.Count - 1];

                        try
                        {
                            //UI.PdfMerger.BianZhi_Merger merger =
                            //    new Archives.UI.PdfMerger.BianZhi_Merger(ContentID, FromFile, ToFile);
                            //merger.ShowDialog();
                            //if (merger.DialogResult == DialogResult.OK)
                            //{
                            //    merger.Close();
                            //}

                            PdfMerger.PdfMergerCommand pdfmerger = new PdfMerger.PdfMergerCommand(UIPublicClass.Enum.ArchivesType.编制档案);
                            pdfmerger.MakePdf(ContentID, FromFile, ToFile);
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                }
                else
                {
                    MessageBox.Show("请选择一行或多行需要转换电子案卷的信息!",
                                    "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
Ejemplo n.º 3
0
        //生成电子案卷
        void tsbtnscdzaj_Click(object sender, EventArgs e)
        {
            if (dgvDoc.CurrentCell != null)
            {
                DialogResult result = MessageBox.Show("此操作将对整个案卷进行转换\t\n\t\n确认要执行此操作?",
                                                      "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                if (result == DialogResult.OK)
                {
                    //UI.PdfMerger.OldCj_Merger merger =
                    //    new Archives.UI.PdfMerger.OldCj_Merger(deptID, FileID);
                    //merger.ShowDialog();
                    //if (merger.DialogResult == DialogResult.OK)
                    //{
                    //    merger.Close();
                    //}


                    PdfMerger.PdfMergerCommand pdfmerger = new PdfMerger.PdfMergerCommand(UIPublicClass.Enum.ArchivesType.城建档案旧);
                    pdfmerger.MakePdf(FileID);
                }
            }
        }