public IActionResult DeleteStaff([FromBody] StaffModel staff) { if (StaffRepo.Delete(staff)) { return(Ok($"Successfully deleted {staff.name}'s details.")); } else { return(NotFound($"Staff member was not found.")); } }
public IActionResult AddStaff([FromBody] StaffModel staff) { if (StaffRepo.Add(staff)) { return(Ok($"Successfully added {staff.name} to staff.")); } else { return(BadRequest("This member of staff already exists.")); } }
public EntityService() { _appointmentService = new AppointmentRepo(); _cityService = new CityRepo(); _hospitalService = new HospitalRepo(); _patientRepo = new PatientRepo(); _policlinicService = new PoliclinicRepo(); _staffRepo = new StaffRepo(); _titleService = new TitleRepo(); _townService = new TownRepo(); _userService = new UserRepo(); }
public FrmStaff(string staffId = "") { InitializeComponent(); _repo = new StaffRepo(); _id = staffId; LoadDropdowns(); if (staffId != "") { lblTitle.Text = "Update Staff"; // comboDept.Enabled = false; GetItem(staffId); } }
public FrmUploadStaff() { InitializeComponent(); _repo = new StaffRepo(); }
public IActionResult Get(int id) { var staff = StaffRepo.GetById(id); return(Ok(staff)); }
public IActionResult Get() { var staff = StaffRepo.GetAll(); return(Ok(staff)); }
public PgUser() { InitializeComponent(); _repo = new StaffRepo(); }
public ActionResult <string> Get(int id) { var staff = StaffRepo.Retrieve(id); return(Ok(staff)); }
public StaffController() { this.repo = new StaffRepo(); }