Exemple #1
0
 private void SetPrjStates(DataTable dbInfo)
 {
     System.Collections.Generic.Dictionary <string, string> dictionary = TypeList.GetCodeList(this.types).ToDictionary((TypeList type) => type.Value, (TypeList type) => type.Text);
     if (dbInfo != null)
     {
         dbInfo.Columns.Add("PrjStateName", System.Type.GetType("System.String")).SetOrdinal(7);
         foreach (DataRow dataRow in dbInfo.Rows)
         {
             if (dictionary.ContainsKey(dataRow["PrjState"].ToString()))
             {
                 dataRow["PrjStateName"] = dictionary[dataRow["PrjState"].ToString()];
             }
             else
             {
                 dataRow["PrjStateName"] = string.Empty;
             }
         }
     }
 }