Ejemplo n.º 1
0
        public ActionResult Create([Bind(Include = "Id,Number")] Contract contract)
        {
            if (ModelState.IsValid)
            {
                contract.Id = Guid.NewGuid();
                db.ContractSet.Add(contract);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(contract));
        }
Ejemplo n.º 2
0
        public ActionResult Create([Bind(Include = "Id, Name, FullName, LegalAddress, INN, OKPO")] Contractor contractor)
        {
            if (ModelState.IsValid)
            {
                contractor.Id = Guid.NewGuid();
                db.ContractorSet.Add(contractor);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(contractor));
        }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Id,Name,IsActive,Alias")] Node node)
        {
            if (ModelState.IsValid)
            {
                node.Id = Guid.NewGuid();
                db.NodeSet.Add(node);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(node));
        }