public ActionResult Create([Bind(Include = "Id,MasterLCInfoMasId,AmendDate,AmendLCNo,AmendLCRecvDate,AmendLatestShipDate,AmendQuantity,AmendTotalValue,AmendLCExpiryDate,AmendPaymentTerm,AmendTenor")] LCAmendInfo lCAmendInfo)
        {
            if (ModelState.IsValid)
            {
                db.LCAmendInfo.Add(lCAmendInfo);
                db.SaveChanges();
                Success("Saved Successfully", true);
                return(RedirectToAction("Index"));
            }

            ViewBag.MasterLCInfoMasId = new SelectList(db.MasterLCInfoMas, "Id", "LCNo", lCAmendInfo.MasterLCInfoMasId);

            var paymentTerm = new SelectList(new List <SelectListItem> {
                new SelectListItem {
                    Text = "At Sight", Value = "0"
                },
                new SelectListItem {
                    Text = "From BL", Value = "1"
                },
            }, "Value", "Text", lCAmendInfo.AmendPaymentTerm);

            ViewBag.AmendPaymentTerm = paymentTerm;

            return(View(lCAmendInfo));
        }
        // GET: LCAmend/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LCAmendInfo lCAmendInfo = db.LCAmendInfo.Find(id);

            if (lCAmendInfo == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MasterLCInfoMasId = new SelectList(db.MasterLCInfoMas, "Id", "LCNo", lCAmendInfo.MasterLCInfoMasId);

            var paymentTerm = new SelectList(new List <SelectListItem> {
                new SelectListItem {
                    Text = "At Sight", Value = "0"
                },
                new SelectListItem {
                    Text = "From BL", Value = "1"
                },
            }, "Value", "Text", lCAmendInfo.AmendPaymentTerm);

            ViewBag.AmendPaymentTerm = paymentTerm;

            return(View(lCAmendInfo));
        }
        // GET: LCAmend/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LCAmendInfo lCAmendInfo = db.LCAmendInfo.Find(id);

            if (lCAmendInfo == null)
            {
                return(HttpNotFound());
            }
            return(View(lCAmendInfo));
        }