Exemple #1
0
        void DoPrintDocumentPackage(object claimObj)
        {
            var    claim    = (Claim)claimObj;
            string filePath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)
                              + "\\Admission\\TemporaryDocuments";
            string fileNamePart = string.Format("{0}_{1}", claim.Number, DateTime.Now.ToString("dd.MM.yyyy hh-mm-ss"));

            System.IO.Directory.CreateDirectory(filePath);

            var commonDoc = new MissingDocument();

            var    titlePage    = new DocumentTitlePage(claim);
            string titlePageStr = string.Format("{0}\\titlePage_{1}.doc", filePath, fileNamePart);

            titlePage.Save(titlePageStr);
            commonDoc.InsertFromFile(titlePageStr);
            commonDoc.InsertBreak();

            var    enrollmentAgreement    = new DocumentEnrollmentAgreementClaim(claim);
            string enrollmentAgreementStr = string.Format("{0}\\enrollmentAgreement_{1}.doc", filePath, fileNamePart);

            enrollmentAgreement.Save(enrollmentAgreementStr);
            commonDoc.InsertFromFile(enrollmentAgreementStr);
            commonDoc.InsertBreak();

            var    voucher    = new DocumentVoucher(claim);
            string voucherStr = string.Format("{0}\\voucher_{1}.doc", filePath, fileNamePart);

            voucher.Save(voucherStr);
            commonDoc.InsertFromFile(voucherStr);
            commonDoc.InsertBreak();

            if (claim.IsHostelNeed ?? false)
            {
                var    hostelClaim    = new DocumentHostelClaim(claim);
                string hostelClaimStr = string.Format("{0}\\hostelClaim_{1}.doc", filePath, fileNamePart);
                hostelClaim.Save(hostelClaimStr);
                commonDoc.InsertFromFile(hostelClaimStr);
                commonDoc.InsertBreak();
            }

            if (claim.EntranceIndividualAchievements.Count > 0)
            {
                var    indAch    = new DocumentIndividualAchievementsProtocol(claim);
                string indAchStr = string.Format("{0}\\indAch_{1}.doc", filePath, fileNamePart);
                indAch.Save(indAchStr);
                commonDoc.InsertFromFile(indAchStr);
                commonDoc.InsertBreak();
            }
            commonDoc.Show();
        }
Exemple #2
0
        void PrintEnrollAgreementClaim()
        {
            var doc = new DocumentEnrollmentAgreementClaim(SelectedClaim);

            doc.Show();
        }