public Hotel(HotelParam _hotel) { this.Name = _hotel.Name; this.Star = _hotel.Star; this.CreateDate = DateTimeOffset.Now.LocalDateTime; this.CreateBy = "";//isi }
public virtual void Update(HotelParam _hotel) { this.Id = _hotel.Id; this.Name = _hotel.Name; this.Star = _hotel.Star; this.UpdateDate = DateTimeOffset.Now.LocalDateTime; this.UpdateBy = "";//isi }
public ActionResult Create(HotelParam _hotelparam) { if (ModelState.IsValid) { _ihotelservice.Insert(_hotelparam); return(RedirectToAction("Index")); } return(View(_hotelparam)); }
public bool Insert(HotelParam _hotelparam) { var push = new Hotel(_hotelparam); context.Hotels.Add(push); var result = context.SaveChanges(); if (result > 0) { status = true; } return(status); throw new NotImplementedException(); }
public bool Update(HotelParam _hotelparam) { var getHotel = Get(_hotelparam.Id); getHotel.Update(_hotelparam); context.Entry(getHotel).State = System.Data.Entity.EntityState.Modified; var result = context.SaveChanges(); if (result > 0) { status = true; } return(status); throw new NotImplementedException(); }
public bool Update(HotelParam _hotelparam) { return(_ihotelrepository.Update(_hotelparam)); throw new NotImplementedException(); }
public bool Insert(HotelParam _hotelparam) { return(_ihotelrepository.Insert(_hotelparam)); throw new NotImplementedException(); }
public ActionResult Edit(HotelParam _hotelparam) { _ihotelservice.Update(_hotelparam); return(RedirectToAction("Index")); }
//GET public ActionResult Edit(int?id) { HotelParam _hotelparam = new HotelParam(_ihotelservice.Get(id)); return(View(_hotelparam)); }