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

            try
            {
                if (spotHandelDesision == null)
                {
                    spotHandelDesision = new SpotHandelDesision();

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

                spotHandelDesision.Status = 1;

                SaveData();
                WordDocument doc = new WordDocument("现场处理措施决定书");
                doc.AddField("DocTitle", spotHandelDesision.DocTitle);
                doc.AddField("CompanyName", spotHandelDesision.CompanyName);
                doc.AddField("CheckDate", spotHandelDesision.CheckDate.ToString("yyyy年MM月dd日"));
                doc.AddField("Violations", spotHandelDesision.Violations);
                doc.AddField("LegalBasis", spotHandelDesision.LegalBasis);
                doc.AddField("SitHandel", spotHandelDesision.SitHandel);
                doc.AddField("GovArea", spotHandelDesision.GovArea);
                doc.AddField("ManageArea", spotHandelDesision.ManageArea);
                doc.AddField("CourtArea", spotHandelDesision.CourtArea);
                doc.AddFootField("DocManageArea", spotHandelDesision.DocManageArea);
                doc.AddFootField("OfficerName1", spotHandelDesision.OfficerName1);
                doc.AddFootField("CID1", spotHandelDesision.CID1);
                doc.AddFootField("OfficerName2", spotHandelDesision.OfficerName2);
                doc.AddFootField("CID2", spotHandelDesision.CID2);

                //OutputDocuemnt frm = new OutputDocuemnt(doc);
                //frm.OpenWindow(this);
                OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt",
                    new object[] { doc, "EnforceForm.frmSpotHandelDesisions", spotHandelDesision.FilePath }));
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
Esempio n. 2
0
 public frmSpotHandelDesision(SpotHandelDesision spotHandelDesision)
     : this()
 {
     this.spotHandelDesision = spotHandelDesision;
 }
Esempio n. 3
0
 public frmSpotHandelDesision(object obj)
     : this()
 {
     this.spotHandelDesision = (SpotHandelDesision)obj;
 }
Esempio n. 4
0
        private void SaveData()
        {
            if (spotHandelDesision == null)
            {
                spotHandelDesision = new SpotHandelDesision();

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

            GetEntity(spotHandelDesision);

            Company company = new Company
            {
                CompanyName = CompanyName.Text,
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);

            Officers officer1 = new Officers { OfficersName = OfficerName1.Text, CID = CID1.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer1);

            Officers officer2 = new Officers { OfficersName = OfficerName2.Text, CID = CID2.Text };
            InvokeUtil.SystemService.UpdateOfficersByArgs(officer2);

            InvokeUtil.SystemService.EntityUpdate(spotHandelDesision);
        }