public ActionResult DeleteConfirmed(int id)
        {
            MultipleDistrict multipleDistrict = db.MultipleDistricts.Find(id);

            db.MultipleDistricts.Remove(multipleDistrict);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "multiple_district_id,multiple_district_name_thai,multiple_district_name_eng")] MultipleDistrict multipleDistrict)
 {
     if (ModelState.IsValid)
     {
         db.Entry(multipleDistrict).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(multipleDistrict));
 }
        public ActionResult Create([Bind(Include = "multiple_district_id,multiple_district_name_thai,multiple_district_name_eng")] MultipleDistrict multipleDistrict)
        {
            if (ModelState.IsValid)
            {
                db.MultipleDistricts.Add(multipleDistrict);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(multipleDistrict));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            MultipleDistrict multipleDistrict = db.MultipleDistricts.Find(id);

            db.MultipleDistricts.Remove(multipleDistrict);
            db.SaveChanges();
            var identity = (HttpContext.User as RegisterLions.MyPrincipal).Identity as RegisterLions.MyIdentity;

            // Write log to table TransactionLog
            //ProjLib projlib = new ProjLib();
            ProjLib.writeTransactionLog(identity.User.member_seq, "DeleteMultipleDistrict", identity.User.club_id);
            return(RedirectToAction("Index"));
        }
        // GET: MultipleDistricts/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MultipleDistrict multipleDistrict = db.MultipleDistricts.Find(id);

            if (multipleDistrict == null)
            {
                return(HttpNotFound());
            }
            return(View(multipleDistrict));
        }
 public ActionResult Edit([Bind(Include = "multiple_district_id,multiple_district_name_thai,multiple_district_name_eng")] MultipleDistrict multipleDistrict)
 {
     if (ModelState.IsValid)
     {
         db.Entry(multipleDistrict).State = EntityState.Modified;
         db.SaveChanges();
         var identity = (HttpContext.User as RegisterLions.MyPrincipal).Identity as RegisterLions.MyIdentity;
         // Write log to table TransactionLog
         // ProjLib projlib = new ProjLib();
         ProjLib.writeTransactionLog(identity.User.member_seq, "EditMultipleDistrict", identity.User.club_id);
         return(RedirectToAction("Index"));
     }
     return(View(multipleDistrict));
 }