Manas Sahu

Manas Sahu

  • 1.8k
  • 203
  • 17.4k

How to get data from a booloean function in vb.net

Oct 1 2019 5:05 AM
I have a method name IsQuotaAvailable. i want to get the DailyAvailableQuota data and show it in the webpage. so how can i fetch this data from this method and send to user interface
  1. public bool IsQuotaAvailable(Neo oNeo, string request)  
  2. {  
  3. EdgeQuotaCheckResponse oresponse = MakeOAuthPostQuotacheck(oNeo, GetQuotaCheckURI(), request);  
  4. if (oresponse != null)  
  5. {  
  6. foreach (RemainingQuota quota in oresponse.Limits)  
  7. {  
  8. if (quota.limit_type.ToLower() == "daily")  
  9. {  
  10. DailyAvailableQuota = quota.remaining_quota;  
  11. }  
  12. else if (quota.limit_type.ToLower() == "monthly")  
  13. {  
  14. MonthlyAvailableQuota = quota.remaining_quota;  
  15. }  
  16. }  
  17. if ( SettingControl.GetBoolean("bUIMonthlycheck"false) && DailyAvailableQuota > 0 && MonthlyAvailableQuota > 0)  
  18. {  
  19. if (!SettingControl.GetBoolean("bAllowQuotaMailCheck"false))  
  20. {  
  21. CheckAndSendQuotaMail(oNeo);  
  22. }  
  23. return true;  
  24. }  
  25. else  
  26. {  
  27. return false;  
  28. }  
  29. }  
  30. }  

Answers (3)