Beispiel #1
0
 /// <summary>
 /// 添加CollectType表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="collecttypedata">数据集对象</param>
 /// <param name="collecttype">实体对象</param>
 public void AddRow(ref CollectTypeData collecttypedata, EntityCollectType collecttype)
 {
     #region
     DataRow dr = collecttypedata.Tables[0].NewRow();
     collecttypedata.Assign(dr, CollectTypeData.collectTypeId, collecttype.collectTypeId);
     collecttypedata.Assign(dr, CollectTypeData.releaseNo, collecttype.releaseNo);
     collecttypedata.Assign(dr, CollectTypeData.releaseType, collecttype.releaseType);
     collecttypedata.Assign(dr, CollectTypeData.releaseTime, collecttype.releaseTime);
     collecttypedata.Assign(dr, CollectTypeData.writeUser, collecttype.writeUser);
     collecttypedata.Assign(dr, CollectTypeData.writeTime, collecttype.writeTime);
     collecttypedata.Assign(dr, CollectTypeData.writeIp, collecttype.writeIp);
     collecttypedata.Tables[0].Rows.Add(dr);
     #endregion
 }
Beispiel #2
0
 /// <summary>
 /// 编辑collecttypedata数据集中指定的行数据
 /// </summary>
 /// <param name="collecttypedata">数据集对象</param>
 /// <param name="collecttype">实体对象</param>
 public void EditRow(ref CollectTypeData collecttypedata, EntityCollectType collecttype)
 {
     #region
     if (collecttypedata.Tables[0].Rows.Count <= 0)
     {
         collecttypedata = this.getData(collecttype.collectTypeId);
     }
     DataRow dr = collecttypedata.Tables[0].Rows.Find(new object[1] {
         collecttype.collectTypeId
     });
     collecttypedata.Assign(dr, CollectTypeData.collectTypeId, collecttype.collectTypeId);
     collecttypedata.Assign(dr, CollectTypeData.releaseNo, collecttype.releaseNo);
     collecttypedata.Assign(dr, CollectTypeData.releaseType, collecttype.releaseType);
     collecttypedata.Assign(dr, CollectTypeData.releaseTime, collecttype.releaseTime);
     collecttypedata.Assign(dr, CollectTypeData.writeUser, collecttype.writeUser);
     collecttypedata.Assign(dr, CollectTypeData.writeTime, collecttype.writeTime);
     collecttypedata.Assign(dr, CollectTypeData.writeIp, collecttype.writeIp);
     #endregion
 }