我只想在单击相关按钮时调用 onClick() 函数。但是当我在 VS2012 中放置一个调试点时,我看到这个函数在页面加载时正在调用。有什么方法可以假装这个吗?
$("#BtnAcik@(OppDetail.ID)").click(function () {
@{
var RevenuePlan = OppDetail.CRM_REVENUE_PLAN;
var TotalNewRev = RevenuePlan.Sum(c => c.AMOUNT);
var SolutionPlan = OppDetail.CRM_SOLUTION_DISTRIBUTION;
var TotalSol = SolutionPlan.Sum(c => c.AMOUNT);
if (TotalNewRev == TotalSol){
<text>
bootbox.confirm("Eminmisiniz?", function (result) {
if (result === true) {
window.location = '/opp/ChangeStatusToAcik?OppDetailId=@(OppDetail.ID)';
} else {
}
});
</text>
} else{
<text>
bootbox.alert("Çözüm plani toplami ile gelir plani toplami birbirine esit degil");
</text>
}
}
});