예제 #1
0
        /// <summary>
        /// get files
        /// </summary>
        /// <returns></returns>
        IList <EyouSoft.Model.MFuJianInfo> GetFiles1()
        {
            var items  = new List <EyouSoft.Model.MFuJianInfo>();
            var _items = GetFiles();

            if (_items != null && _items.Count > 0)
            {
                foreach (var _item in _items)
                {
                    var item = new EyouSoft.Model.MFuJianInfo();
                    item.Filepath = _item.Filepath;
                    items.Add(item);
                }
            }

            return(items);
        }
예제 #2
0
파일: DChanPin.cs 프로젝트: jslpower/lsg
        /// <summary>
        /// get chanpin fujians
        /// </summary>
        /// <param name="chanPinId"></param>
        /// <returns></returns>
        IList <EyouSoft.Model.MFuJianInfo> GetChanPinFuJians(string chanPinId)
        {
            IList <EyouSoft.Model.MFuJianInfo> items = new List <EyouSoft.Model.MFuJianInfo>();
            var cmd = _db.GetSqlStringCommand("SELECT * FROM tbl_ChanPinFuJian WHERE ChanPinId=@ChanPinId ORDER BY FuJianId ASC");

            _db.AddInParameter(cmd, "@ChanPinId", DbType.AnsiStringFixedLength, chanPinId);

            using (var rdr = DbHelper.ExecuteReader(cmd, _db))
            {
                while (rdr.Read())
                {
                    var item = new EyouSoft.Model.MFuJianInfo();
                    item.Filepath = rdr["Filepath"].ToString();
                    item.FuJianId = rdr.GetInt32(rdr.GetOrdinal("FuJianId"));
                    item.LeiXing  = rdr.GetInt32(rdr.GetOrdinal("LeiXing"));
                    items.Add(item);
                }
            }

            return(items);
        }