Esempio n. 1
0
        public Stream GetJson(Core.Model.mdlParam json)
        {
            var result = new Core.Model.mdlResultSvc();

            result.Title = "Get Json Download";
            string aa         = "";     //test chris
            var    resultJson = new Core.Model.mdlJsonList();

            resultJson = JsonFacade.LoadJson(json);

            if (resultJson.mdlJson.FirstOrDefault().CallPlanList.Count > 0)
            {
                result.StatusCode    = "01";
                result.StatusMessage = "Success";
            }
            else
            {
                result.StatusCode    = "00";
                result.StatusMessage = "Failed";
            }
            result.Value = resultJson;
            var    strJson = Core.Services.RestPublisher.Serialize(resultJson);
            var    size    = System.Text.ASCIIEncoding.Unicode.GetByteCount(strJson) / 1024;
            string sizeKB  = size.ToString() + " KB";


            Core.Manager.LogFacade.InsertLog("DownloadJson", json.EmployeeID, result.StatusMessage, json.BranchID, json.DeviceID, sizeKB);


            string serializeJson = Core.Services.RestPublisher.Serialize(result);

            WebOperationContext.Current.OutgoingResponse.ContentType = "application/json; charset=utf-8";
            MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(serializeJson));

            return(ms);
        }
Esempio n. 2
0
 public Core.Model.mdlResult CheckVersion(Core.Model.mdlParam param)
 {
     return(Core.Manager.MobileConfigFacade.CheckVersion(param));
 }
Esempio n. 3
0
 public List <Core.Model.mdlMobileConfig> GetMobileConfig(Core.Model.mdlParam param)
 {
     return(MobileConfigFacade.LoadMobileConfig(param));
 }