public int CreateObservation(ObservationsBLL Observations) { int ProposedReturnValue = -1; ProposedReturnValue = _context.CreateObservation(Observations.Speed, Observations.LatNumber, Observations.LongNumber, Observations.PlateID, Observations.RegisteredOwner, Observations.DroneID); return(ProposedReturnValue); }
public ObservationsBLL FindObservation(int ObsID) { ObservationsBLL ProposedReturnValue = null; ObservationsDAL DataLayerObject = _context.FindObservation(ObsID); if (null != DataLayerObject) { ProposedReturnValue = new ObservationsBLL(DataLayerObject); } return(ProposedReturnValue); }
public List <ObservationsBLL> GetObservationsRelatedToObs(int skip, int take) { List <ObservationsBLL> ProposedReturnValue = new List <ObservationsBLL>(); List <ObservationsDAL> ListOfDataLayerObjects = _context.GetObservationsRelatedToObs(skip, take); foreach (ObservationsDAL Observations in ListOfDataLayerObjects) { ObservationsBLL BusinessObject = new ObservationsBLL(Observations); ProposedReturnValue.Add(BusinessObject); } return(ProposedReturnValue); }
public ActionResult Delete(int id, RavenBLL.ObservationsBLL collection) { try { //if (!ModelState.IsValid) //{ // return View(collection); //} // TODO: Add insert logic here using (ContextBLL ctx = new ContextBLL()) { ctx.DeleteObservation(id); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public ActionResult Create(RavenBLL.ObservationsBLL collection) { try { if (!ModelState.IsValid) { return(View(collection)); } // TODO: Add insert logic here using (ContextBLL ctx = new ContextBLL()) { ctx.CreateObservation(collection); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public void DeleteObservation(ObservationsBLL Observations) { _context.DeleteObservation(Observations.ObsID); }
public void JustUpdateObservation(ObservationsBLL Observations) { _context.JustUpdateObservation(Observations.ObsID, Observations.Speed, Observations.LatNumber, Observations.LongNumber, Observations.PlateID, Observations.RegisteredOwner, Observations.DroneID); }