/// <summary> /// 批量添加用户 /// </summary> /// <param name="UserList"></param> /// <returns></returns> public int AddUser(List <IUser> UserList) { IDvTableBatch dvtb = entityfactory.CreateDriveTableBatch(); foreach (IUser user in UserList) { dvtb.AddInsert(user); } int i = dvtb.Execute(); return(i); }
/// <summary> /// 批量更新用户 /// </summary> /// <param name="UserList"></param> /// <returns></returns> public int Update(List <IUser> UserList) { IDvTableBatch dvtb = entityfactory.CreateDriveTableBatch(); foreach (IUser user in UserList) { IDvTable dvt = dvtb.CreateDriveTable(user); dvt.WhereClause("UserCode", Operator.Deng, LinkOperator.nul); dvtb.AddUpdate(dvt); } int i = dvtb.Execute(); return(i); }