Ejemplo n.º 1
0
        public static string CreateAndRetrieveNewJsonPath(BeazleyUIDataModel model)
        {
            string rootPath         = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            string UnirisxJsonsPath = rootPath + @"\Unirisx_Jsons";

            string jsonPath = UnirisxJsonsPath +
                              @"\" + DateTime.Now.Day + "_" + DateTime.Now.Month + "_" + DateTime.Now.Year + "_" + DateTime.Now.ToLongTimeString().Replace(":", "_");

            var directoryInfo = System.IO.Directory.CreateDirectory(jsonPath);

            return(directoryInfo.FullName);
        }
Ejemplo n.º 2
0
        public string GetValueDataFromBeazleyDictionary(BeazleyUIDataModel data, string valueToSerach)
        {
            string result        = "NOT FOUND";
            var    policyDetails = data.PolicyDetails.First();
            var    policyDetail  = policyDetails.Value;

            foreach (var keyvaluePair in policyDetail.DataFromBeazley)
            {
                if (keyvaluePair.Key.Equals(valueToSerach))
                {
                    result = keyvaluePair.Value;
                    break;
                }
            }
            return(result);
        }
Ejemplo n.º 3
0
 public string GetPolicyReference(BeazleyUIDataModel data)
 {
     return(data.PolicyDetails.Keys.First());
 }