public bool DianCai(int orderId, int dishId) { if (oiDal.HasCai(orderId, dishId)) //是否已有此菜 { //菜的数量加1 return(oiDal.CaiJiaYiFeng(orderId, dishId) > 0); } else { //点新的菜 return(oiDal.DianCai(orderId, dishId) > 0); } }