Exemple #1
0
 private T GetClassPropertyValue <T>(IndustryIndVal indVal, string propertyName)
 {
     if (string.IsNullOrEmpty(propertyName))
     {
         return(Activator.CreateInstance <T>());
     }
     return((T)indVal.GetType().GetProperties().Single(_ => _.Name == propertyName).GetValue(indVal));
 }
Exemple #2
0
 private string GetAbilityMarks(decimal val, string indType, IndustryIndVal indVal)
 {
     if (indType == "收入利润类" || indType == "收入利潤類")
     {
         if (val >= indVal.MaxVal)
         {
             return("優良");
         }
         else if (val >= indVal.Quartile1 && val < indVal.MaxVal)
         {
             return("良好");
         }
         else if (val >= indVal.AvgVal && val < indVal.Quartile1)
         {
             return("尚可");
         }
         else if (val >= indVal.MinVal && val < indVal.AvgVal)
         {
             return("待加強");
         }
         else if (val < indVal.MinVal)
         {
             return("嚴重落後");
         }
         else
         {
             return("");
         }
     }
     else if (indType == "费用周转类" || indType == "費用周轉類")
     {
         if (val < indVal.MinVal)
         {
             return("優良");
         }
         else if (val < indVal.Quartile3 && val >= indVal.MinVal)
         {
             return("良好");
         }
         else if (val < indVal.AvgVal && val >= indVal.Quartile3)
         {
             return("尚可");
         }
         else if (val < indVal.MaxVal && val >= indVal.AvgVal)
         {
             return("待加強");
         }
         else if (val >= indVal.MaxVal)
         {
             return("嚴重落後");
         }
         else
         {
             return("");
         }
     }
     else
     {
         return("");
     }
 }