Exemple #1
0
 /// <summary>
 /// 编辑bookinformationdata数据集中指定的行数据
 /// </summary>
 /// <param name="bookinformationdata">数据集对象</param>
 /// <param name="bookinformation">实体对象</param>
 public void EditRow(ref BookInformationData bookinformationdata, EntityBookInformation bookinformation)
 {
     #region
     if (bookinformationdata.Tables[0].Rows.Count <= 0)
     {
         bookinformationdata = this.getData(bookinformation.bookId);
     }
     DataRow dr = bookinformationdata.Tables[0].Rows.Find(new object[1] {
         bookinformation.bookId
     });
     bookinformationdata.Assign(dr, BookInformationData.bookId, bookinformation.bookId);
     bookinformationdata.Assign(dr, BookInformationData.domainTypeId, bookinformation.domainTypeId);
     bookinformationdata.Assign(dr, BookInformationData.publisherId, bookinformation.publisherId);
     bookinformationdata.Assign(dr, BookInformationData.belongtoId, bookinformation.belongtoId);
     bookinformationdata.Assign(dr, BookInformationData.countryId, bookinformation.countryId);
     bookinformationdata.Assign(dr, BookInformationData.userId, bookinformation.userId);
     bookinformationdata.Assign(dr, BookInformationData.bookTitle, bookinformation.bookTitle);
     bookinformationdata.Assign(dr, BookInformationData.author, bookinformation.author);
     bookinformationdata.Assign(dr, BookInformationData.translator, bookinformation.translator);
     bookinformationdata.Assign(dr, BookInformationData.bookurl, bookinformation.bookurl);
     bookinformationdata.Assign(dr, BookInformationData.publishDate, bookinformation.publishDate);
     bookinformationdata.Assign(dr, BookInformationData.isbn, bookinformation.isbn);
     bookinformationdata.Assign(dr, BookInformationData.buyTime, bookinformation.buyTime);
     bookinformationdata.Assign(dr, BookInformationData.paymoney, bookinformation.paymoney);
     bookinformationdata.Assign(dr, BookInformationData.writeTime, bookinformation.writeTime);
     #endregion
 }
Exemple #2
0
 /// <summary>
 /// 添加BookInformation表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="bookinformationdata">数据集对象</param>
 /// <param name="bookinformation">实体对象</param>
 public void AddRow(ref BookInformationData bookinformationdata, EntityBookInformation bookinformation)
 {
     #region
     DataRow dr = bookinformationdata.Tables[0].NewRow();
     bookinformationdata.Assign(dr, BookInformationData.bookId, bookinformation.bookId);
     bookinformationdata.Assign(dr, BookInformationData.domainTypeId, bookinformation.domainTypeId);
     bookinformationdata.Assign(dr, BookInformationData.publisherId, bookinformation.publisherId);
     bookinformationdata.Assign(dr, BookInformationData.belongtoId, bookinformation.belongtoId);
     bookinformationdata.Assign(dr, BookInformationData.countryId, bookinformation.countryId);
     bookinformationdata.Assign(dr, BookInformationData.userId, bookinformation.userId);
     bookinformationdata.Assign(dr, BookInformationData.bookTitle, bookinformation.bookTitle);
     bookinformationdata.Assign(dr, BookInformationData.author, bookinformation.author);
     bookinformationdata.Assign(dr, BookInformationData.translator, bookinformation.translator);
     bookinformationdata.Assign(dr, BookInformationData.bookurl, bookinformation.bookurl);
     bookinformationdata.Assign(dr, BookInformationData.publishDate, bookinformation.publishDate);
     bookinformationdata.Assign(dr, BookInformationData.isbn, bookinformation.isbn);
     bookinformationdata.Assign(dr, BookInformationData.buyTime, bookinformation.buyTime);
     bookinformationdata.Assign(dr, BookInformationData.paymoney, bookinformation.paymoney);
     bookinformationdata.Assign(dr, BookInformationData.writeTime, bookinformation.writeTime);
     bookinformationdata.Tables[0].Rows.Add(dr);
     #endregion
 }