public JsonResult GetInvoice(DateTime FromDate, DateTime ToDate, int Status) { if (_session.IsLogin && !_session.IsStore) { string jsonData = "[]"; IOrder _order = new OrderBO(); List<vw_Invoice> data; data = _order.GetData(_session.CustomerID, FromDate, ToDate, Status); if (data != null) jsonData = new JavaScriptSerializer().Serialize(data); return Json(jsonData, JsonRequestBehavior.AllowGet); } else RedirectToAction("Index", "Home"); return Json("[]", JsonRequestBehavior.AllowGet); }