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

            try
            {
                if (hearingNotice == null)
                {
                    hearingNotice = new HearingNotice();

                    hearingNotice.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
                }
                hearingNotice.Status = 1;
                SaveData();
                WordDocument doc = new WordDocument("听证会通知书");
                doc.AddField("DocTitle", hearingNotice.DocTitle);
                doc.AddField("Informant", hearingNotice.Informant);
                doc.AddField("About", hearingNotice.About);
                doc.AddField("HearDate", hearingNotice.HearDate.ToString("yyyy年M月d日 H时 m分"));
                doc.AddField("HearAddress", hearingNotice.HearAddress);
                doc.AddField("CompereName", hearingNotice.CompereName);
                doc.AddField("CompereJob", hearingNotice.CompereJob);
                doc.AddField("HearName1", hearingNotice.HearName1);
                doc.AddField("HearJob1", hearingNotice.HearJob1);
                doc.AddField("HearName2", hearingNotice.HearName2);
                doc.AddField("HearJob2", hearingNotice.HearJob2);
                doc.AddField("SecretaryName", hearingNotice.SecretaryName);
                doc.AddField("SecretaryJob", hearingNotice.SecretaryJob);
                doc.AddFootField("DocManageArea", hearingNotice.DocManageArea);
                doc.AddFootField("DocManageArea1", hearingNotice.DocManageArea.Replace("(公章)", ""));
                OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt",
                    new object[] { doc, "EnforceForm.frmHearingNotices", hearingNotice.FilePath }));
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
Exemplo n.º 2
0
        private void SaveData()
        {
            if (hearingNotice == null)
            {
                hearingNotice = new HearingNotice();

                hearingNotice.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }
            GetEntity(hearingNotice);

            Officers officer1 = new Officers { OfficersName = HearName1.Text, Position = HearJob1.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);

            Officers officer2 = new Officers { OfficersName = HearName2.Text, Position = HearJob2.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);

            Officers officer3 = new Officers { OfficersName = CompereName.Text, Position = CompereJob.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer3);

            Officers officer4 = new Officers { OfficersName = SecretaryName.Text, Position = SecretaryJob.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer4);

            if (Informant.SelectedValue != null)
            {
                SearchWord searchWord = Informant.SelectedValue as SearchWord;
                Company company = searchWord.ToObject<Company>();
                hearingNotice.CompanyID = company.CompanyID;
            }

            InvokeUtil.SystemService.EntityUpdate(hearingNotice);
        }
Exemplo n.º 3
0
 public frmHearingNotice(HearingNotice hearingNotice)
     : this()
 {
     this.hearingNotice = hearingNotice;
 }
Exemplo n.º 4
0
 public frmPutDown(HearingNotice hearingNotice)
     : this()
 {
     this.hearingNotice = hearingNotice;
 }