public ActionResult TodayLastFifteenSale() { var status = ""; if (Authenticated) { try { var Todaydate = DateTime.Now.Date; var TomorrowDate = DateTime.Now.Date.AddDays(1); //var objsd = db.SaleDetails.Where(x => x.RefundStatus == null).ToList(); //var objsm = db.SaleMains.Where(x => x.CreatedOn > Todaydate && x.CreatedOn < TomorrowDate ).OrderByDescending(x => x.CreatedOn).Take(15).Select(x => new { InvoiceNo = x.InvoiceNo, NetTotal = x.NetTotal }); var objsm = db.TodayLastFifteenSale(); status = JsonConvert.SerializeObject(objsm); } catch (Exception ex) { ApplicationExceptionLogging(ex.Message, ex.StackTrace, " AdminDashboard", "TopTenSale"); } } return(Content(status)); }