private void TestCamel()
        {
            CamelRequestResource l_req = new CamelRequestResource("2.0", "energy");
            l_req.id = "test";
            l_req.@params = new Params[1];
            l_req.@params[0] = new Params();
            l_req.@params[0].begin = DateTimeHelper.ConvertDateTimeToUnixTimeStamp(new DateTime(2013, 7, 1));
            l_req.@params[0].end = DateTimeHelper.ConvertDateTimeToUnixTimeStamp(new DateTime(2013, 8, 2));
            l_req.@params[0].ctx = "GLOBAL";
            l_req.@params[0].gran = "DAY";
            l_req.@params[0].ind = 0;
            l_req.@params[0].lots = new string[1];
            l_req.@params[0].lots[0] = "B101";
            l_req.@params[0].build = "BatimentB";
            l_req.@params[0].prog = "CERGY01";
            l_req.@params[0].types = new string[1];
            l_req.@params[0].types[0] = "ELEC";

            if (l_req.IsValid())
            {
                JavaScriptSerializer l_javaScriptSerializer = new JavaScriptSerializer();
                string l_json = l_javaScriptSerializer.Serialize(l_req);

                try
                {
                    CamelResponseResource l_res = CamelService.Post("https://camel.steria.fr:4043/CamelWebService/energy", l_json);
                }
                catch (CamelException ex)
                {
                    Log.Text += ex.Message + ex.CamelMessage;
                }
            }
        }
        private CamelResponseResource CamelGet(string batiment, string apart, string voie, DateTime begin, DateTime end)
        {
            CamelRequestResource l_req = new CamelRequestResource("2.0", "energy");
            l_req.id = "test";
            l_req.@params = new Params[1];
            l_req.@params[0] = new Params();
            l_req.@params[0].begin = DateTimeHelper.ConvertDateTimeToUnixTimeStamp(begin);
            l_req.@params[0].end = DateTimeHelper.ConvertDateTimeToUnixTimeStamp(end);
            l_req.@params[0].ctx = "GLOBAL";
            l_req.@params[0].gran = "HOUR";
            l_req.@params[0].ind = 0;
            l_req.@params[0].lots = new string[1];
            l_req.@params[0].lots[0] = apart;
            l_req.@params[0].build = batiment;
            l_req.@params[0].prog = "CERGY01";
            l_req.@params[0].types = new string[1];
            l_req.@params[0].types[0] = voie;

            if (l_req.IsValid())
            {
                JavaScriptSerializer l_javaScriptSerializer = new JavaScriptSerializer();
                string l_json = l_javaScriptSerializer.Serialize(l_req);

                try
                {
                    return CamelService.Post("https://camel.steria.fr:4043/CamelWebService/energy", l_json);
                }
                catch (CamelException ex)
                {
                    Log("exception " + ex.CamelMessage + " " + batiment + " " + apart + " " + voie);
                }
            }

            return null;
        }