public static ABiUsersCompany FromABi_Admin_Users_Company(VPDAL.ABi_Admin_Users_Company user) { ABiUsersCompany obj = new ABiUsersCompany(); obj.ABi_Admin_Users_Company_ID = user.ABi_Admin_Users_Company_ID; obj.ABi_Admin_Users_ID = user.ABi_Admin_Users_ID; obj.ABi_Company_ID = user.ABi_Company_ID; return obj; }
/// <summary> /// 添加新用户公司关系 /// </summary> /// <param name="company"></param> /// <returns></returns> public int addUsersCompany(ABiUsersCompany users) { VPDAL.ABi_Admin_Users_Company obj = new VPDAL.ABi_Admin_Users_Company(); obj.ABi_Company_ID = users.ABi_Company_ID; obj.ABi_Admin_Users_ID = users.ABi_Admin_Users_ID; dbContext.ABi_Admin_Users_Company.AddObject(obj); return dbContext.SaveChanges(); }