public int CreateDrone(DronesBLL Drones) { int ProposedReturnValue = -1; ProposedReturnValue = _context.CreateDrone(Drones.RoleID, Drones.DroneName, Drones.UserID); return(ProposedReturnValue); }
public DronesBLL FindDrone(int DroneID) { DronesBLL ProposedReturnValue = null; DronesDAL DataLayerObject = _context.FindDrone(DroneID); if (null != DataLayerObject) { ProposedReturnValue = new DronesBLL(DataLayerObject); } return(ProposedReturnValue); }
public List <DronesBLL> GetDronesRelatedToUser(int UserID, int Skip, int Take) { List <DronesBLL> ProposedReturnValue = new List <DronesBLL>(); List <DronesDAL> ListOfDataLayerObjects = _context.GetDronesRelatedToUser(UserID, Skip, Take); foreach (DronesDAL Drone in ListOfDataLayerObjects) { DronesBLL BusinessObject = new DronesBLL(Drone); ProposedReturnValue.Add(BusinessObject); } return(ProposedReturnValue); }
public List <DronesBLL> GetDrones(int skip, int take) { List <DronesBLL> ProposedReturnValue = new List <DronesBLL>(); List <DronesDAL> ListOfDataLayerObjects = _context.GetDrones(skip, take); foreach (DronesDAL Drone in ListOfDataLayerObjects) { DronesBLL BusinessObject = new DronesBLL(Drone); ProposedReturnValue.Add(BusinessObject); } return(ProposedReturnValue); }
public ActionResult Delete(int id, RavenBLL.DronesBLL collection) { try { //if (!ModelState.IsValid) //{ // return View(collection); //} // TODO: Add insert logic here using (ContextBLL ctx = new ContextBLL()) { ctx.DeleteDrone(id); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public ActionResult Create(RavenBLL.DronesBLL collection) { try { if (!ModelState.IsValid) { return(View(collection)); } // TODO: Add insert logic here using (ContextBLL ctx = new ContextBLL()) { ctx.CreateDrone(collection); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public void DeleteDrone(DronesBLL Drones) { _context.DeleteDrone(Drones.DroneID); }
public void JustUpdateDrone(DronesBLL Drones) { _context.JustUpdateDrone(Drones.DroneID, Drones.RoleID, Drones.DroneName, Drones.UserID); }