Example #1
0
        public ActionResult BuyerEntry()
        {
            var Product = _db.Product.ToList();

            //  ViewBag.Product = new SelectList(Product);

            BuyerInfo           buyerinfo    = new BuyerInfo();
            Product             product      = new Product();
            CommunicationMedium medium       = new CommunicationMedium();
            CommunicationFrom   communicator = new CommunicationFrom();
            website             web          = new website();
            Source        source             = new Source();
            Communication communication      = new Communication();

            return(View(buyerinfo));
        }
Example #2
0
        public IHttpActionResult SaveMediums(CommunicationMedium model)
        {
            try
            {
                if (model.ID > 0)
                {
                    var existMedium = _db.CommunicationMediums.FirstOrDefault(x => x.ID == model.ID);
                    existMedium.Medium = model.Medium;
                    _db.SaveChanges();
                    return(Ok(existMedium));
                }
                else
                {
                    model.ID = Id++;
                    _db.CommunicationMediums.Add(model);
                    _db.SaveChanges();
                }

                return(Ok(model));
            }
            catch (Exception ex) {
                return(InternalServerError(ex));
            }
        }
Example #3
0
 public ActionResult AddMedium(CommunicationMedium model)
 {
     _db.CommunicationMedium.Add(model);
     _db.SaveChanges();
     return(RedirectToAction("ThankYou", "Tracker"));
 }
Example #4
0
        public ActionResult AddMedium()
        {
            CommunicationMedium model = new CommunicationMedium();

            return(View());
        }