|
|
|
|
using System;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Data.SqlClient;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using DSWeb.Models;
|
|
|
|
|
using DSWeb.DataAccess;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.EntityDA
|
|
|
|
|
{
|
|
|
|
|
public class CodeCtnDispDA
|
|
|
|
|
{
|
|
|
|
|
private const string SQL_SELECT_CodeCtnDisp_ALL = " SELECT top 1 ID,CNT1,CNT2,CNT3,CNT4,CNT5,CNT6,CNT7,CNT8,CNT9,CNT10,CORPID FROM code_ctn_disp";
|
|
|
|
|
|
|
|
|
|
#region 获取信息
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="strGid"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public CodeCtnDispEntity GetAllCodeCtnDisp()
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity CodeCtnDispEntity = null;
|
|
|
|
|
using (SqlDataReader sqlRead = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, SQL_SELECT_CodeCtnDisp_ALL, null))
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
while (sqlRead.Read())
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity = new CodeCtnDispEntity();
|
|
|
|
|
if (!sqlRead.IsDBNull(0))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.ID = sqlRead.GetString(0);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(1))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN1 = sqlRead.GetString(1);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(2))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN2 = sqlRead.GetString(2);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(3))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN3 = sqlRead.GetString(3);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(4))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN4 = sqlRead.GetString(4);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(5))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN5 = sqlRead.GetString(5);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(6))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN6 = sqlRead.GetString(6);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(7))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN7 = sqlRead.GetString(7);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(8))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN8 = sqlRead.GetString(8);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(9))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN9 = sqlRead.GetString(9);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(10))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CTN10 = sqlRead.GetString(10);
|
|
|
|
|
}
|
|
|
|
|
if (!sqlRead.IsDBNull(11))
|
|
|
|
|
{
|
|
|
|
|
CodeCtnDispEntity.CORPID = sqlRead.GetString(11);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception execError)
|
|
|
|
|
{
|
|
|
|
|
throw execError;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return CodeCtnDispEntity;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|