Ejemplo n.º 1
0
 public static void GetStationUserGroup(DataView dv, string TypeField, string CodeField, string UserFlag, string StationFlag, ref string UserCodes, ref string StationCodes)
 {
     try
     {
         UserCodes    = "";
         StationCodes = "";
         string[] arr        = UserFlag.Split(",".ToCharArray());
         string[] textArray2 = StationFlag.Split(",".ToCharArray());
         foreach (DataRowView view in dv)
         {
             DataRow row   = view.Row;
             string  val   = ConvertRule.ToString(row[TypeField]);
             string  text2 = ConvertRule.ToString(row[CodeField]);
             if (ConvertRule.FindArray(arr, val) >= 0)
             {
                 if (UserCodes != "")
                 {
                     UserCodes = UserCodes + ",";
                 }
                 UserCodes = UserCodes + text2;
             }
             else if (ConvertRule.FindArray(textArray2, val) >= 0)
             {
                 if (StationCodes != "")
                 {
                     StationCodes = StationCodes + ",";
                 }
                 StationCodes = StationCodes + text2;
             }
         }
     }
     catch (Exception exception)
     {
         throw exception;
     }
 }