Esempio n. 1
0
    public bool SetAdvertiseInfoXML(string str, string customer_id)
    {
        AdvertiseService advertiseOrderService = new AdvertiseService();
        bool             bReturn = advertiseOrderService.SetAdvertiseOrderXML(str, customer_id);

        return(bReturn);
    }
Esempio n. 2
0
    private void TestSetAdvertiseOrderAdvertiseInfoXML()
    {
        AdvertiseOrderInfo adInfo1 = new AdvertiseOrderInfo();

        adInfo1.order_id    = "2";
        adInfo1.order_code  = "可口可乐";
        adInfo1.order_date  = "2012-11-19";
        adInfo1.date_start  = "2012-12-01";
        adInfo1.date_end    = "2012-12-31";
        adInfo1.time_start  = "00:00";
        adInfo1.time_end    = "24:00";
        adInfo1.playbace_no = Convert.ToInt32("100");
        adInfo1.customer_id = "29E11BDC6DAC439896958CC6866FF64E";
        adInfo1.status      = "10";
        adInfo1.status_desc = "审批通过";
        adInfo1.url_address = "http://192.168.0.55:8201/";
        IList <AdvertiseOrderInfo> advertiseOrderInfoList = new List <AdvertiseOrderInfo>();

        advertiseOrderInfoList.Add(adInfo1);
        string str1 = cXMLService.Serialiaze(advertiseOrderInfoList);

        string customer_id = "29E11BDC6DAC439896958CC6866FF64E";
        string str         = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<ArrayOfAdvertiseOrderInfo xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><AdvertiseOrderInfo> <order_id>100</order_id><order_code>001</order_code> <order_date>2012-01-01</order_date><playbace_no>0</playbace_no> <status>0</status> <icount>0</icount><row_no>0</row_no></AdvertiseOrderInfo></ArrayOfAdvertiseOrderInfo>";
        //反序列化
        //IList<AdvertiseOrderAdvertiseInfo> advertiseOrderAdvertiseInfoList = (IList<AdvertiseOrderAdvertiseInfo>)cXMLService.Deserialize(str, typeof(List<cPos.Model.Advertise.AdvertiseOrderAdvertiseInfo>));


        AdvertiseOrderService advertiseOrderService = new AdvertiseOrderService();
        //bool bReturn = advertiseOrderService.SetAdvertiseOrderXML(str, customer_id);

        string strAdvertise = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<ArrayOfAdvertiseInfo xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n  <AdvertiseInfo>\r\n    <advertise_id>EA7E0557235B4295BAC72CCF470154A0</advertise_id>\r\n    <advertise_name>ad01</advertise_name>\r\n    <advertise_code>ad01</advertise_code>\r\n    <file_size>10000</file_size>\r\n    <file_format>.flv</file_format>\r\n    <url_address>ad01.flv</url_address>\r\n    <status>1</status>\r\n    <icount>0</icount>\r\n    <row_no>0</row_no>\r\n  </AdvertiseInfo>\r\n</ArrayOfAdvertiseInfo>";


        cPos.Service.AdvertiseService advertiseService = new AdvertiseService();
        bool b = advertiseService.SetAdvertiseOrderXML(strAdvertise, "FEA59DDDBB034817AD71DA12262ED0D8");

        this.lb1.Text = b.ToString();
    }