Esempio n. 1
0
 public static string GetAutoRelyInfoString()
 {
     string str = "select distinct a.userId from GpsUser_Online a";
     SqlDataAccess access = new SqlDataAccess();
     DataTable table = null;
     try
     {
         table = access.getDataBySql(str);
     }
     catch
     {
     }
     if ((table == null) || (table.Rows.Count <= 0))
     {
         return string.Empty;
     }
     string str2 = string.Empty;
     string key = string.Empty;
     foreach (DataRow row in table.Rows)
     {
         key = row["userid"] as string;
         if (_userIDCarList.ContainsKey(key))
         {
             string str4 = str2;
             str2 = str4 + _userIDCarList[key].ToString() + "|" + key + " ";
         }
     }
     return str2;
 }
Esempio n. 2
0
 public static string GetWorkIdByUserId(string string_0)
 {
     string format = "select top 1 a.Id from GpsUser_Online a where a.userId = '{0}' order by logintime desc";
     format = string.Format(format, string_0);
     SqlDataAccess access = new SqlDataAccess();
     DataTable table = null;
     try
     {
         table = access.getDataBySql(format);
     }
     catch
     {
     }
     if ((table != null) && (table.Rows.Count > 0))
     {
         return table.Rows[0]["Id"].ToString();
     }
     return string.Empty;
 }