public DetailHotel(DetailHotelParam _detailhotel) { this.Hotels = _detailhotel.Hotels; this.Districts = _detailhotel.Districts; this.Address = _detailhotel.Address; this.CreateDate = DateTimeOffset.Now.LocalDateTime; this.CreateBy = "";//isi }
public ActionResult Create(DetailHotelParam _detailhotelparam) { if (ModelState.IsValid) { _idetailhotelservice.Insert(_detailhotelparam); return(RedirectToAction("Index")); } return(View(_detailhotelparam)); }
public virtual void Update(DetailHotelParam _detailhotel) { this.Id = _detailhotel.Id; this.Hotels = _detailhotel.Hotels; this.Districts = _detailhotel.Districts; this.Address = _detailhotel.Address; this.UpdateDate = DateTimeOffset.Now.LocalDateTime; this.UpdateBy = "";//isi }
public bool Insert(DetailHotelParam _detailhotelparam) { var push = new DetailHotel(_detailhotelparam); context.DetailHotels.Add(push); var result = context.SaveChanges(); if (result > 0) { status = true; } return(status); throw new NotImplementedException(); }
public bool Update(DetailHotelParam _detailhotelparam) { var getDetailHotel = Get(_detailhotelparam.Id); getDetailHotel.Update(_detailhotelparam); context.Entry(getDetailHotel).State = System.Data.Entity.EntityState.Modified; var result = context.SaveChanges(); if (result > 0) { status = true; } return(status); throw new NotImplementedException(); }
public ActionResult Edit(DetailHotelParam _detailhotelparam) { _idetailhotelservice.Update(_detailhotelparam); return(RedirectToAction("Index")); }
//GET public ActionResult Edit(int?id) { DetailHotelParam _detailhotelparam = new DetailHotelParam(_idetailhotelservice.Get(id)); return(View(_detailhotelparam)); }
public bool Update(DetailHotelParam _detailhotelparam) { return(_idetailhotelrepository.Update(_detailhotelparam)); throw new NotImplementedException(); }