예제 #1
0
        public static T GetObject <T>(DataRow dr) where T : new()
        {
            T list = new T();

            list = TableList <T> .ConvertModel(dr);

            return(list);
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="cmd"></param>
        /// <returns></returns>
        public T FillT <T>(string cmd) where T : new()
        {
            T       list = new T();
            DataSet ds   = this.Getds(cmd, "temp");

            if (ds.Tables["temp"].Rows.Count > 0)
            {
                list = TableList <T> .ConvertModel(ds.Tables["temp"].Rows[0]);
            }
            return(list);
        }