示例#1
0
        private void BtnSignBack_Click(object sender, EventArgs e)
        {
            SignBackPoListInput input = new SignBackPoListInput();

            foreach (DataGridViewRow r in dgvData.SelectedRows)
            {
                ColTaskQuery colTask = new ColTaskQuery()
                {
                    lineLocationId = Convert.ToInt32(r.Cells["ColLineLocationId"].Value)
                };
                if (r.Cells["ColTaskId"].Value != null)
                {
                    colTask.taskId = Convert.ToInt32(r.Cells["ColTaskId"].Value);
                }
                input.colTaskQueries.Add(colTask);
            }
            if (bll.SignBackPoList(input))
            {
                MessageBox.Show("订单签返成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("错误码:" + bll.ErrorCode + "错误信息:" + bll.ErrorMsg, "签返失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#2
0
        /// <summary>
        /// 签返订单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        internal SignBackPoListOutput SignBackPoList(SignBackPoListInput input)
        {
            JsonSerializerSettings settings = new JsonSerializerSettings
            {
                NullValueHandling = NullValueHandling.Ignore
            };
            string json    = JsonConvert.SerializeObject(input, settings);
            var    res     = HwApiHelper.HuaweiPostSync(baseUrl, signBackUri, token.Access_token, json, null);
            string resJson = HwApiHelper.GetResponseString(res);
            var    output  = JsonConvert.DeserializeObject <SignBackPoListOutput>(resJson);

            ErrorCode = output.Code;
            ErrorMsg  = output.Result;
            return(output);
        }
示例#3
0
        public bool SignBackPoList(SignBackPoListInput input)
        {
            var res = dal.SignBackPoList(input);

            return(res.Success);
        }