You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
3.8 KiB
Plaintext

11 months ago
using System;
using System.Data;
using BP.DA;
using BP.En;
using BP.Port;
namespace BP.CN
{
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public class QXSAttr : EntityNoNameAttr
{
#region <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public const string FK_PQ = "FK_PQ";
public const string FK_SF = "FK_SF";
public const string NameS = "NameS";
#endregion
}
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public class QXS :EntityNoName
{
#region <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public string NameS
{
get
{
return this.GetValStrByKey(QXSAttr.NameS);
}
}
public string FK_PQ
{
get
{
return this.GetValStrByKey(QXSAttr.FK_PQ);
}
}
public string FK_SF
{
get
{
return this.GetValStrByKey(QXSAttr.FK_SF);
}
}
#endregion
#region <20><><EFBFBD><EFBFBD><ECBAAF>
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.OpenForSysAdmin();
return uac;
}
}
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public QXS(){}
public QXS(string no):base(no)
{
}
/// <summary>
/// Map
/// </summary>
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map();
#region <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
map.EnDBUrl = new DBUrl(DBUrlType.AppCenterDSN);
map.PhysicsTable = "CN_QXS";
map.DepositaryOfMap = Depositary.Application;
map.DepositaryOfEntity = Depositary.None;
map.EnDesc = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
map.EnType = EnType.App;
map.CodeStruct = "4";
#endregion
#region <20>ֶ<EFBFBD>
map.AddTBStringPK(QXSAttr.No, null, "<22><><EFBFBD><EFBFBD>", true, false, 0, 50, 50);
map.AddTBString(QXSAttr.Name, null, "<22><><EFBFBD><EFBFBD>", true, false, 0, 50, 200);
map.AddTBString(QXSAttr.NameS, null, "NameS", true, false, 0, 50, 200);
map.AddDDLEntities(QXSAttr.FK_SF, null, "ʡ<><CAA1>", new SFs(), true);
map.AddDDLEntities(QXSAttr.FK_PQ, null, "Ƭ<><C6AC>", new PQs(), true);
map.AddSearchAttr(QXSAttr.FK_SF);
#endregion
this._enMap = map;
return this._enMap;
}
}
#endregion
/// <summary>
/// <20><>ȡһ<C8A1><D2BB><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>Ĭ<EFBFBD>ϵ<EFBFBD>ֵ<EFBFBD><D6B5>
/// </summary>
/// <param name="name"><3E>ִ<EFBFBD></param>
/// <param name="defVal">Ĭ<><C4AC>ֵ</param>
/// <returns><3E><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD></returns>
public static string GenerQXSNoByName(string name, string defVal)
{
//<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
QXSs qxss = new QXSs();
qxss.RetrieveAll();
foreach (QXS qxs in qxss)
{
if (name.Contains(qxs.NameS))
return qxs.No;
}
SFs sfs = new SFs();
sfs.RetrieveAll();
foreach (SF sf in sfs)
{
if (name.Contains(sf.Names))
return sf.No;
}
return defVal;
}
}
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public class QXSs : EntitiesNoName
{
#region
/// <summary>
/// <20>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD> Entity
/// </summary>
public override Entity GetNewEntity
{
get
{
return new QXS();
}
}
#endregion
#region <20><><EFBFBD><EFBFBD><ECB7BD>
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s
/// </summary>
public QXSs(){}
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s
/// </summary>
/// <param name="sf">ʡ<><CAA1></param>
public QXSs(string sf)
{
this.Retrieve(QXSAttr.FK_SF, sf);
}
#endregion
}
}