Example #1
0
        public ActionResult Outbond(OutbondView OV)
        {
            if (ModelState.IsValid)
            {
                OutbondManager OM = new OutbondManager();

                OM.AddOutbond(OV);
                return(RedirectToAction("Welcome", "Home"));
            }
            return(View());
        }
        public void AddOutbond(OutbondView OV)
        {
            using (DemoEntities db = new DemoEntities())
            {

                outbond ob = new outbond();
                ob.keterangan = OV.keterangan;
                ob.harga = OV.harga;

                db.outbonds.Add(ob);
                db.SaveChanges();
            }
    }