//save() method for save button public String Save() //CSV { return(Name + "," + Salary.ToString() + "," + Investment.ToString() + "," + Taxable.ToString() + "," + (Rate * 100).ToString() + "," + (Taxable * Rate).ToString()); }
protected void ToString(List <string> toStringOutput) { toStringOutput.Add($"Name = {(Name == null ? "null" : Name == string.Empty ? "" : Name)}"); toStringOutput.Add($"AppliedMoney = {(AppliedMoney == null ? "null" : AppliedMoney.ToString())}"); toStringOutput.Add($"Rate = {(Rate == null ? "null" : Rate == string.Empty ? "" : Rate)}"); toStringOutput.Add($"AmountMoney = {(AmountMoney == null ? "null" : AmountMoney.ToString())}"); toStringOutput.Add($"Type = {(Type == null ? "null" : Type.ToString())}"); toStringOutput.Add($"Taxable = {(Taxable == null ? "null" : Taxable.ToString())}"); toStringOutput.Add($"Taxes = {(Taxes == null ? "null" : $"[{ string.Join(", ", Taxes)} ]")}"); toStringOutput.Add($"SurchargeId = {(SurchargeId == null ? "null" : SurchargeId == string.Empty ? "" : SurchargeId)}"); }
protected void ToString(List <string> toStringOutput) { toStringOutput.Add($"Uid = {(Uid == null ? "null" : Uid == string.Empty ? "" : Uid)}"); toStringOutput.Add($"SourceServiceChargeUid = {(SourceServiceChargeUid == null ? "null" : SourceServiceChargeUid == string.Empty ? "" : SourceServiceChargeUid)}"); toStringOutput.Add($"Name = {(Name == null ? "null" : Name == string.Empty ? "" : Name)}"); toStringOutput.Add($"CatalogObjectId = {(CatalogObjectId == null ? "null" : CatalogObjectId == string.Empty ? "" : CatalogObjectId)}"); toStringOutput.Add($"Percentage = {(Percentage == null ? "null" : Percentage == string.Empty ? "" : Percentage)}"); toStringOutput.Add($"AmountMoney = {(AmountMoney == null ? "null" : AmountMoney.ToString())}"); toStringOutput.Add($"AppliedMoney = {(AppliedMoney == null ? "null" : AppliedMoney.ToString())}"); toStringOutput.Add($"TotalMoney = {(TotalMoney == null ? "null" : TotalMoney.ToString())}"); toStringOutput.Add($"TotalTaxMoney = {(TotalTaxMoney == null ? "null" : TotalTaxMoney.ToString())}"); toStringOutput.Add($"CalculationPhase = {(CalculationPhase == null ? "null" : CalculationPhase.ToString())}"); toStringOutput.Add($"Taxable = {(Taxable == null ? "null" : Taxable.ToString())}"); toStringOutput.Add($"AppliedTaxes = {(AppliedTaxes == null ? "null" : $"[{ string.Join(", ", AppliedTaxes)} ]")}"); }