public HttpResponseMessage InsertDepartment(List <DepartmentRequestModels> data) { using (var clientContext = BambooAirwayBE.API.Utilities.Utils.Utils.InitializeClientContext()) { var job = new DepartmentJob(clientContext); var allDepartment = job.InsertDepartment(data, clientContext); if (allDepartment.ErrorType != 400) { return(Request.CreateResponse(HttpStatusCode.OK, allDepartment)); } return(Request.CreateResponse(HttpStatusCode.BadRequest, allDepartment)); } }
public HttpResponseMessage GetAllDepartment() { using (var clientContext = BambooAirwayBE.API.Utilities.Utils.Utils.InitializeClientContext()) { var departmentJob = new DepartmentJob(clientContext); var allTimeKeepings = departmentJob.GetAllDepartment(); if (allTimeKeepings.ErrorType != 400) { return(Request.CreateResponse(HttpStatusCode.OK, allTimeKeepings)); } return(Request.CreateResponse(HttpStatusCode.BadRequest, allTimeKeepings)); } }
public IActionResult CreateDepartmentJob(int depId, int jobId) { if (ModelState.IsValid) { var entity = new DepartmentJob() { DepartmentId = depId, JobId = jobId }; _departmentJobService.Create(entity); return(RedirectToAction("ListDepartmentJob")); } return(View()); }
public void Update(DepartmentJob entity) { _DepartmentJobDal.Update(entity); }
public void Delete(DepartmentJob entity) { _DepartmentJobDal.Delete(entity); }
public void Create(DepartmentJob entity) { _DepartmentJobDal.Create(entity); }