예제 #1
0
        public static Byte[] GetReport(OrderExtraReport report)
        {
            String Html = String.Concat(
                "<html>",
                "<head>",
                "<style>",
                "body {font-size:16}",
                ".id {text-align:center}",
                "</style>",
                "</head>",
                "<body>",
                "<span>", "Period:", report.Period, "</span>", "<br/>",
                "<span>", "Land Linq min:", report.LandVariable, "</span>", "<br/>",
                "Land:", "<br/>",
                "Avg size:", report.AvgLandSize, "<br/>",
                "Min size:", report.MinLandSize, "<br/>",
                "Max size:", report.MaxLandSize, "<br/>",
                "First date in period:", report.MinStartTime, "<br/>",
                "Last date in period:", report.MaxStartTime, "<br/>",
                "</body>",
                "</html>"
                );

            return(PdfSharpConvert(Html));
        }
예제 #2
0
        public OrderExtraReport GetExtraReport(int time, int size)
        {
            var Order = new OrderExtraReport();

            using (LD_kursEntities db = new LD_kursEntities())
            {
                int LandSize = 0;
                if (size == 3)
                {
                    LandSize = 500;
                }
                if (size == 2)
                {
                    LandSize = 1000;
                }

                var clientIdParameter = new SqlParameter("@minLandSize", LandSize);

                if (time == 3)
                {
                    Order        = db.Database.SqlQuery <OrderExtraReport>("ExtraOrderReportMonth @minLandSize", clientIdParameter).SingleOrDefault();
                    Order.Period = "Month";
                }
                else
                if (time == 2)
                {
                    Order        = db.Database.SqlQuery <OrderExtraReport>("ExtraOrderReportYear @minLandSize", clientIdParameter).SingleOrDefault();
                    Order.Period = "Year";
                }
                else
                {
                    Order        = db.Database.SqlQuery <OrderExtraReport>("ExtraOrderReport @minLandSize", clientIdParameter).SingleOrDefault();
                    Order.Period = "Year";
                }

                Order.LandVariable = LandSize;
            }
            return(Order);
        }