public async System.Threading.Tasks.Task <ActionResult> CheckProductcode(string ProductCode, string Previousproductcode) { if (ProductCode == Previousproductcode) { return(Json(true, JsonRequestBehavior.AllowGet)); } bool check = Commonhelper.CheckProductcode(ProductCode); if (check) { return(Json(false, JsonRequestBehavior.AllowGet)); } else { return(Json(true, JsonRequestBehavior.AllowGet)); } }