public JsonResult GetDeliveryAreaAndCourt(int notificationPersonType, int casePersonAddressId, int lawUnitAddressId) { DeliveryAreaFindVM deliveryAreaFind; if (notificationPersonType == 2) { deliveryAreaFind = deliveryAreaAddressService.DeliveryAreaAddressIdFind(lawUnitAddressId); } else { deliveryAreaFind = deliveryAreaAddressService.DeliveryAreaCasePersonAddressIdFind(casePersonAddressId); } return(Json(new { toCourtId = deliveryAreaFind.ToCourtId, deliveryAreaId = deliveryAreaFind.DeliveryAreaId, lawUnitId = deliveryAreaFind.LawUnitId, deliveryAreaDDL2 = areaService.DeliveryAreaListToDdlSelect2(deliveryAreaFind.DeliveryAreaList), toCourtDDL2 = service.GetCourtsSelect2(deliveryAreaFind.DeliveryAreaList), })); }