public float yesterdayIelts() { string franchid = help.Permission(); // DateTime today = System.DateTime.Now; if (franchid == "Admin") { Recipt_Details eee = db.Recipt_Details.FirstOrDefault(x => x.Date == yesterday); if (eee != null) { return((db.Recipt_Details.Where(x => x.Date == yesterday)).Sum(x => x.Amount)); } else { return(0); } } Recipt_Details ee = db.Recipt_Details.FirstOrDefault(x => x.franchid == franchid && x.Date == yesterday); if (ee != null) { return((db.Recipt_Details.Where(x => x.franchid == franchid && x.Date == yesterday)).Sum(x => x.Amount)); } else { return(0); } }
public int TodayTotalFee(string franchid) { //DateTime today = System.DateTime.Now; Recipt_Details rd = db.Recipt_Details.FirstOrDefault(x => x.franchid == franchid && x.Date == today); if (rd != null) { return((db.Recipt_Details.Where(x => x.franchid == franchid && x.Date == today)).Sum(x => x.Amount)); } else { return(0); } }
public float TodayPayment(string id) { Recipt_Details rr = db.Recipt_Details.FirstOrDefault(x => x.franchid == id); if (rr != null) { var total = db.Recipt_Details.Where(x => x.franchid == id && x.Date == date).Sum(x => x.Amount); if (total != null) { return(total); } else { return(0); } } else { return(0); } }