public ActionResult DeleteConfirmed(int id)
        {
            tbSCenterAccount tbscenteraccount = db.tbSCenterAccount.Find(id);

            db.tbSCenterAccount.Remove(tbscenteraccount);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        //
        // GET: /SCenterAccount/Delete/5

        public ActionResult Delete(int id = 0)
        {
            tbSCenterAccount tbscenteraccount = db.tbSCenterAccount.Find(id);

            if (tbscenteraccount == null)
            {
                return(HttpNotFound());
            }
            return(View(tbscenteraccount));
        }
 public ActionResult Edit(tbSCenterAccount tbscenteraccount)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbscenteraccount).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.SCenter_ID = new SelectList(db.tbSCenterInfo, "SCenter_ID", "SCenter_Name", tbscenteraccount.SCenter_ID);
     return(View(tbscenteraccount));
 }
        //
        // GET: /SCenterAccount/Edit/5

        public ActionResult Edit(int id = 0)
        {
            tbSCenterAccount tbscenteraccount = db.tbSCenterAccount.Find(id);

            if (tbscenteraccount == null)
            {
                return(HttpNotFound());
            }
            ViewBag.SCenter_ID = new SelectList(db.tbSCenterInfo, "SCenter_ID", "SCenter_Name", tbscenteraccount.SCenter_ID);
            return(View(tbscenteraccount));
        }
        public ActionResult Create(tbSCenterAccount tbscenteraccount)
        {
            if (ModelState.IsValid)
            {
                db.tbSCenterAccount.Add(tbscenteraccount);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.SCenter_ID = new SelectList(db.tbSCenterInfo, "SCenter_ID", "SCenter_Name", tbscenteraccount.SCenter_ID);
            return(View(tbscenteraccount));
        }