Ejemplo n.º 1
0
 /// <summary>
 /// 添加WLOGProjectTree表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="wlogprojecttreedata">数据集对象</param>
 /// <param name="wlogprojecttree">实体对象</param>
 public void AddRow(ref WLOGProjectTreeData wlogprojecttreedata, EntityWLOGProjectTree wlogprojecttree)
 {
     #region
     DataRow dr = wlogprojecttreedata.Tables[0].NewRow();
     wlogprojecttree.currentId = this._wlogprojecttreeclass.GetMaxAddOne(wlogprojecttreedata).ToString();
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.parentId, wlogprojecttree.parentId);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.currentId, wlogprojecttree.currentId);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.writeUser, wlogprojecttree.writeUser);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.dirName, wlogprojecttree.dirName);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.usable, wlogprojecttree.usable);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.writeIp, wlogprojecttree.writeIp);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.writeTime, wlogprojecttree.writeTime);
     wlogprojecttreedata.Tables[0].Rows.Add(dr);
     #endregion
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 编辑wlogprojecttreedata数据集中指定的行数据
 /// </summary>
 /// <param name="wlogprojecttreedata">数据集对象</param>
 /// <param name="wlogprojecttree">实体对象</param>
 public void EditRow(ref WLOGProjectTreeData wlogprojecttreedata, EntityWLOGProjectTree wlogprojecttree)
 {
     #region
     if (wlogprojecttreedata.Tables[0].Rows.Count <= 0)
     {
         wlogprojecttreedata = this.getData(wlogprojecttree.currentId);
     }
     DataRow dr = wlogprojecttreedata.Tables[0].Rows.Find(new object[1] {
         wlogprojecttree.currentId
     });
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.parentId, wlogprojecttree.parentId);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.currentId, wlogprojecttree.currentId);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.writeUser, wlogprojecttree.writeUser);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.dirName, wlogprojecttree.dirName);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.usable, wlogprojecttree.usable);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.writeIp, wlogprojecttree.writeIp);
     wlogprojecttreedata.Assign(dr, WLOGProjectTreeData.writeTime, wlogprojecttree.writeTime);
     #endregion
 }