Example #1
0
        public PeriodTotalInfo GetPeriodTotal()
        {
            string strSql = "select * from PeriodTotal";
            IList <PeriodTotalInfo> listInfos = ModelConvertHelper <PeriodTotalInfo> .ConvertTo <PeriodTotalInfo>(
                DBFactory.GetDB(DBType.SQLITE, m_strConn).ExecuteStrSql(strSql));

            if (listInfos.Count <= 0)
            {
                return(null);
            }
            else
            {
                return(listInfos[0]);
            }
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="PeriodNumber">硬盘号</param>
        /// <returns></returns>
        public PeriodInfo GetPeriod(string PeriodNumber)
        {
            string             strSql = "select * from Period where PeriodNumber=@PeriodNumber";
            IList <PeriodInfo> list   = ModelConvertHelper <PeriodInfo> .ConvertTo <PeriodInfo>(DBFactory.GetDB(DBType.SQLITE, m_strConn).ExecuteStrSql(strSql, new DbParameter[] {
                new SQLiteParameter()
                {
                    Value = PeriodNumber, ParameterName = "@PeriodNumber"
                }
            }));

            if (list.Count <= 0)
            {
                return(null);
            }
            else
            {
                return(list[0]);
            }
        }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public List <PeriodInfo> GetPeriod()
        {
            string strSql = "select * from Period";

            return(ModelConvertHelper <PeriodInfo> .ConvertTo <PeriodInfo>(DBFactory.GetDB(DBType.SQLITE, m_strConn).ExecuteStrSql(strSql)).ToList());
        }