public bool SufficientCredit(string list_code) { int list_id = int.Parse(list_code); int list_total = data_file.GetListTotalCost(list_id); int credit = GetUserCredit(); if (credit >= list_total) { return(true); } else { return(false); } }