public ActionResult CreatePackage(Package pckg) { PackageRepository repo = new PackageRepository(); string message = string.Empty; int newPackegID = 0; try { newPackegID = repo.AddNewPackage(pckg); } catch (Exception exc) { message = exc.ToString(); } return(Json(new { Message = message, ID = newPackegID }, JsonRequestBehavior.AllowGet)); }
public void AddNewPackage(Package package) { PR.AddNewPackage(package); }