示例#1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,IntimationTypeId,EventId,Subject,HtmlContent,TemplateName")]  Models.IntimationTemplateMaster intimationTemplateMaster)
        {
            if (id != intimationTemplateMaster.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(intimationTemplateMaster);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!IntimationTemplateMasterExists(intimationTemplateMaster.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index), new { id = intimationTemplateMaster.EventId }));
            }
            ViewData["EventId"] = intimationTemplateMaster.EventId;
            //ViewData["IntimationTypeId"] = new SelectList(_context.IntimationTypeMaster, "IntimationTypeId", "IntimationTypeId", intimationTemplateMaster.IntimationTypeId);
            return(View(intimationTemplateMaster));
        }
示例#2
0
        public async Task <IActionResult> Edit(short id, [Bind("EventId,EventName,EventDispName,EventDate,FormDeadline,AckText,Venue,Hotel,EventDateTo,Subject,MailHeader,MailBody,MailSignature,IsActive")] Models.EventMaster eventMaster)
        {
            if (id != eventMaster.EventId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    //  eventMaster.IsActive = NullableBooleanPropertyProxy;
                    _context.Update(eventMaster);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EventMasterExists(eventMaster.EventId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(eventMaster));
        }
示例#3
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Fname,Lname,EmailId,EventId,Company,IndvDeadline,Position")] Ams ams)
        {
            if (id != ams.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ams);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AmsExists(ams.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index", "Invitee", new { eid = ams.EventId }));
            }
            // return RedirectToAction(nameof(Index));
            ams = await _context.Ams.Include(e => e.Event).FirstOrDefaultAsync(i => i.Id == id);

            return(View(ams));
        }
示例#4
0
        public async Task <IActionResult> Edit(int id, [Bind("Fname,Lname,PassportName,Paname,Paemail,EmailId,EventId,EventGroupId,Company,UniqId,Patel,Atime,Adate,Dtime,Ddate,Id,AcityName,DcityName,IsRequired,OwnArrDate,OwnArrTime,OwnArrFlightNo,OwnDepDate,OwnDepTime,OwnDepFlightNo,HotelChkIn,HotelChkOut,IsVisaReq,DtSubmit,IsAttending,AttendingOpt,IsFollowupReq,IsHotelReq,Comments,IsTransferReq,Tempemail,ObflightNo,Obdate,Obetd,Obeta,Obclass,InflightNo,Indate,Inetd,Ineta,Inclass,Obsec,Insec,AirTktFileName,IsNew,IsVisaReqOpt,VisaFileName,City,Starter,Grill,Dessert,DtModified,NoOfCoAttendee,FdAllergy,AlleryDesc,AgendaFileName,IcsFileName,IndvDeadline,Position,ActualAttendance")] Ams ams)
        {
            if (id != ams.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ams);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AmsExists(ams.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["EventId"] = new SelectList(_context.EventMaster, "EventId", "EventName", ams.EventId);
            return(View(ams));
        }