// GET: BondIndexDetails/Edit/5
        public ActionResult Edit(int?id)
        {
            GetViewDropDownData();
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BondIndexDetail bondIndexDetail = db.BondIndexDetails.Find(id);

            if (bondIndexDetail == null)
            {
                return(HttpNotFound());
            }
            return(View(bondIndexDetail));
        }
 public ActionResult Edit([Bind(Include = "BondIndexDetailID,BondIndexID,ValueDate,Value,PreviousValue,ValueChange,PercentageChange,CreatedOn,CreatedBy,ModifiedOn,ModifiedBy")] BondIndexDetail bondIndexDetail)
 {
     GetViewDropDownData();
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(bondIndexDetail).State = System.Data.Entity.EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
     return(View(bondIndexDetail));
 }
 public ActionResult Create([Bind(Include = "BondIndexDetailID,BondIndexID,ValueDate,Value,PreviousValue,ValueChange,PercentageChange,CreatedOn,CreatedBy")] BondIndexDetail bondIndexDetail)
 {
     GetViewDropDownData();
     if (ModelState.IsValid)
     {
         try
         {
             db.BondIndexDetails.Add(bondIndexDetail);
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         catch (Exception exp)
         {
             log.Error(exp);
         }
     }
     return(View(bondIndexDetail));
 }