public ActionResult DeleteConfirmed(int id)
        {
            AgentInquiry agentinquiry = db.AgentInquiries.Find(id);

            db.AgentInquiries.Remove(agentinquiry);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Name,CompanyName,Address,City,ZipCode,CountryId,MobileNo,Email,Comments")] AgentInquiry agentinquiry)
 {
     if (ModelState.IsValid)
     {
         db.Entry(agentinquiry).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CountryId = new SelectList(db.Countries, "Id", "CountryName", agentinquiry.CountryId);
     return(View(agentinquiry));
 }
        // GET: /AgentInquiry/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AgentInquiry agentinquiry = db.AgentInquiries.Find(id);

            if (agentinquiry == null)
            {
                return(HttpNotFound());
            }
            return(View(agentinquiry));
        }
        // GET: /AgentInquiry/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AgentInquiry agentinquiry = db.AgentInquiries.Find(id);

            if (agentinquiry == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CountryId = new SelectList(db.Countries, "Id", "CountryName", agentinquiry.CountryId);
            return(View(agentinquiry));
        }