public IActionResult GetBy(CatChargeType type) { string chargeType = PlaceTypeEx.GetChargeType(type); var data = catChargeService.GetBy(chargeType); return(Ok(data)); }
public static string GetChargeType(CatChargeType type) { string result = ""; switch (type) { case CatChargeType.CREDIT: result = "CREDIT"; break; case CatChargeType.DEBIT: result = "DEBIT"; break; case CatChargeType.OBH: result = "OBH"; break; default: break; } return(result); }