using System;
using System.Collections;
using BP.DA;
using BP.En;
namespace BP.Sys
{
///
/// 剪切图片附件数据存储 - 属性
///
public class FrmImgAthDBAttr : EntityMyPKAttr
{
///
/// 附件
///
public const string FK_FrmImgAth = "FK_FrmImgAth";
///
/// 主表
///
public const string FK_MapData = "FK_MapData";
///
/// RefPKVal
///
public const string RefPKVal = "RefPKVal";
///
/// 文件名称
///
public const string FileName = "FileName";
///
/// 文件扩展
///
public const string FileExts = "FileExts";
///
/// 文件大小
///
public const string FileSize = "FileSize";
///
/// 保存到
///
public const string FileFullName = "FileFullName";
///
/// 记录日期
///
public const string RDT = "RDT";
///
/// 记录人
///
public const string Rec = "Rec";
///
/// 记录人名字
///
public const string RecName = "RecName";
///
/// 类别
///
public const string Sort = "Sort";
///
/// 备注
///
public const string MyNote = "MyNote";
}
///
/// 剪切图片附件数据存储
///
public class FrmImgAthDB : EntityMyPK
{
#region 属性
///
/// 类别
///
public string Sort
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.Sort);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.Sort, value);
}
}
///
/// 记录日期
///
public string RDT
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.RDT);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.RDT, value);
}
}
///
/// 文件
///
public string FileFullName
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.FileFullName);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.FileFullName, value);
}
}
///
/// 附件路径
///
public string FilePathName
{
get
{
return this.FileFullName.Substring(this.FileFullName.LastIndexOf('/') + 1);
}
}
///
/// 附件名称
///
public string FileName
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.FileName);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.FileName, value);
}
}
///
/// 附件扩展名
///
public string FileExts
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.FileExts);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.FileExts, value.Replace(".", ""));
}
}
///
/// 相关附件
///
public string FK_FrmImgAth
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.FK_FrmImgAth);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.FK_FrmImgAth, value);
}
}
///
/// 主键值
///
public string RefPKVal
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.RefPKVal);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.RefPKVal, value);
}
}
///
/// MyNote
///
public string MyNote
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.MyNote);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.MyNote, value);
}
}
///
/// 记录人
///
public string Rec
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.Rec);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.Rec, value);
}
}
///
/// 记录人名称
///
public string RecName
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.RecName);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.RecName, value);
}
}
///
/// 附件编号
///
public string FrmID
{
get
{
return this.GetValStringByKey(FrmImgAthDBAttr.FK_MapData);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.FK_MapData, value);
}
}
///
/// 文件大小
///
public float FileSize
{
get
{
return this.GetValFloatByKey(FrmImgAthDBAttr.FileSize);
}
set
{
this.SetValByKey(FrmImgAthDBAttr.FileSize, value / 1024);
}
}
#endregion
#region 构造方法
///
/// 剪切图片附件数据存储
///
public FrmImgAthDB()
{
}
///
/// 剪切图片附件数据存储
///
///
public FrmImgAthDB(string mypk)
{
this.setMyPK(mypk);
this.Retrieve();
}
///
/// EnMap
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Sys_FrmImgAthDB", "剪切图片附件数据存储");
map.IndexField = FrmImgAthDBAttr.RefPKVal;
map.AddMyPK();
// 以下三个字段组成一个主键. FK_FrmImgAth+"_"+RefPKVal
map.AddTBString(FrmImgAthDBAttr.FK_MapData, null, "表单ID", true, false, 1, 100, 20);
map.AddTBString(FrmImgAthDBAttr.FK_FrmImgAth, null, "图片附件编号", true, false, 1, 50, 20);
map.AddTBString(FrmImgAthDBAttr.RefPKVal, null, "实体主键", true, false, 1, 50, 20);
map.AddTBString(FrmImgAthDBAttr.FileFullName, null, "文件全路径", true, false, 0, 700, 20);
map.AddTBString(FrmImgAthDBAttr.FileName, null, "名称", true, false, 0, 500, 20);
map.AddTBString(FrmImgAthDBAttr.FileExts, null, "扩展名", true, false, 0, 50, 20);
map.AddTBFloat(FrmImgAthDBAttr.FileSize, 0, "文件大小", true, false);
map.AddTBDateTime(FrmImgAthDBAttr.RDT, null, "记录日期", true, false);
map.AddTBString(FrmImgAthDBAttr.Rec, null, "记录人", true, false, 0, 50, 20);
map.AddTBString(FrmImgAthDBAttr.RecName, null, "记录人名字", true, false, 0, 50, 20);
map.AddTBStringDoc(FrmImgAthDBAttr.MyNote, null, "备注", true, false);
this._enMap = map;
return this._enMap;
}
}
///
/// 重写
///
///
protected override bool beforeInsert()
{
this.setMyPK(this.FK_FrmImgAth + "_" + this.RefPKVal);
return base.beforeInsert();
}
///
/// 重写
///
///
protected override bool beforeUpdate()
{
this.setMyPK(this.FK_FrmImgAth + "_" + this.RefPKVal);
return base.beforeUpdate();
}
#endregion
}
///
/// 剪切图片附件数据存储s
///
public class FrmImgAthDBs : EntitiesMyPK
{
#region 构造
///
/// 剪切图片附件数据存储s
///
public FrmImgAthDBs()
{
}
public FrmImgAthDBs(string fk_mapdata)
{
this.Retrieve(FrmImgAthDBAttr.FK_MapData, fk_mapdata);
}
///
/// 剪切图片附件数据存储s
///
/// s
public FrmImgAthDBs(string fk_mapdata, string pkval)
{
this.Retrieve(FrmImgAthDBAttr.FK_MapData, fk_mapdata,
FrmImgAthDBAttr.RefPKVal, pkval);
}
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new FrmImgAthDB();
}
}
#endregion
#region 为了适应自动翻译成java的需要,把实体转换成List.
///
/// 转化成 java list,C#不能调用.
///
/// List
public System.Collections.Generic.IList ToJavaList()
{
return (System.Collections.Generic.IList)this;
}
///
/// 转化成list
///
/// List
public System.Collections.Generic.List Tolist()
{
System.Collections.Generic.List list = new System.Collections.Generic.List();
for (int i = 0; i < this.Count; i++)
{
list.Add((FrmImgAthDB)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}