public ActionResult Create(ReportingParty reportingParty)
 {
     try
     {
         _dbReportingPartyRepository.Insert(reportingParty);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View(reportingParty));
     }
 }
 public int Insert(Complaint complaint)
 {
     if (complaint.ReportingParty.Id < 0)
     {
         complaint.ReportingPartyId = _dbReportingPartyRepository.Insert(complaint.ReportingParty);
     }
     else
     {
         _dbReportingPartyRepository.Update(complaint.ReportingParty);
     }
     return(_dbRepository.Insert(complaint.ComplaintTypeId, complaint.Description, complaint.LocationDetails,
                                 complaint.ReportingPartyId));
 }
 public int Insert(ReportingParty reportingParty)
 {
     return(_dbRepository.Insert(reportingParty.Name, reportingParty.Email, reportingParty.phone,
                                 reportingParty.phoneTypeId));
 }