public void InsertPublish(PublishInfo publish)
  {
      SqlHelper objSqlHelper = new SqlHelper();
      SqlParameter[] objParams = new SqlParameter[3];
      objParams[0] = new SqlParameter("@publishName", StringHelper.convertStr(publish.PublishName));
      objParams[1] = new SqlParameter("@publishDec", StringHelper.convertStr(publish.PublishDec));
      objParams[2] = new SqlParameter("@IsMain", publish.IsMain);
      objSqlHelper.ExecuteNonQuery("je_Pb_InsertPublish", objParams);
  }
 public int UpdatePublish(PublishInfo publish)
 {
     SqlHelper objSqlHelper = new SqlHelper();
     SqlParameter[] objParams = new SqlParameter[4];
     objParams[0] = new SqlParameter("@publishName", StringHelper.convertStr(publish.PublishName));
     objParams[1] = new SqlParameter("@publishDec", StringHelper.convertStr(publish.PublishDec));
     objParams[2] = new SqlParameter("@IsMain", publish.IsMain);
     objParams[3] = new SqlParameter("@publishID", publish.PublishID);
     return objSqlHelper.ExecuteNonQuery("je_Pb_UpdatePublish", objParams);
 }
 public PublishInfo GetPublishByID(int publishID)
 {
     SqlHelper objSqlHelper = new SqlHelper();
     SqlParameter[] objParams = new SqlParameter[1];
     objParams[0] = new SqlParameter("@publishID", SqlDbType.Int, 4);
     objParams[0].Value = publishID;
     SqlDataReader reader = objSqlHelper.ExecuteReader("je_Pb_GetPublishByID", objParams);
     PublishInfo item = new PublishInfo();
     while (reader.Read())
     {
         item.PublishID = reader.GetInt32(reader.GetOrdinal("publishID"));
         item.PublishName = reader.GetString(reader.GetOrdinal("publishName"));
         item.PublishDec = reader.GetString(reader.GetOrdinal("publishDec"));
         item.AddDate = reader.GetDateTime(reader.GetOrdinal("addDate"));
         item.IsMain = reader.GetBoolean(reader.GetOrdinal("IsMain"));
     }
     reader.Close();
     return item;
 }
 /// <summary>
 /// 更新出版社信息
 /// </summary>
 /// <param name="link"></param>
 /// <returns></returns>
 public static int UpdatePublish(PublishInfo publish)
 {
     return publishs.UpdatePublish(publish);
 }
 /// <summary>
 /// 添加出版社信息
 /// </summary>
 /// <param name="link"></param>
 public static void InsertPublish(PublishInfo publish)
 {
     publishs.InsertPublish(publish);
 }