/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private Dep EntityGet() { Dep entity = new Dep(); entity.ID = HTDataID; entity.SelectByID(); entity.Code = txtCode.Text.Trim(); entity.Name = txtName.Text.Trim(); entity.StructureID = SysConvert.ToInt32(txtStructureID.Text.Trim()); entity.Remark = txtRemark.Text.Trim(); entity.IncludeSubStructureFlag = SysConvert.ToInt32(chkIncludeSubStructureFlag.Checked); return(entity); }
/// <summary> /// 设置 /// </summary> public override void EntitySet() { Dep entity = new Dep(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtCode.Text = entity.Code.ToString(); txtName.Text = entity.Name.ToString(); txtRemark.Text = entity.Remark.ToString(); txtStructureID.Text = entity.StructureID.ToString(); chkIncludeSubStructureFlag.Checked = SysConvert.ToBoolean(entity.IncludeSubStructureFlag); if (!findFlag) { } }