Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public DataTable GetConfigWebsite()
        {
            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
            {
            }
            return(data);
        }
Ejemplo n.º 3
0
        public DataTable GetConfig()
        {
            DataTable data = new DataTable();

            try
            {
                string    sqlString = @"select *  from t_config";
                SqlAction action    = new SqlAction();
                data = action.DataTableQuery(sqlString, null);
            }
            catch (Exception ex)
            {
                log.WriteLog(ex.ToString());
            }
            return(data);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        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);
        }