示例#1
0
 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;
                 }
             }
         }
     }
 }
示例#2
0
        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));
        }
示例#3
0
 public IHttpActionResult Put(int id, [FromBody] _021_invTransMasterListDomain body)
 {
     body.ID = id;
     return(Json(attrib.Command(body, Command.Update)));
 }
示例#4
0
 public IHttpActionResult ConfirmReceive([FromBody] _021_invTransMasterListDomain body)
 {
     return(Json(attrib.Command(body, Command.Insert, true)));
 }
示例#5
0
 public IHttpActionResult Post([FromBody] _021_invTransMasterListDomain body)
 {
     return(Json(attrib.Command(body, Command.Insert)));
 }