示例#1
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));
        }
示例#2
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));
        }
示例#3
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));
        }