Esempio n. 1
0
 /// <summary>
 /// 添加Organization表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="organizationdata">数据集对象</param>
 /// <param name="organization">实体对象</param>
 public void AddRow(ref OrganizationData organizationdata, EntityOrganization organization)
 {
     #region
     DataRow dr = organizationdata.Tables[0].NewRow();
     organizationdata.Assign(dr, OrganizationData.organizationId, organization.organizationId);
     organizationdata.Assign(dr, OrganizationData.userid, organization.userid);
     organizationdata.Assign(dr, OrganizationData.organizationName, organization.organizationName);
     organizationdata.Assign(dr, OrganizationData.currentId, organization.currentId);
     organizationdata.Assign(dr, OrganizationData.parentId, organization.parentId);
     organizationdata.Assign(dr, OrganizationData.usable, organization.usable);
     organizationdata.Assign(dr, OrganizationData.writeIp, organization.writeIp);
     organizationdata.Assign(dr, OrganizationData.writeTime, organization.writeTime);
     organizationdata.Tables[0].Rows.Add(dr);
     #endregion
 }
Esempio n. 2
0
 /// <summary>
 /// 编辑organizationdata数据集中指定的行数据
 /// </summary>
 /// <param name="organizationdata">数据集对象</param>
 /// <param name="organization">实体对象</param>
 public void EditRow(ref OrganizationData organizationdata, EntityOrganization organization)
 {
     #region
     if (organizationdata.Tables[0].Rows.Count <= 0)
     {
         organizationdata = this.getData(organization.organizationId);
     }
     DataRow dr = organizationdata.Tables[0].Rows.Find(new object[1] {
         organization.organizationId
     });
     organizationdata.Assign(dr, OrganizationData.organizationId, organization.organizationId);
     organizationdata.Assign(dr, OrganizationData.userid, organization.userid);
     organizationdata.Assign(dr, OrganizationData.organizationName, organization.organizationName);
     organizationdata.Assign(dr, OrganizationData.currentId, organization.currentId);
     organizationdata.Assign(dr, OrganizationData.parentId, organization.parentId);
     organizationdata.Assign(dr, OrganizationData.usable, organization.usable);
     organizationdata.Assign(dr, OrganizationData.writeIp, organization.writeIp);
     organizationdata.Assign(dr, OrganizationData.writeTime, organization.writeTime);
     #endregion
 }