/// <summary> /// 获取固定网址数据 /// </summary> /// <returns></returns> public DataTable GetFixedWebsite() { DataTable data = new DataTable(); try { string sqlString = @"select * from t_website order by WebOrder"; SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, null); } catch { } return data; }
/// <summary> /// 获取当前“定时表”数据 /// </summary> /// <returns></returns> public DataTable GetDingshi() { DataTable data = new DataTable(); try { string sqlString = @"select * from t_dingshi"; SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, null); } catch (Exception ex) { log.WriteLog(ex.ToString()); } return data; }
public DataTable GetCityData(CityType type, string parent) { DataTable data = new DataTable(); try { string sqlString = string.Empty; SQLiteParameter[] parameters = null; City city = new City(); switch (type) { case CityType.Sheng: sqlString = "select Name from t_city where ShengParent IS NULL and ShiParent IS NULL and Code IS NULL"; break; case CityType.Shi: sqlString = "select Name from t_city where ShengParent=@ShengParent and ShiParent IS NULL and Code IS NULL"; parameters = new SQLiteParameter[]{ new SQLiteParameter("@ShengParent",parent) }; break; case CityType.Xian: sqlString = "select Name,Code from t_city where ShiParent=@ShiParent"; parameters = new SQLiteParameter[]{ new SQLiteParameter("@ShiParent",parent) }; break; } SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, parameters); } catch (Exception ex) { log.WriteLog(ex.ToString()); } return data; }
public DataTable GetCityInfoByCode(string code) { DataTable data = new DataTable(); try { string sqlString = string.Format("select * from t_city where Code='{0}'", code); SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, null); } catch (Exception ex) { log.WriteLog(ex.ToString()); } return data; }
/// <summary> /// 获取当前"网址设置表"数据 /// </summary> /// <returns></returns> public DataTable GetWebsiteConfig() { DataTable data = new DataTable(); try { string sqlString = @"select * from t_website_config order by WebOrder"; SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, null); } catch (Exception ex) { log.WriteLog(ex.ToString()); } return data; }
public DataTable GetTimedEvents() { DataTable data = new DataTable(); try { string sqlString = @"select * from t_dingshi"; SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, null); } catch { } return data; }
public DataTable GetRiliDataByMonth(int year,int month) { DataTable data = new DataTable(); try { string sqlString = @"select * from t_rili where Yangli like '" + string.Format("{0}年{1}月",year,month) + "%' order by Yangli"; SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, null); } catch { } return data; }
public DataTable GetReminders(DateTime now) { DataTable data = new DataTable(); try { string sqlString = @"select * from t_tixing where Time >= @Time order by Id"; SQLiteParameter[] parameters = new SQLiteParameter[]{ new SQLiteParameter("@Time",now.ToString("yyyy-MM-dd HH:mm:ss")) }; SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, parameters); } catch { } return data; }
public DataTable GetNotepadByCreateTime(string createTime) { DataTable data = new DataTable(); try { string sqlString = @"select CreateTime,Title,Content from t_notepad where CreateTime=@CreateTime"; SQLiteParameter[] parameters = new SQLiteParameter[]{ new SQLiteParameter("@CreateTime",createTime) }; SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, parameters); } catch (Exception) { throw; } return data; }
public DataTable GetNotepad() { DataTable data = new DataTable(); try { string sqlString = @"select CreateTime,Title from t_notepad order by UpdateTime"; SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, null); } catch (Exception) { throw; } return data; }
public DataTable GetConfig() { DataTable data = new DataTable(); try { string sqlString = @"select * from t_config"; SqlAction action = new SqlAction(); data = action.DataTableQuery(sqlString, null); } catch { } return data; }