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

            try
            {
                if (putOnRecord == null)
                {
                    putOnRecord = new PutOnRecord();
                    putOnRecord.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
                }
                putOnRecord.Status = 1;
                SaveData();
                WordDocument doc = new WordDocument("立案审批表");
                doc.AddField("DocTitle", putOnRecord.DocTitle);
                doc.AddField("IllegalTypeName", putOnRecord.IllegalTypeName);
                doc.AddField("CaseSourceName", putOnRecord.CaseSourceName);
                doc.AddField("ThisDate", putOnRecord.ThisDate.ToString("yyyy年M月d日"));
                doc.AddField("CaseName", putOnRecord.CaseName);
                doc.AddField("CompanyName", putOnRecord.CompanyName);
                doc.AddField("PeoplePhone", putOnRecord.PeoplePhone);
                doc.AddField("PeopleCondition", putOnRecord.PeopleCondition);
                doc.AddField("PeopleAddress", putOnRecord.PeopleAddress);
                doc.AddField("PeopleZip", putOnRecord.PeopleZip);
                doc.AddField("CaseStatus", putOnRecord.CaseStatus);
                doc.AddField("UndertakerOpinion", putOnRecord.UndertakerOpinion);
                doc.AddField("UndertakerUserName1", putOnRecord.UndertakerUserName1);
                doc.AddField("UndertakerUserName2", putOnRecord.UndertakerUserName2);
                doc.AddField("UndertakerDataDay", putOnRecord.UndertakerData.Day.ToString());
                doc.AddField("UndertakerDataYear", putOnRecord.UndertakerData.Year.ToString());
                doc.AddField("UndertakerDataMonth", putOnRecord.UndertakerData.Month.ToString());
                //doc.AddFootField("FirstPageTest", "测试");
                //doc.AddFootField("Test", "测试");

                //OutputDocuemnt frm = new OutputDocuemnt(doc);
                //frm.OpenWindow(this);

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

            UseWaitCursor = false;
        }
Beispiel #2
0
 public frmPutOnRecord(PutOnRecord putOnRecord)
     : this()
 {
     this.putOnRecord = putOnRecord;
 }
Beispiel #3
0
        private void SaveData()
        {
            if (putOnRecord == null)
            {
                putOnRecord = new PutOnRecord();
                putOnRecord.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }

            GetEntity(putOnRecord);

            Company company = new Company
            {
                CompanyName = CompanyName.Text,
                CompanyAddress = PeopleAddress.Text,
                CompanyPost = PeopleZip.Text,
                Tel = PeoplePhone.Text
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);

            IllegalType illegalType = new IllegalType
            {
                TypeName = IllegalTypeName.Text,
            };
            InvokeUtil.SystemService.UpdateIllegalTypeByName(illegalType);

            CaseSource caseSource = new CaseSource
            {
                SourceName = CaseSourceName.Text,
            };
            InvokeUtil.SystemService.UpdateCaseSourceByName(caseSource);

            InvokeUtil.SystemService.EntityUpdate(putOnRecord);
        }