Ejemplo n.º 1
0
        private void buttonExport_Click(object sender, EventArgs e)
        {
            UseWaitCursor = true;
            Application.DoEvents();

            try
            {
                if (writServiceReceipt == null)
                {
                    writServiceReceipt = new WritServiceReceipt();

                    writServiceReceipt.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
                }
                writServiceReceipt.Status = 1;
                SaveData();
                WordDocument doc = new WordDocument("文书送达回执");
                doc.AddField("DocTitle", writServiceReceipt.DocTitle);
                doc.AddField("CaseName", writServiceReceipt.CaseName);
                doc.AddField("ServiceCompany", writServiceReceipt.ServiceCompany);
                doc.AddField("DocManageArea", writServiceReceipt.DocManageArea);
                doc.AddField("Note", writServiceReceipt.Note);

                Grid grid = doc.NewGrid();
                grid.TableMark = "Table";
                foreach (WritServiceReceiptItem sc in writServiceReceipt.Items)
                {
                    GridRow row = grid.NewRow();
                    row.AddRowItem(sc.WritName);
                    row.AddRowItem(sc.Recipient);
                    row.AddRowItem(sc.ServiceDate.ToString("yyyy年M月d日"));
                    row.AddRowItem(sc.ServiceAddress);
                    row.AddRowItem(sc.ServiceWay);
                    row.AddRowItem(sc.ServicePerson);
                }

                OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt",
                    new object[] { doc, "EnforceForm.frmWritServiceReceipts", writServiceReceipt.FilePath }));
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
Ejemplo n.º 2
0
        private void SaveData()
        {
            if (writServiceReceipt == null)
            {
                writServiceReceipt = new WritServiceReceipt();

                writServiceReceipt.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }

            writServiceReceipt.Items.Clear();
            foreach (DataGridViewRow row in enforceLawGridViewItems.Rows)
            {
                if (row.Tag != null)
                    writServiceReceipt.Items.Add(row.Tag as WritServiceReceiptItem);
            }

            GetEntity(writServiceReceipt);

            InvokeUtil.SystemService.EntityUpdate(writServiceReceipt);
        }
Ejemplo n.º 3
0
 public frmWritServiceReceipt(WritServiceReceipt writServiceReceipt)
     : this()
 {
     this.writServiceReceipt = writServiceReceipt;
 }
Ejemplo n.º 4
0
        private void frmWritServiceReceipt_Load(object sender, EventArgs e)
        {
            UseWaitCursor = true;
            Application.DoEvents();

            try
            {
                DocTitle.Text = InvokeUtil.ActiveUser.Abb + "安监管回〔" + DateTime.Now.Year + "〕1 号";
                DocManageArea.Text = InvokeUtil.ActiveUser.FullName ;

                enforceLawGridViewItems.InitColumnType<WritServiceReceiptItem>();
                CaseName.Items.Clear();
                List<SearchWord> Words = InvokeUtil.SystemService.SearchWordGetAll(typeof(PutOnRecord).FullName);
                foreach (SearchWord word in Words)
                {
                    CaseName.Items.Add(new AutoCompleteEntry(word.Words, word, word.ToIndexArray()));
                }
                ServiceCompany.Items.Clear();
                Words = InvokeUtil.SystemService.SearchWordGetAll(typeof(Company).FullName);
                foreach (SearchWord word in Words)
                    ServiceCompany.Items.Add(new AutoCompleteEntry(word.Words, word, word.ToIndexArray()));

                if (writServiceReceipt != null)
                {
                    writServiceReceipt = InvokeUtil.SystemService.EntityInit(writServiceReceipt) as WritServiceReceipt;
                    SetEntity(writServiceReceipt);
                    enforceLawGridViewItems.Bind<WritServiceReceiptItem>(writServiceReceipt.Items);
                }
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }