public ActionResult NewCheckout(CheckOutEquipmentModel formdata) { long studentid = formdata.StudentID; string building = formdata.Buildingname; int equipmentid = formdata.EquipmentID; NewCheckoutDTO dto = new NewCheckoutDTO(); dto.EquipmentID = equipmentid; dto.Status = "Out"; dto.StudentID = studentid; NewCheckoutCreator checkout_Creator = new NewCheckoutCreator(); checkout_Creator.CheckOut(dto); return(RedirectToAction("AfterCheckOut", "CheckOut")); }
public ActionResult CheckOutEquipment(CheckOutEquipmentModel formdata) { long studentid = formdata.StudentID; string building = formdata.Building.Buildingname; EquipmentViewer equipment_viewer = new EquipmentViewer(); IList <EquipmentViewModel> equipment = equipment_viewer.Getequipment(building); NewCheckoutDTO dto = new NewCheckoutDTO(); dto.EquipmentID = formdata.EquipmentID; dto.Status = "Out"; dto.StudentID = studentid; NewCheckoutCreator package_Creator = new NewCheckoutCreator(); //?? package_Creator.CreatePackage(dto); return(RedirectToAction("AfterCheckOut", "CheckOut")); }