Exemplo n.º 1
0
 public string CreateCraneTask(string from, string to)
 {
     if (Crane == null)
     {
         Crane = new CraneTask();
     }
     return(Crane.CreateTask(from, to));
 }
Exemplo n.º 2
0
 public string CreateAgvTask(string from, string to)
 {
     if (Agv == null)
     {
         Agv = new AgvTask();
     }
     return(Agv.CreateTask(from, to));
 }
Exemplo n.º 3
0
        public HttpResponseMessage PostTask([FromBody] TaskVm taskvm)
        {
            var response = new HttpResponseMessage();

            try
            {
                var res = taskService.CreateTask(taskvm);
                response = Request.CreateResponse(HttpStatusCode.OK, res);
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.InnerException));
            }
            return(response);
        }
Exemplo n.º 4
0
        public async Task <IActionResult> CreateTask([FromBody] TaskEntity oTask)
        {
            TaskEntity oResultTask = await _task.CreateTask(oTask, GetUserName());

            return(Ok(oResultTask));
        }
Exemplo n.º 5
0
 public virtual int CreateTask(string from, string to)
 {
     return(Task.CreateTask(from, to));
 }