/// <summary> /// 获取数据库实体 /// </summary> public void GetObj() { string Sql = @" select * from [dbo].[sys_ReditRating] where SysID = '" + "ID".RequestStr() + "' "; BLL_Document BLL = new BLL_Document(); using (IDataReader Read = BLL.ExcuteReader(Sql)) { try { Read.Read(); Obj.SysID = Read["SysID"].ToString(); Obj.Name = Read["Name"].ToString(); Obj.SegmentCode = Read["SegmentCode"].ToString(); Obj.CompanyCode = Read["CompanyCode"].ToString(); Obj.TestRoomCode = Read["TestRoomCode"].ToString(); Obj.IDCard = Read["IDCard"].ToString(); Obj.Job = Read["Job"].ToString(); Obj.Deduct = Read["Deduct"].ToString(); Obj.Remark = Read["Remark"].ToString(); Obj.CompanyType = Read["CompanyType"].ToString(); Obj.CreateOn = Read["CreateOn"].ToString(); Obj.RType = Read["RType"].ToString(); Obj.CreateBy = Session["UserName"].ToString(); } catch { } Read.Close(); Read.Dispose(); } }
/// <summary> /// 获取数据库实体 /// </summary> public void GetObj() { string Sql = @" select * from sys_KeyModify where KMID = '" + "ID".RequestStr() + "' "; BLL_Document BLL = new BLL_Document(); using (IDataReader Read = BLL.ExcuteReader(Sql)) { try { Read.Read(); Obj.KMID = Read["KMID"].ToString(); Obj.Person = Read["YZUserName"].ToString(); Obj.Content = Read["YZContent"].ToString(); Obj.ModifyTime = Read["YZOPTime"].ToString(); } catch { } Read.Close(); Read.Dispose(); } }