コード例 #1
0
        private void CreateReportandSaveToDB(string schoolYear, string schoolCode, string publishCycle, string GoalType, string schoolName, string schoolNameB)
        {
            string reportName = WebConfig.getValuebyKey("PublishDocumentName");

            string userID = WorkingProfile.UserID;


            string publishDate = DateFC.YMD(DateTime.Now);

            Byte[] pdfReport = ReportRender.GetOneReport(reportName, userID, schoolYear, schoolCode, "1");

            string result = UploadFileToSharePointSite.PushToSite("SLIP", pdfReport, schoolYear, schoolCode, schoolName, schoolNameB);

            if (result == "Successful")
            {
                string action        = btnReturn.Text;
                string signOffResult = SignOff.Signature(action, userID, WorkingProfile.UserRole, schoolYear, schoolCode, "Publish", publishDate);
                // SaveSLIPPublishDataToHistoryDirectory(schoolCode + ".PDF", pdfReport);
                PushToSP.SaveFileToHistoryFolder(WorkingProfile.SchoolYear, schoolCode + ".PDF", pdfReport);
                errorlabel.Text      = "The School PLF has been published to School Web site.";
                errorlabel.ForeColor = Color.Red;
            }
            else
            {
                errorlabel.Text = "The School PLF published failed to School Web site.";
            }
        }
コード例 #2
0
 public static string PublishPLFtoSharePointSite(string type, byte[] result, string schoolYear, string schoolCode, string schoolName, string schoolNameB)
 {
     return(UploadFileToSharePointSite.PushToSite("SLIP", result, schoolYear, schoolCode, schoolName, schoolNameB));
 }