public static string AddTax(ShowableTax tax) { try { using (var db = new BarProjectEntities()) { db.addTax(tax.TaxName, tax.TaxValue); } } catch (Exception ex) { var message = ex.Message; if (ex.InnerException != null) { message += "\nInner:" + ex.InnerException.Message; } return(message); } return(""); }
private bool IsTaxEmpty(ShowableTax tax) { return(tax.TaxName == null && tax.TaxValue == null); }