public virtual ActionResult GetReportAllCouncil()
        {
            string _lanFile = Server.MapPath("~/Reports/fa.xml");

            if (System.IO.File.Exists(_lanFile))
            {
                StiConfig.LoadLocalization(_lanFile);
            }

            string     searcvalue = (string)TempData["searcvalue"];
            SearchType searchtype = (SearchType)TempData["searchtype"];

            var query = _reportsService.PrintCouncilAll(searcvalue, searchtype);

            if (query == null)
            {
                return(View(MVC.Errors.Views.Error));
            }
            var mainreport = new StiReport();

            mainreport.RegBusinessObject("CommissionAllData", query.PRequestAllDataModels);
            mainreport.RegBusinessObject("Signers", null);
            mainreport.RegBusinessObject("MemberDetails", query.PMemberDetailsModel);
            mainreport.Load(Server.MapPath("~/Reports/ReportAllCouncil.mrt"));

            mainreport.Render(true);
            mainreport.Compile();
            mainreport["NumberPrint"] = "1";
            mainreport["DatePrint"]   = DateTime.Now;
            mainreport["LogoPrint"]   = _reportsService.GetLogoUrl(new AddressUrlFile(Server.MapPath("~/")));
            //return StiMvcViewer.GetReportSnapshotResult(HttpContext, mainreport);
            return(StiMvcViewerFx.GetReportSnapshotResult(mainreport));
        }
        public virtual ActionResult GetReportCouncil()
        {
            string _lanFile = Server.MapPath("~/Reports/fa.xml");

            if (System.IO.File.Exists(_lanFile))
            {
                StiConfig.LoadLocalization(_lanFile);
            }
            var idrequest = (long)TempData["RequestId"];
            var query     = _reportsService.PrintCouncil(idrequest, new AddressUrlFile(Server.MapPath("~/")));

            if (query == null)
            {
                return(View(MVC.Errors.Views.Error));
            }
            var mainreport = new StiReport();

            mainreport.RegBusinessObject("RequestData", query.PRequestDataModel);
            mainreport.RegBusinessObject("Signers", query.PSignersModel);
            mainreport.RegBusinessObject("MemberDetails", query.PMemberDetailsModel.OrderBy(f => f.RowNumber).Take(6).ToList());
            mainreport.RegBusinessObject("StudentInformation", query.PStudentInformationModel);
            mainreport.Load(Server.MapPath("~/Reports/ReportCouncil.mrt"));

            mainreport.Render(true);
            mainreport.Compile();


            mainreport["NumberPrint"] = "1";
            mainreport["DatePrint"]   = DateTime.Now;
            mainreport["LogoPrint"]   = _reportsService.GetLogoUrl(new AddressUrlFile(Server.MapPath("~/")));

            //return StiMvcViewer.GetReportSnapshotResult(HttpContext, mainreport);
            return(StiMvcViewerFx.GetReportSnapshotResult(mainreport));
        }
        public virtual ActionResult GetReportCommission()
        {
            var lanFile = new AddressUrlFile(Server.MapPath("~/"));

            if (System.IO.File.Exists(lanFile.Localizationfa))
            {
                StiConfig.LoadLocalization(lanFile.Localizationfa);
            }
            var idrequest = (long)TempData["RequestId"];
            var query     = _reportsService.PrintCommission(idrequest, new AddressUrlFile(Server.MapPath("~/")));

            if (query == null)
            {
                return(View(MVC.Errors.Views.Error));
            }

            //StiReport report = new StiReportCompiledClass();
            var mainreport = new StiReport();

            mainreport.RegBusinessObject("RequestData", query.PRequestDataModel);
            mainreport.RegBusinessObject("Signers", query.PSignersModel);
            mainreport.RegBusinessObject("MemberDetails", query.PMemberDetailsModel.OrderBy(f => f.RowNumber).Take(6).ToList());
            //query.PSpecialEducationModel.Add(new PSpecialEducationModel { Id = 3, Name = "زایمان", State = true });
            mainreport.RegBusinessObject("SpecialEducation", query.PSpecialEducationModel.ToList());
            mainreport.RegBusinessObject("StudentInformation", query.PStudentInformationModel);

            mainreport.Load(Server.MapPath("~/Reports/ReportCommission.mrt"));

            mainreport.Render(true);
            mainreport.Compile();
            mainreport["NumberPrint"] = "1";
            mainreport["LogoPrint"]   = _reportsService.GetLogoUrl(new AddressUrlFile(Server.MapPath("~/")));
            mainreport["DatePrint"]   = DateTime.Now;
            return(StiMvcViewerFx.GetReportSnapshotResult(mainreport));
        }
        public MainPage()
        {
            #region Load Localizations
            var asm = System.Reflection.Assembly.GetExecutingAssembly();

            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ar.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.be.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.bg.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.cro.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.cz.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.de.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.en.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.es.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.fa.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.fr.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.hu.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.it.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ka.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.lt.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.nl.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.pl.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.pt-BR.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ro.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ru.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ser.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.sk.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.sv.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.tr.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ua.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.zh-CHS.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.zh-CHT.xml");
            #endregion

            // Set Localization
            StiSettings.Set("Localization", "Current", "de");

            InitializeComponent();
        }
Пример #5
0
        public MainPage()
        {
            #region Load Localizations
            var asm = System.Reflection.Assembly.GetExecutingAssembly();

            StiConfig.LoadLocalization(asm, "Demo.Localization.ar.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.be.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.bg.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.cro.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.cz.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.de.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.en.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.es.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.fa.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.fr.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.hu.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.it.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.ka.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.lt.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.nl.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.pl.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.pt-BR.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.ro.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.ru.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.ser.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.sk.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.sv.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.tr.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.ua.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.zh-CHS.xml");
            StiConfig.LoadLocalization(asm, "Demo.Localization.zh-CHT.xml");
            #endregion

            InitializeComponent();
            ReadReportsInfo();
        }