private static bool HasHDDSpace() { //bytes ulong space = 100 * 1024 * 1024; //*1024*1024 makes it MegaBytes return(DriveSpace.DriveFreeBytes(_path, out space)); }
public async Task <ActionResult> _ViewDashBoard() { ViewBag.DiskFreeSpace = DriveSpace.GetHardDiskFreeSpace(); ViewBag.DiskSpace = DriveSpace.GetHardDiskSpace(); ViewBag.HotelCount = await YummyOnlineManager.GetHotelCount(); int userCount = 0; userCount += await YummyOnlineManager.GetUserCount(Role.Customer); userCount += await YummyOnlineManager.GetUserCount(Role.Nemo); ViewBag.UserCount = userCount; ViewBag.DineCount = await YummyOnlineManager.GetDineCount(); return(View()); }