void setProjectInfo(_021_invTransMasterListDomain transMaster, JArray projectArray) { if (transMaster == null) { return; } foreach (JObject trans in projectArray) { if (transMaster.TransInfoOrigin != null) { if (transMaster.TransInfoOrigin.ProjectID_EnggDB == int.Parse(trans["ID"].ToString())) { //transMaster.TransInfoOrigin.ProjectInfo = trans; //break; } if (transMaster.TransInfoDestination != null) { if (transMaster.TransInfoDestination.ProjectID_EnggDB == int.Parse(trans["ID"].ToString())) { //transMaster.TransInfoDestination.ProjectInfo = trans; } } } } }
public IHttpActionResult Get(int id) { //return Ok(projectArray); _021_invTransMasterListDomain result = attrib.Get(id); JArray projectArray = Newtonsoft.Json.JsonConvert.DeserializeObject <JArray>(new Helper.SynchronousRequest("http://124.105.198.3:94/api/Projects").HttpRequest()); setProjectInfo(result, projectArray); /* * */ return(Ok(result)); }
public IHttpActionResult Put(int id, [FromBody] _021_invTransMasterListDomain body) { body.ID = id; return(Json(attrib.Command(body, Command.Update))); }
public IHttpActionResult ConfirmReceive([FromBody] _021_invTransMasterListDomain body) { return(Json(attrib.Command(body, Command.Insert, true))); }
public IHttpActionResult Post([FromBody] _021_invTransMasterListDomain body) { return(Json(attrib.Command(body, Command.Insert))); }