Пример #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,TimeStamp,CompanyId,CentreNumber,CentreName,StreetAddress,ZipCode,County,Country,NumberOfFloors,PersonId,PersonId1,CentreNotes")] BusinessCentre businessCentre)
        {
            if (id != businessCentre.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(businessCentre);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BusinessCentreExists(businessCentre.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PersonId"]  = new SelectList(_context.Person, "Id", "FullName", businessCentre.PersonId);
            ViewData["PersonId1"] = new SelectList(_context.Person, "Id", "FullName", businessCentre.PersonId1);
            ViewData["CompanyId"] = new SelectList(_context.Company, "Id", "CompanyName", businessCentre.CompanyId);
            return(View(businessCentre));
        }
Пример #2
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Description,TimeStamp,Url,PersonId")] Document document)
        {
            if (id != document.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(document);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DocumentExists(document.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PersonId"] = new SelectList(_context.Set <Person>(), "Id", "FullName", document.PersonId);
            return(View(document));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,BusinessCentreId,ReportDate,Version,PersonId,TimeOnSite,AccessPoints,AccessPointsBrandModel,A,B,C,D,E,F,G")] DworkinWiFiSurveyResult dworkinWiFiSurveyResult)
        {
            if (id != dworkinWiFiSurveyResult.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(dworkinWiFiSurveyResult);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DworkinWiFiSurveyResultExists(dworkinWiFiSurveyResult.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PersonId"]         = new SelectList(_context.Person, "Id", "STString", dworkinWiFiSurveyResult.PersonId);
            ViewData["BusinessCentreId"] = new SelectList(_context.BusinessCentre, "Id", "WiFiSurvString", dworkinWiFiSurveyResult.BusinessCentreId);
            return(View(dworkinWiFiSurveyResult));
        }
Пример #4
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,TimeStampCreated,TimeStampResolved,TimeStampClosed,BusinessCentreId,PersonId,PersonId1,FaultDescription,FaultReport,TicketLog")] SupportTicket supportTicket)
        {
            if (id != supportTicket.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(supportTicket);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SupportTicketExists(supportTicket.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PersonId1"]        = new SelectList(_context.Person, "Id", "STString", supportTicket.PersonId1);
            ViewData["BusinessCentreId"] = new SelectList(_context.BusinessCentre, "Id", "CName", supportTicket.BusinessCentreId);
            ViewData["PersonId"]         = new SelectList(_context.Person, "Id", "STString", supportTicket.PersonId);
            return(View(supportTicket));
        }
Пример #5
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,CompanyName,StreetAddress,ZipCode,County,Country,PhoneNumber1,PhoneNumber2")] Company company)
        {
            if (id != company.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(company);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CompanyExists(company.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(company));
        }