Ejemplo n.º 1
0
 private int GetFitmentId(string fitment, List <DicDataInfo> fitmentData)
 {
     try
     {
         if (string.IsNullOrEmpty(fitment))
         {
             return(0);
         }
         string[] f = fitment.Split(',');
         if (f.Length == 0)
         {
             return(0);
         }
         DicDataInfo d = fitmentData.FirstOrDefault(a => a.Name == f[0]);
         return(d == null ? 0 : int.Parse(d.Value));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Ejemplo n.º 2
0
 private int GetPurposeId(string purpose, List <DicDataInfo> purposeData)
 {
     try
     {
         if (string.IsNullOrEmpty(purpose))
         {
             return(0);
         }
         string[] p = purpose.Split(',');
         if (p.Length == 0)
         {
             return(0);
         }
         DicDataInfo d = purposeData.FirstOrDefault(a => a.Name == p[0]);
         return(d == null ? 0 : int.Parse(d.Value));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }