public string Xoathuoc(string id) { if (id == null) { return("Chưa nhập mã thuốc"); } return(ThuocProcessor.XoaThuoc(id)); }
public string SuaThongTin(Thuoc thuoc) { if (thuoc == null) { return("NULL"); } return(ThuocProcessor.SuaThongTinThuoc(thuoc)); }
public string ThemThuoc([FromBody] Thuoc thuoc) { if (thuoc == null) { return("NULL"); } return(ThuocProcessor.AddThuoc(thuoc)); }
public string TimTheoTenThuoc(string tenthuoc) { /*if (tenthuoc == null) * { * return "xin nhập tên thuốc"; * } * * else*/ { return(JsonConvert.SerializeObject(ThuocProcessor.TimTheoTenThuoc(tenthuoc))); // return JsonConvert.DeserializeObject<Thuoc>(thuoc); } }
public string HienThiThuoc(string id) { Thuoc thuoc = ThuocProcessor.ShowThuoc(id); if (thuoc.mahh == null) { return("NULL"); } else { return(JsonConvert.SerializeObject(thuoc)); } }
public string TimTheoMaThuoc(string id) { return(JsonConvert.SerializeObject(ThuocProcessor.TimTheoMaThuoc(id))); }
public List <Thuoc> HienThiThuoc() { return(ThuocProcessor.ShowAllThuoc()); }