private XBase.Model.KnowledgeCenter.KeyWordPrepare GetEntity(SqlDataReader dr)
		{
			XBase.Model.KnowledgeCenter.KeyWordPrepare entity = new XBase.Model.KnowledgeCenter.KeyWordPrepare();
			entity.ID = SqlClientUtility.GetInt32(dr,"ID",0);
			entity.TypeID = SqlClientUtility.GetInt32(dr,"TypeID",0);
			entity.KeyWordName = SqlClientUtility.GetString(dr,"KeyWordName",String.Empty);
			entity.CreateUserID = SqlClientUtility.GetString(dr,"CreateUserID",String.Empty);
			entity.CreateDate = SqlClientUtility.GetDateTime(dr,"CreateDate",DateTime.Now);
			entity.ModifiedDate = SqlClientUtility.GetDateTime(dr,"ModifiedDate",DateTime.Now);
			entity.ModifiedUserID = SqlClientUtility.GetString(dr,"ModifiedUserID",String.Empty);
			return entity;
		}
Example #2
0
 private XBase.Model.KnowledgeCenter.KeyWordPrepare GetEntity(SqlDataReader dr)
 {
     XBase.Model.KnowledgeCenter.KeyWordPrepare entity = new XBase.Model.KnowledgeCenter.KeyWordPrepare();
     entity.ID             = SqlClientUtility.GetInt32(dr, "ID", 0);
     entity.TypeID         = SqlClientUtility.GetInt32(dr, "TypeID", 0);
     entity.KeyWordName    = SqlClientUtility.GetString(dr, "KeyWordName", String.Empty);
     entity.CreateUserID   = SqlClientUtility.GetString(dr, "CreateUserID", String.Empty);
     entity.CreateDate     = SqlClientUtility.GetDateTime(dr, "CreateDate", DateTime.Now);
     entity.ModifiedDate   = SqlClientUtility.GetDateTime(dr, "ModifiedDate", DateTime.Now);
     entity.ModifiedUserID = SqlClientUtility.GetString(dr, "ModifiedUserID", String.Empty);
     return(entity);
 }
Example #3
0
        public bool Create(XBase.Model.KnowledgeCenter.KeyWordPrepare entity)
        {
            SqlParameter[] parameters = new SqlParameter[] {
                SqlParameterHelper.MakeInParam("@TypeID", SqlDbType.Int, 0, entity.TypeID),
                SqlParameterHelper.MakeInParam("@KeyWordName", SqlDbType.VarChar, 100, entity.KeyWordName),
                SqlParameterHelper.MakeInParam("@CreateUserID", SqlDbType.VarChar, 20, entity.CreateUserID),
                SqlParameterHelper.MakeInParam("@CreateDate", SqlDbType.DateTime, 0, entity.CreateDate),
                SqlParameterHelper.MakeInParam("@ModifiedDate", SqlDbType.DateTime, 0, entity.ModifiedDate),
                SqlParameterHelper.MakeInParam("@ModifiedUserID", SqlDbType.VarChar, 20, entity.ModifiedUserID)
            };
            bool result;

            Database.RunProc("[knowdba].KeyWordPrepare_Create", parameters, out result);
            return(result);
        }
Example #4
0
        public XBase.Model.KnowledgeCenter.KeyWordPrepare GetEntityByID(int iD)
        {
            SqlParameter[] parameters = new SqlParameter[] {
                SqlParameterHelper.MakeInParam("@ID", SqlDbType.Int, 0, iD)
            };
            XBase.Model.KnowledgeCenter.KeyWordPrepare entity = null;
            SqlDataReader dr;

            Database.RunProc("[knowdba].KeyWordPrepare_GetEntityByID", parameters, out dr);
            if (dr.Read())
            {
                entity = GetEntity(dr);
            }
            dr.Close();
            return(entity);
        }
Example #5
0
 public int UpdateByID(XBase.Model.KnowledgeCenter.KeyWordPrepare entity)
 {
     return(dal.UpdateByID(entity));
 }
Example #6
0
 public bool Create(XBase.Model.KnowledgeCenter.KeyWordPrepare entity)
 {
     return(dal.Create(entity));
 }