Exemple #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            StructureOwner structureOwner = await db.StructureOwners.FindAsync(id);

            db.StructureOwners.Remove(structureOwner);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public async Task <ActionResult> Edit([Bind(Include = "StructureOwnerID,Name,Email,MobileNumber")] StructureOwner structureOwner)
        {
            if (ModelState.IsValid)
            {
                db.Entry(structureOwner).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(structureOwner));
        }
Exemple #3
0
        public async Task <ActionResult> Create([Bind(Include = "StructureOwnerID,Name,Email,MobileNumber")] StructureOwner structureOwner)
        {
            if (ModelState.IsValid)
            {
                db.StructureOwners.Add(structureOwner);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(structureOwner));
        }
Exemple #4
0
        // GET: StructureOwners/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StructureOwner structureOwner = await db.StructureOwners.FindAsync(id);

            if (structureOwner == null)
            {
                return(HttpNotFound());
            }
            return(View(structureOwner));
        }