Esempio n. 1
0
        /// <summary>
        /// 挂牌撤单点击事件响应
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void USeMenuTripPutBrandActionOrderClick(object sender, EventArgs e)
        {
            Debug.Assert(m_commdityInfo != null);

            //测试撤单
            #region 测试数据
            if (DataManager.Instance.Cookies != null)
            {
                CancelOrderRequest requireActionBrandArgs = new CancelOrderRequest();

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

                requireActionBrandArgs.clientId      = DataManager.Instance.LoginData.currentCompany.id + "_pc";
                requireActionBrandArgs.mqId          = "test";
                requireActionBrandArgs.commId        = Convert.ToInt32(m_commdityInfo.commId);//唯一的挂单标示
                requireActionBrandArgs.operationType = 4;
                requireActionBrandArgs.securityToken = DataManager.Instance.Cookies;

                CancelOrderResponse response = HttpService.PostActionBrandOrder(requireActionBrandArgs);
                //string actionBrandOrderByteArray = Helper.Serialize(requireActionBrandArgs);
                //ActionOrderResponseArguments response = (ActionOrderResponseArguments)service.HttpPostUrl(HTTPServiceUrlCollection.PostActionBrandOrderRequireInfoUrl, actionBrandOrderByteArray);

                if (response != null && response.Success && response.result != null)
                {
                    //重置
                    MessageBox.Show("撤单成功!");
                    RefrashPutBrandControlView();
                    if (Program.mf != null)
                    {
                        //撤单成功刷新主界面
                        if (DataManager.Instance.RemoveCommodityData(response.result.commId.ToString()))
                        {
                            Program.mf.UpdateTable();
                        }
                    }
                }
                else
                {
                    MessageBox.Show("撤单失败,请检查!");
                    return;
                }
            }
            #endregion
        }