Пример #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;
 }
Пример #2
0
 public static int UpdateDriverInfor(int int_0, int int_1, DateTime dateTime_0, int int_2, string string_0, string string_1, string string_2, DateTime dateTime_1)
 {
     SqlDataAccess access = new SqlDataAccess();
     SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@carid", int_0), new SqlParameter("@Status", int_1), new SqlParameter("@ReportTime", dateTime_0), new SqlParameter("@ReadResult", int_2), new SqlParameter("@DriverName", string_0), new SqlParameter("@LaborQualificationNo", string_1), new SqlParameter("@releaseName", string_2), new SqlParameter("@validity", dateTime_1), new SqlParameter("@ErrMsg", SqlDbType.Int) };
     object obj2 = 1;
     access.updateBySp("WebGpsClient_UpdateDriverInforEx", parameterArray, "@ErrMsg", out obj2);
     return Convert.ToInt32(obj2);
 }
Пример #3
0
 public static int UpdateDriverInfor(int int_0, string string_0, string string_1, string string_2, string string_3)
 {
     SqlDataAccess access = new SqlDataAccess();
     SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@carid", int_0), new SqlParameter("@IdentityCard", string_0), new SqlParameter("@LaborQualificationNo", string_1), new SqlParameter("@DriverName", string_2), new SqlParameter("@releaseName", string_3), new SqlParameter("@ErrMsg", SqlDbType.Int) };
     object obj2 = 1;
     access.updateBySp("WebGpsClient_UpdateDriverInfor", parameterArray, "@ErrMsg", out obj2);
     return Convert.ToInt32(obj2);
 }
Пример #4
0
 public static string GetMenuName(string string_0)
 {
     string str = "select MsgName from GpsJTBMsgParam where id=" + string_0 + " and MsgType=2";
     DataTable table = new SqlDataAccess().getDataBySql(str);
     if (((table != null) && (table.Rows.Count != 0)) && (table.Rows[0][0] != DBNull.Value))
     {
         return table.Rows[0][0].ToString();
     }
     return "未知信息类型";
 }
Пример #5
0
 public static void UpdateMenuInfor(string string_0, string string_1, string string_2, bool bool_0)
 {
     string str = "";
     SqlDataAccess access = new SqlDataAccess();
     str = "delete from GpsJTBMsgHistory where SimNum='" + string_0 + "' and MsgType=" + string_1 + " and MsgID=" + string_2;
     access.DeleteBySql(str);
     if (bool_0)
     {
         str = " insert into GpsJTBMsgHistory(SimNum,MsgType,MsgID,CreateDate) values('" + string_0 + "'," + string_1 + "," + string_2 + ",getdate())";
         access.insertBySql(str);
     }
 }
Пример #6
0
 public static int InsertCommandParameterToDB(string string_0, int int_0, int int_1, string string_1)
 {
     string format = "insert into GPSJTBSysSndCmd(SimNum,CmdCode,CmdContent,OrderId,AddTime,bSend) values('{0}', {1}, '{2}',{3}, getdate(),-1)";
     string str2 = string.Format(format, new object[] { string_0, int_1, string_1, int_0 });
     SqlDataAccess access = new SqlDataAccess();
     return access.insertBySql(str2);
 }
Пример #7
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;
 }