Esempio n. 1
0
        public ActionResult EconomySumGraph()
        {
            ordersList = DataBaseClient.GetKarazhiraAuctions(2);

            LogService.LogInfo("EconomySumGraph page opened");

            return(View(ordersList));
        }
Esempio n. 2
0
        public ActionResult Export(string exportType)
        {
            GridView gv = new GridView();


            if (exportType.Equals("1"))
            {
                var dataSource = OrderToExcelModelConverter.ConvertActiveAuctions(DataBaseClient.GetKarazhiraAuctions(4));
                dataSource.AddRange(OrderToExcelModelConverter.ConvertActiveAuctions(DataBaseClient.GetKarazhiraAuctions(1)));

                gv.DataSource = dataSource;
            }
            else
            {
                var dataSource = OrderToExcelModelConverter.ConvertEndedAuctions(DataBaseClient.GetKarazhiraAuctions(2));
                dataSource.AddRange(OrderToExcelModelConverter.ConvertEndedAuctions(DataBaseClient.GetKarazhiraAuctions(3)));

                gv.DataSource = dataSource;
            }

            gv.DataBind();
            Response.ClearContent();
            Response.Buffer = true;
            Response.AddHeader("content-disposition", "attachment; filename=Список аукционов.xls");
            Response.ContentType = "application/ms-excel";
            Response.Charset     = "";
            StringWriter   sw  = new StringWriter();
            HtmlTextWriter htw = new HtmlTextWriter(sw);

            gv.RenderControl(htw);
            Response.Output.Write(sw.ToString());
            Response.Flush();
            Response.End();

            return(RedirectToAction("AuctionsList"));
        }
Esempio n. 3
0
        public JsonResult ColumnChart()
        {
            ordersList = DataBaseClient.GetKarazhiraAuctions(2);

            return(Json(ordersList, JsonRequestBehavior.AllowGet));
        }