I need a functions like this, but it’s not have right syntax. So how do I fix this error if I want to hold all the meaning of my function?
public ActionResult Permission(long? id)
{
if (id == null)
throw new ApplicationException("Không có mục này. Bạn hãy chọn mục khác!");
Shipping shipping = ShippingRepository.RetrieveById(id.Value);
if (shipping == null)
throw new ApplicationException("Không có mục này. Vui lòng chọn cái khác!");
User _user = null;
_user = UserRepository.RetrieveByUserID(shipping.OwnerId);
if (DateTime.Now >= _user.Profiles.AccExpriedDate)
Acc_Payment(_user.UserId);
else
return RedirectToAction("Details", "Shipping");
}
You are not returning a value in the block below.