/// <summary> /// 创建Company信息 /// </summary> public static int InsertCompany(Company entity) { CheckCompany(entity, true); entity.SysNo = CompanyDA.InsertCompany(entity); AddressDA.CreateRootAddress(entity.SysNo); return(entity.SysNo); }
/// <summary> /// 更新Company信息 /// </summary> public static void UpdateCompany(Company entity) { CheckCompany(entity, false); Company company = CompanyDA.LoadCompany(entity.SysNo); if (company == null) { throw new BusinessException("查找不到企业"); } CompanyDA.UpdateCompany(entity); AddressDA.CreateRootAddress(entity.SysNo); }
public static void CreateRootAddress(int companySysNo) { AddressDA.CreateRootAddress(companySysNo); }