Пример #1
0
        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));
        }
Пример #2
0
 public void AddNewPackage(Package package)
 {
     PR.AddNewPackage(package);
 }