Example #1
0
        /// <summary>
        /// 更新立库的配送任务,如01012309
        /// </summary>
        /// <param name="line_id"></param>
        /// <returns></returns>
        public string updateTask(string url)
        {
            //string url = "http://" + str_ip + "/api/material/materialFinishCommand/"+cmd+"/" + line_id;
            //string url = "192.168.248.129:8000";
            string result = "false";

            try
            {
                result = Get(url);
                ResponseData2 rd      = new ResponseData2();
                Object        objrd   = getObjectByJson(result, rd);
                ResponseData2 resdata = (ResponseData2)objrd;
                bool          success = resdata.success;
                if (success)
                {
                    result = "true";
                }
                else
                {
                    result = "false";
                }
            }
            catch
            {
                result = "false";
            }

            return(result);
        }
Example #2
0
        /// <summary>
        /// 获取立库的当前配送任务
        /// </summary>
        /// <param name="line_id"></param>
        /// <returns></returns>
        public string getTask(string line_id)
        {
            string url     = "http://" + str_ip + "/api/material/materialInstoreCommand/" + line_id;
            string result  = "false";
            string result2 = "11";

            try
            {
                result  = Get(url);
                result2 = result;
                ResponseData2 rd      = new ResponseData2();
                Object        objrd   = getObjectByJson(result, rd);
                ResponseData2 resdata = (ResponseData2)objrd;
                bool          success = resdata.success;
                if (success)
                {
                    result = resdata.data;
                }
                else
                {
                    result = "false";
                }
            }
            catch
            {
                result = "false";
            }

            return(result);
        }