private void Print_OnAttachExport(object sender, EventArgs e)
        {
            if (m_print == null || m_Entity == null) return;
            Print print = new Print();

            print.SetPrintAttachExport(m_print, m_Entity);
        }
        private void Print_OnBeginExport(object sender, EventArgs e)
        {
            if (m_print == null || m_print.m_ls == null || m_print.m_ls.Count == 0) return;
            Print print = new Print();

            m_Entity = m_print.m_CurrEntity as EntityLetterSend;
            print.SetPrintBeginExport(m_print, m_Entity);
        }
 private void ucPrint_OnAttachExport(object sender, EventArgs e)
 {
     Print print = new Print();
     EntityLetterSend cEntity = null;
     if (base.IsPreview)
     {
         cEntity = base.EntityData != null ? base.EntityData as EntityLetterSend : new EntityLetterSend();
     }
     else
     {
         cEntity = this.ControlToEntity(false) as EntityLetterSend;
     }
     print.SetPrintBeginExport(ucPrint, cEntity);
 }
 private void ucPrint_OnBeginExport(object sender, EventArgs e)
 {
     //string sRes = "";
     //this.Devolve(out sRes);
     Print print = new Print();
     //EntityLetterSend entity = base.EntityData != null ? base.EntityData as EntityLetterSend : new EntityLetterSend();
     EntityLetterSend cEntity = null;
     if (base.IsPreview)
     {
         cEntity = base.EntityData != null ? base.EntityData as EntityLetterSend : new EntityLetterSend();
     }
     else
     {
         cEntity = this.ControlToEntity(false) as EntityLetterSend;
     }
     print.SetPrintBeginExport(ucPrint, cEntity);
 }
        private void Print_OnExtraExport(object sender, EventArgs e)
        {
            if (m_print == null || m_Entity == null) return;
            Print print = new Print();
            switch (m_print.FileName)
            {
                case "函件发文表单":
                    m_print.BatchAddPicture("函件发文", "函件发文表单", m_Entity);
                    break;
            }

            if (this.IsPreview)
            {
                //m_Entity = ControlToEntity(false) as EntityLetterSend;
            }
            else
            {
                m_Entity = ControlToEntity(false) as EntityLetterSend;
            }

            if (m_Entity.jinJi)
            {
                m_print.WriteByFont(0x0052, 2, "Wingdings 2");
            }
            else
            {
                m_print.WriteByFont(0x00A3, 2, "Wingdings 2");
            }
            if (m_Entity.huiZhi)
            {
                m_print.WriteByFont(0x0052, 1, "Wingdings 2");
            }
            else
            {
                m_print.WriteByFont(0x00A3, 1, "Wingdings 2");
            }

            ArrayList al = new ArrayList();
            for (int i = 0; i < m_Entity.FileList.Count; i++)
            {
                ArrayList tmp = new ArrayList();
                tmp.Add((i + 1).ToString());
                tmp.Add(m_Entity.FileList[i].Alias + "." + m_Entity.FileList[i].Type);
                tmp.Add(m_Entity.FileList[i].Encode/* + "  " + m_Entity.FileList[i].Edition*/);
                tmp.Add(m_Entity.FileList[i].iPage);
                al.Add(tmp);
            }
            m_print.WriteTable(1, 1, al);
        }