Esempio n. 1
0
        public ActionResult CommCreate(CommHeaders commHeaders)
        {
            commHeaders.DistKey = GlobalVariables.DistKey;
            string positionTitle = db.Positions.FirstOrDefault(x => x.pKey == commHeaders.PositionKey).CommitteeTitle;

            commHeaders.CommName = positionTitle;
            db.CommHeaders.Add(commHeaders);
            db.SaveChanges();
            return(RedirectToAction("CommIndex"));
        }
Esempio n. 2
0
        public ActionResult PaymentsCreate(Payments payments)
        {
            if (ModelState.IsValid)
            {
                db.Payments.Add(payments);
                db.SaveChanges();
                return(RedirectToAction("PaymentsDetails", new { id = payments.pKey }));
            }

            return(View(payments));
        }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "pKey,Location,MapUIRL,EmbedURL,DistKey,Address")] Locations locations)
        {
            if (ModelState.IsValid)
            {
                locations.DistKey = GlobalVariables.DistKey;
                db.Locations.Add(locations);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(locations));
        }
 public ActionResult EventsCreate(Events events)
 {
     if (Session["currFile"] != null)
     {
         events.Eventlink = Session["currFile"].ToString();
     }
     events.DistKey = GlobalVariables.DistKey;
     db.Events.Add(events);
     db.SaveChanges();
     Session["currEventKey"] = events.pKey;
     return(RedirectToAction("EventsEdit/" + Session["currEventKey"].ToString()));
 }
Esempio n. 5
0
        public ActionResult MeetingCreate(Meetings meetings)
        {
            if (ModelState.IsValid)
            {
                meetings.DistKey = GlobalVariables.DistKey;
                db.Meetings.Add(meetings);
                db.SaveChanges();
                return(RedirectToAction("MeetingsEdit"));
            }

            return(View(meetings));
        }
Esempio n. 6
0
        public ActionResult KeyListCreate(KeyList keyList)
        {
            if (ModelState.IsValid)
            {
                keyList.DistKey = GlobalVariables.DistKey;
                db.KeyList.Add(keyList);
                db.SaveChanges();
                return(RedirectToAction("KeyListIndex"));
            }

            return(View(keyList));
        }
Esempio n. 7
0
        public ActionResult ContactsCreate([Bind(Include = "pKey,DistKey,name,email,phone,password,AccessLvl,Address")] Contacts contacts)
        {
            if (ModelState.IsValid)
            {
                contacts.DistKey = GlobalVariables.DistKey;
                db.Contacts.Add(contacts);
                db.SaveChanges();
                return(RedirectToAction("ContactsIndex"));
            }

            return(View(contacts));
        }
        public ActionResult PaymentSetupsCreate(PaymentSetup paymentSetup)
        {
            if (ModelState.IsValid)
            {
                db.PaymentSetup.Add(paymentSetup);
                db.SaveChanges();
                Session["currSetupKey"] = paymentSetup.pKey;
                return(RedirectToAction("PaymentSetupsIndex", new { id = paymentSetup.EventKey }));
            }

            return(View(paymentSetup));
        }
Esempio n. 9
0
        public ActionResult CommLinkCreate(CommLinks commLinks)
        {
            commLinks.DistKey = GlobalVariables.DistKey;
            if (ModelState.IsValid)
            {
                db.CommLinks.Add(commLinks);
                db.SaveChanges();
                return(RedirectToAction("CommLinks", "CommHeaders", new { id = commLinks.CommKey }));
            }

            return(View(commLinks));
        }
        public ActionResult DocCreate(Documents documents)
        {
            if (ModelState.IsValid)
            {
                db.Documents.Add(documents);
                db.SaveChanges();
                Session["currDocKey"] = documents.pKey;
                return(RedirectToAction("DocEdit/" + Session["currDocKey"].ToString()));
            }

            return(View(documents));
        }
        public ActionResult GroupsCreate([Bind(Include = "pKey,DistKey,GroupName,GroupNumber,ContactID")] Groups groups)
        {
            if (ModelState.IsValid)
            {
                groups.DistKey = GlobalVariables.DistKey;
                db.Groups.Add(groups);
                db.SaveChanges();
                return(RedirectToAction("GroupsIndex"));
            }

            return(View(groups));
        }
Esempio n. 12
0
        public ActionResult LinksCreate([Bind(Include = "pKey,LinkText,linkURL,ListOrder,LinkComment,target")] Links links)
        {
            if (ModelState.IsValid)
            {
                links.DistKey = GlobalVariables.DistKey;
                db.Links.Add(links);
                db.SaveChanges();
                return(RedirectToAction("LinksIndex"));
            }

            return(View(links));
        }
Esempio n. 13
0
        public ActionResult PhoneListCreate([Bind(Include = "pKey,LastName,FirstName,Phone,Email,Gender,SobDate,HomeGroup,Speaker,Jail,TwStep,Ride,PhoneList,Treatment,SpecialEvents")] VolunteerList volunteerList)
        {
            if (ModelState.IsValid)
            {
                db.VolunteerList.Add(volunteerList);
                db.SaveChanges();
                int newKey = volunteerList.pKey;
                Session["isEditing"] = true;
                SendEmail();
                return(RedirectToAction("PhoneListThanks"));
            }

            return(RedirectToAction("PhoneListCreate"));
        }