Example #1
0
        /// <summary>
        /// 获取单条图片记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static ProductImgRecord GetSingleImgRecord(string id)
        {
            DataTable        data   = new SqlDBHelper().ExecuteQuery(String.Format(GetSingleImgRecordSqlCmdTemplate, id));
            ProductImgRecord record = new ProductImgRecord()
            {
                ProductSysNo = data.Rows[0]["SysNo"].ToString(),
                Id           = data.Rows[0]["id"].ToString(),
                ProductName  = data.Rows[0]["ProductName"].ToString().Trim(),
                LargeImg     = data.Rows[0]["product_limg"].ToString().Trim(),
                SmallImg     = data.Rows[0]["product_simg"].ToString().Trim(),
                OrderNum     = int.Parse(data.Rows[0]["OrderNum"].ToString().Trim()),
                Status       = int.Parse(data.Rows[0]["Status"].ToString().Trim()),
            };

            return(record);
        }
Example #2
0
 /// <summary>
 /// 获取单条图片记录
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static ProductImgRecord GetSingleImgRecord(string id)
 {
     DataTable data = new SqlDBHelper().ExecuteQuery(String.Format(GetSingleImgRecordSqlCmdTemplate, id));
     ProductImgRecord record = new ProductImgRecord()
     {
         ProductSysNo = data.Rows[0]["SysNo"].ToString(),
         Id = data.Rows[0]["id"].ToString(),
         ProductName = data.Rows[0]["ProductName"].ToString().Trim(),
         LargeImg = data.Rows[0]["product_limg"].ToString().Trim(),
         SmallImg = data.Rows[0]["product_simg"].ToString().Trim(),
         OrderNum = int.Parse(data.Rows[0]["OrderNum"].ToString().Trim()),
         Status = int.Parse(data.Rows[0]["Status"].ToString().Trim()),
     };
     return record;
 }