// *****************Retrieve all loot records*****************
        // GET: Loot
        public ActionResult Index()
        {
            LootDBHandle dbhandle = new LootDBHandle();

            ModelState.Clear();
            return(View(dbhandle.GetRecords()));
        }
 public ActionResult Edit(int id, LootModel smodel)
 {
     try
     {
         LootDBHandle ldb = new LootDBHandle();
         ldb.UpdateRecord(smodel);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
 //*****************Delete loot record manually*****************
 // GET: Loot/Delete/5
 public ActionResult Delete(int id)
 {
     try
     {
         LootDBHandle ldb = new LootDBHandle();
         if (ldb.DeleteRecord(id))
         {
             ViewBag.AlertMsg = "Loot Record Deleted Successfully";
         }
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
        public ActionResult Create(LootModel smodel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    LootDBHandle ldb = new LootDBHandle();
                    if (ldb.AddRecord(smodel))
                    {
                        ViewBag.Message = "Loot Record Added Successfully";
                        ModelState.Clear();
                    }
                }

                return(View());
            }
            catch
            {
                return(View());
            }
        }
        // *****************Edit loot record details manually*****************
        // GET: Loot/Edit/5
        public ActionResult Edit(int id)
        {
            LootDBHandle ldb = new LootDBHandle();

            return(View(ldb.GetRecords().Find(smodel => smodel.Id == id)));
        }