Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CompanyName_tbl companyName_tbl = db.CompanyName_tbl.Find(id);

            db.CompanyName_tbl.Remove(companyName_tbl);
            db.SaveChanges();
            return(View(db.CompanyName_tbl.ToList()));
        }
Exemplo n.º 2
0
        public ActionResult DeleteConfirmed(int id)
        {
            CompanyName_tbl companyName_tbl = db.CompanyName_tbl.Find(id);

            db.CompanyName_tbl.Remove(companyName_tbl);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "companyID,companyName,shortCode,corpInfo,updateDate,countryID,exchangeCodeID,companyTypeID,businessSectorID")] CompanyName_tbl companyName_tbl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(companyName_tbl).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.businessSectorID = new SelectList(db.BusinessSector_tbl, "businessSectorID", "businessSectorDesc", companyName_tbl.businessSectorID);
     ViewBag.companyTypeID    = new SelectList(db.CompanyType_tbl, "companyTypeID", "companyTypeDesc", companyName_tbl.companyTypeID);
     ViewBag.exchangeCodeID   = new SelectList(db.Exchange_tbl, "exchangeCodeID", "exchangeName", companyName_tbl.exchangeCodeID);
     return(View(companyName_tbl));
 }
Exemplo n.º 4
0
        // GET: CompanyName_tbl/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CompanyName_tbl companyName_tbl = db.CompanyName_tbl.Find(id);

            if (companyName_tbl == null)
            {
                return(HttpNotFound());
            }
            return(View(companyName_tbl));
        }
Exemplo n.º 5
0
        // GET: CompanyName_tbl/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CompanyName_tbl companyName_tbl = db.CompanyName_tbl.Find(id);

            if (companyName_tbl == null)
            {
                return(HttpNotFound());
            }
            ViewBag.businessSectorID = new SelectList(db.BusinessSector_tbl, "businessSectorID", "businessSectorDesc", companyName_tbl.businessSectorID);
            ViewBag.companyTypeID    = new SelectList(db.CompanyType_tbl, "companyTypeID", "companyTypeDesc", companyName_tbl.companyTypeID);
            ViewBag.exchangeCodeID   = new SelectList(db.Exchange_tbl, "exchangeCodeID", "exchangeName", companyName_tbl.exchangeCodeID);
            return(View(companyName_tbl));
        }