Пример #1
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));
        }
Пример #2
0
        public async Task <IActionResult> Create([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 (ModelState.IsValid)
            {
                _context.Add(ams);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["EventId"] = new SelectList(_context.EventMaster, "EventId", "EventName", ams.EventId);
            return(View(ams));
        }
Пример #3
0
        public async Task <IActionResult> Create([Bind("Id,IntimationTypeId,HtmlContent,MergeFields,EventId,TemplateName,Subject")] IntimationTemplateMaster intimationTemplateMaster)
        {
            if (ModelState.IsValid)
            {
                _context.Add(intimationTemplateMaster);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index), new{ id = intimationTemplateMaster.EventId }));
            }
            // ViewData["EventId"] = new SelectList(_context.EventMaster, "EventId", "EventName", intimationTemplateMaster.EventId);
            // ViewData["IntimationTypeId"] = new SelectList(_context.IntimationTypeMaster, "IntimationTypeId", "IntimationTypeId", intimationTemplateMaster.IntimationTypeId);
            return(View(intimationTemplateMaster));
        }
Пример #4
0
        public async Task <IActionResult> Create([Bind("EventId,EventName,EventDispName,EventDate,FormDeadline,AckText,Venue,Hotel,EventDateTo,Subject,MailHeader,MailBody,MailSignature,IsActive")] Models.EventMaster eventMaster, string create, string template, string import)
        {
            if (ModelState.IsValid)
            {
                eventMaster.IsActive = true; //eventMaster.NullableBooleanPropertyProxy;
                _context.Add(eventMaster);
                await _context.SaveChangesAsync();

                if (create != null)
                {
                    return(RedirectToAction(nameof(Index)));
                }
                else if (template != null)
                {
                    return(RedirectToAction("Index", "Templates", new { id = eventMaster.EventId }));
                }
                else if (import != null)
                {
                    return(RedirectToAction("Index", "Invitee", new { eid = eventMaster.EventId }));
                }
            }
            return(View(eventMaster));
        }