tijian_jichuang/Code/SOH.Kernel/Common/CommonDT.cs

110 lines
3.3 KiB
C#
Raw Normal View History

2025-02-20 11:54:48 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace SOH.Common
{
public class CommonDT
{
/// <summary>
/// 婚姻状况table
/// </summary>
private static DataTable _hunyin;
public static DataTable HunYin
{
get
{
if (_hunyin == null)
{
DataTable dt_hy = new DataTable();
dt_hy.Columns.Add("hybm", typeof(short));
dt_hy.Columns.Add("hymc", typeof(string));
DataRow dr = dt_hy.NewRow();
dr = dt_hy.NewRow();
dr["hybm"] = 0;
dr["hymc"] = "未婚";
dt_hy.Rows.Add(dr);
dr = dt_hy.NewRow();
dr["hybm"] = 1;
dr["hymc"] = "已婚";
dt_hy.Rows.Add(dr);
dr = dt_hy.NewRow();
dr["hybm"] = 2;
dr["hymc"] = "不限";
dt_hy.Rows.Add(dr);
_hunyin = dt_hy;
}
return _hunyin;
}
}
/// <summary>
/// 性别table
/// </summary>
private static DataTable _xb;
public static DataTable XB
{
get
{
if (_xb == null)
{
DataTable dt_xb = new DataTable();
dt_xb.Columns.Add("xbbm", typeof(short));
dt_xb.Columns.Add("xbmc", typeof(string));
DataRow dr = dt_xb.NewRow();
dr["xbbm"] = 0;
dr["xbmc"] = "男";
dt_xb.Rows.Add(dr);
dr = dt_xb.NewRow();
dr["xbbm"] = 1;
dr["xbmc"] = "女";
dt_xb.Rows.Add(dr);
dr = dt_xb.NewRow();
dr["xbbm"] = 2;
dr["xbmc"] = "不限";
dt_xb.Rows.Add(dr);
_xb = dt_xb;
}
return _xb;
}
}
private static DataTable _yhjb;
/// <summary>
/// 用户级别0普通1VIP2贵宾
/// </summary>
public static DataTable YHJB
{
get
{
if (_yhjb == null)
{
DataTable dt_yhjb = new DataTable();
dt_yhjb.Columns.Add("jbbm", typeof(short));
dt_yhjb.Columns.Add("jbmc", typeof(string));
DataRow dr = dt_yhjb.NewRow();
dr = dt_yhjb.NewRow();
dr["jbbm"] = 0;
dr["jbmc"] = "普通用户";
dt_yhjb.Rows.Add(dr);
dr = dt_yhjb.NewRow();
dr["jbbm"] = 1;
dr["jbmc"] = "VIP用户";
dt_yhjb.Rows.Add(dr);
dr = dt_yhjb.NewRow();
dr["jbbm"] = 2;
dr["jbmc"] = "贵宾用户";
dt_yhjb.Rows.Add(dr);
_yhjb = dt_yhjb;
}
return _yhjb;
}
}
}
}