コード例 #1
0
 /// <summary>
 /// 核销
 /// </summary>
 public static WriteOffResponse PostDelistBrandOrderVerify(WriteOffRequest require)
 {
     if (DataManager.Instance.Cookies != null)
     {
         string cookies = DataManager.Instance.Cookies;
         string str     = "mqID=" + require.mqId + "&";
         str = str + "clientId=" + require.clientId + "&";
         str = str + "commId=" + require.commId + "&";
         str = str + "operationType=" + require.operationType + "&";
         str = str + "confirmPrice=" + require.confirmPrice + "&";
         str = str + "orderNo=" + require.orderNo + "&";
         str = str + "remarks=" + require.remarks;
         string url = Helper.GetURL(HTTPServiceUrlCollection.PostDelistBrandOrderVerifyRequireInfoUrl);
         string hr  = PostData(url, cookies, str, "application/x-www-form-urlencoded");
         if (hr != null)
         {
             try
             {
                 var bi = Helper.Deserialize <WriteOffResponse>(hr);
                 return(bi);
             }
             catch (Exception err)
             {
                 Logger.LogError(err.ToString());
             }
         }
     }
     return(null);
 }
コード例 #2
0
        /// <summary>
        /// 确定-处理业务
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_OK_Click(object sender, EventArgs e)
        {
            if (m_delistDataInfo == null)
            {
                return;
            }
            m_delistDataInfo.confirmPrice = this.textBox_Volumn.Text;
            //校验业务逻辑-并处理-摘牌核销业务

            #region 测试数据
            WriteOffRequest requireDelistBrandVerifyArgs = new WriteOffRequest();

            if (DataManager.Instance.LoginData == null)
            {
                MessageBox.Show("登陆状态有误,请重新登陆");
                return;
            }

            requireDelistBrandVerifyArgs.clientId      = DataManager.Instance.LoginData.currentCompany.id + "_pc";
            requireDelistBrandVerifyArgs.mqId          = "test";
            requireDelistBrandVerifyArgs.commId        = Convert.ToInt64(m_delistDataInfo.commId); //唯一的commID挂牌标示
            requireDelistBrandVerifyArgs.operationType = 5;                                        //核销操作
            requireDelistBrandVerifyArgs.confirmPrice  = m_delistDataInfo.confirmPrice;
            requireDelistBrandVerifyArgs.orderNo       = m_delistDataInfo.orderNo;
            requireDelistBrandVerifyArgs.remarks       = "我是韩宇在摘牌核销";
            WriteOffResponse response = HttpService.PostDelistBrandOrderVerify(requireDelistBrandVerifyArgs);

            if (response != null && response.data != null)
            {
                if (response.data.confirmStatus == "2")
                {
                    MessageBox.Show("待对方确认价格 !");
                }
                else if (response.data.confirmStatus == "1")
                {
                    MessageBox.Show("待我方确认价格!");
                }
                else if (response.data.confirmStatus == "3")
                {
                    MessageBox.Show("双方价格不符!");
                }
                else if (response.data.confirmStatus == "4")
                {
                    MessageBox.Show("核销成功!");
                    m_delistCheckResult = true;
                }

                this.Close();
            }
            else
            {
                MessageBox.Show("摘牌核销失败,请检查参数并重新摘牌核销!");
                return;
            }

            #endregion
        }