/// <summary>
        /// 获取SAP过磅数据
        /// </summary>
        /// <param name="carno">车牌号</param>
        /// <param name="cartype">车辆类型</param>
        private void BindLoadWeight(string carno, string cartype)
        {
            try
            {
                DT_pd_info_upload_reqRow dtr = new DT_pd_info_upload_reqRow();
                dtr.I_CARNO        = carno;   //车牌号
                dtr.I_VEHICLE_TYPE = cartype; //车辆类型

                DT_pd_info_upload_reqRow[] listdt = new DT_pd_info_upload_reqRow[1];
                listdt[0] = dtr;

                SAPQM sp = new SAPQM();
                DT_pd_info_upload_res dtc = sp.SIbdinfouploadreq(listdt);

                if (dtc == null)
                {
                    MessageBox.Show("无返回值,车牌号无效");
                    return;
                }
                else
                {
                    //if (dtc.I_FLAG == "Y")
                    //{

                    DT_pd_info_upload_resZLET_BD_DATE[] dtzlet = dtc.ZLET_BD_DATE;
                    DT_pd_info_upload_resZMMT_CPC_DAT[] dtzmmt = dtc.ZMMT_CPC_DAT;
                    if (dtzlet != null)
                    {
                        txttent.Text             = "调用成功";
                        dataGridView1.DataSource = dtzlet;
                    }
                    if (dtzmmt != null)
                    {
                        txttent.Text             = "调用成功";
                        dataGridView1.DataSource = dtzmmt;
                    }
                    //}
                    //else
                    //{
                    //    txttent.Text = "接口返回原因是:" + dtc.I_MSG;
                    //}
                }
            }
            catch (Exception ex)
            {
                txttent.Text = "调用失败,原因是:" + ex.Message.ToString();
            }
        }
Exemple #2
0
        /// <summary>
        /// 验证车牌号
        /// </summary>
        /// <param name="listdt"></param>
        /// <returns></returns>
        public DT_pd_info_upload_res SIbdinfouploadreq(DT_pd_info_upload_reqRow[] listdt)
        {
            DT_pd_info_upload_res dtc = null;

            try
            {
                BS_CARSYS_CQ_SI_pd_info_upload_req bsxx = new BS_CARSYS_CQ_SI_pd_info_upload_req();
                bsxx.Credentials = new System.Net.NetworkCredential("CQ_CARSYS", "1234nm,.");
                dtc = bsxx.SI_pd_info_upload_req(listdt);
            }
            catch (Exception ex)
            {
                Common.WriteTextLog("验证失败:" + ex.Message);
            }
            return(dtc);
        }