Esempio n. 1
0
 /// <summary>
 /// 添加BookDomainType表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="bookdomaintypedata">数据集对象</param>
 /// <param name="bookdomaintype">实体对象</param>
 public void AddRow(ref BookDomainTypeData bookdomaintypedata, EntityBookDomainType bookdomaintype)
 {
     #region
     DataRow dr = bookdomaintypedata.Tables[0].NewRow();
     bookdomaintypedata.Assign(dr, BookDomainTypeData.domainTypeId, bookdomaintype.domainTypeId);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.domainName, bookdomaintype.domainName);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.usable, bookdomaintype.usable);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.remark, bookdomaintype.remark);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.sort, bookdomaintype.sort);
     bookdomaintypedata.Tables[0].Rows.Add(dr);
     #endregion
 }
Esempio n. 2
0
 /// <summary>
 /// 编辑bookdomaintypedata数据集中指定的行数据
 /// </summary>
 /// <param name="bookdomaintypedata">数据集对象</param>
 /// <param name="bookdomaintype">实体对象</param>
 public void EditRow(ref BookDomainTypeData bookdomaintypedata, EntityBookDomainType bookdomaintype)
 {
     #region
     if (bookdomaintypedata.Tables[0].Rows.Count <= 0)
     {
         bookdomaintypedata = this.getData(bookdomaintype.domainTypeId);
     }
     DataRow dr = bookdomaintypedata.Tables[0].Rows.Find(new object[1] {
         bookdomaintype.domainTypeId
     });
     bookdomaintypedata.Assign(dr, BookDomainTypeData.domainTypeId, bookdomaintype.domainTypeId);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.domainName, bookdomaintype.domainName);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.usable, bookdomaintype.usable);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.remark, bookdomaintype.remark);
     bookdomaintypedata.Assign(dr, BookDomainTypeData.sort, bookdomaintype.sort);
     #endregion
 }