private XBase.Model.KnowledgeCenter.MyCollector GetEntity(SqlDataReader dr) { XBase.Model.KnowledgeCenter.MyCollector entity = new XBase.Model.KnowledgeCenter.MyCollector(); entity.ID = SqlClientUtility.GetInt32(dr, "ID", 0); entity.Flag = SqlClientUtility.GetString(dr, "Flag", String.Empty); entity.KnowledgeID = SqlClientUtility.GetInt32(dr, "KnowledgeID", 0); entity.Owner = SqlClientUtility.GetString(dr, "Owner", String.Empty); entity.SourceType = SqlClientUtility.GetString(dr, "SourceType", String.Empty); entity.CreateDate = SqlClientUtility.GetDateTime(dr, "CreateDate", DateTime.Now); entity.ReadStatus = SqlClientUtility.GetString(dr, "ReadStatus", String.Empty); entity.ReadDate = SqlClientUtility.GetDateTime(dr, "ReadDate", DateTime.Now); entity.ModifiedDate = SqlClientUtility.GetDateTime(dr, "ModifiedDate", DateTime.Now); entity.ModifiedUserID = SqlClientUtility.GetString(dr, "ModifiedUserID", String.Empty); return(entity); }
private XBase.Model.KnowledgeCenter.MyCollector GetEntity(SqlDataReader dr) { XBase.Model.KnowledgeCenter.MyCollector entity = new XBase.Model.KnowledgeCenter.MyCollector(); entity.ID = SqlClientUtility.GetInt32(dr,"ID",0); entity.Flag = SqlClientUtility.GetString(dr,"Flag",String.Empty); entity.KnowledgeID = SqlClientUtility.GetInt32(dr,"KnowledgeID",0); entity.Owner = SqlClientUtility.GetString(dr,"Owner",String.Empty); entity.SourceType = SqlClientUtility.GetString(dr,"SourceType",String.Empty); entity.CreateDate = SqlClientUtility.GetDateTime(dr,"CreateDate",DateTime.Now); entity.ReadStatus = SqlClientUtility.GetString(dr,"ReadStatus",String.Empty); entity.ReadDate = SqlClientUtility.GetDateTime(dr,"ReadDate",DateTime.Now); entity.ModifiedDate = SqlClientUtility.GetDateTime(dr,"ModifiedDate",DateTime.Now); entity.ModifiedUserID = SqlClientUtility.GetString(dr,"ModifiedUserID",String.Empty); return entity; }
public XBase.Model.KnowledgeCenter.MyCollector GetEntityByID(int iD) { SqlParameter[] parameters = new SqlParameter[] { SqlParameterHelper.MakeInParam("@ID", SqlDbType.Int, 0, iD) }; XBase.Model.KnowledgeCenter.MyCollector entity = null; SqlDataReader dr; Database.RunProc("[knowdba].MyCollector_GetEntityByID", parameters, out dr); if (dr.Read()) { entity = GetEntity(dr); } dr.Close(); return(entity); }
public bool Create(XBase.Model.KnowledgeCenter.MyCollector entity) { SqlParameter[] parameters = new SqlParameter[] { SqlParameterHelper.MakeInParam("@Flag", SqlDbType.Char, 1, entity.Flag), SqlParameterHelper.MakeInParam("@KnowledgeID", SqlDbType.Int, 0, entity.KnowledgeID), SqlParameterHelper.MakeInParam("@Owner", SqlDbType.VarChar, 20, entity.Owner), SqlParameterHelper.MakeInParam("@SourceType", SqlDbType.Char, 1, entity.SourceType), SqlParameterHelper.MakeInParam("@CreateDate", SqlDbType.DateTime, 0, entity.CreateDate), SqlParameterHelper.MakeInParam("@ReadStatus", SqlDbType.Char, 1, entity.ReadStatus), SqlParameterHelper.MakeInParam("@ReadDate", SqlDbType.DateTime, 0, entity.ReadDate), SqlParameterHelper.MakeInParam("@ModifiedDate", SqlDbType.DateTime, 0, entity.ModifiedDate), SqlParameterHelper.MakeInParam("@ModifiedUserID", SqlDbType.VarChar, 20, entity.ModifiedUserID) }; bool result; Database.RunProc("[knowdba].MyCollector_Create", parameters, out result); return(result); }
public int UpdateByID(XBase.Model.KnowledgeCenter.MyCollector entity) { return(dal.UpdateByID(entity)); }
public bool Create(XBase.Model.KnowledgeCenter.MyCollector entity) { return(dal.Create(entity)); }