Exemplo n.º 1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.Attach(UserAudit).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!UserAuditExists(UserAudit.UserAuditID))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.Images.Add(Images);
            await _context.SaveChangesAsync();

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.AgentPropertyBuyerSeller.Add(AgentPropertyBuyerSeller);
            await _context.SaveChangesAsync();

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Seller = await _context.Seller.FindAsync(id);

            if (Seller != null)
            {
                _context.Seller.Remove(Seller);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            UserAudit = await _context.UserAudit.FindAsync(id);

            if (UserAudit != null)
            {
                _context.UserAudit.Remove(UserAudit);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 6
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Property = await _context.Property.FindAsync(id);

            if (Property != null)
            {
                _context.Property.Remove(Property);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 7
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Office = await _context.Office.FindAsync(id);

            if (Office != null)
            {
                _context.Office.Remove(Office);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 8
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            FloorPlan = await _context.FloorPlan.FindAsync(id);

            if (FloorPlan != null)
            {
                _context.FloorPlan.Remove(FloorPlan);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 9
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ContactDetails = await _context.ContactDetails.FindAsync(id);

            if (ContactDetails != null)
            {
                _context.ContactDetails.Remove(ContactDetails);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }