コード例 #1
0
 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));
     }
 }
コード例 #2
0
 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));
     }
 }
コード例 #3
0
        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());
        }
コード例 #4
0
 public void Update(DepartmentJob entity)
 {
     _DepartmentJobDal.Update(entity);
 }
コード例 #5
0
 public void Delete(DepartmentJob entity)
 {
     _DepartmentJobDal.Delete(entity);
 }
コード例 #6
0
 public void Create(DepartmentJob entity)
 {
     _DepartmentJobDal.Create(entity);
 }