Ejemplo n.º 1
0
 public ActionResult clpview(string restcode)
 {
     try
     {
         //string DeliverTime;
         if (restcode == null)
         {
             restcode = "HN";
         }
         DeliverTime = DateTime.Today.ToString();
         Ankapurservices chartl    = new Ankapurservices();
         var             modelCust = chartl.chartline(DeliverTime, restcode);
         var             data      = String.Join(",", modelCust.OrderByDescending(m => m.OrderDate).Select(m => Convert.ToDateTime(m.OrderDate).ToString("dd-MM-yyyy")).ToList());
         ViewBag.time   = data;
         ViewBag.orders = String.Join(",", modelCust.OrderByDescending(m => m.OrderDate).Select(m => m.Orders).ToList());
         return(PartialView("clpview", modelCust));
     }
     catch (Exception)
     {
         return(Content("<script language='javascript' type='text/javascript'>alert('Restaurant is closed at the moment');location.href='" + @Url.Action("Index", "graph") + "'</script>"));
     }
 }