/// <summary> /// 添加新的用户 /// </summary> /// <param name="user"></param> /// <returns></returns> public static bool AddNewUser(UserInfo user) { IWCFService.ISeatManageService seatService = new WcfServiceForSeatManage.SeatManageDateService(); bool error = false; try { return(seatService.AddNewUser(user)); } catch (Exception ex) { error = true; SeatManageComm.WriteLog.Write("添加用户失败:" + ex.Message); return(false); } }
/// <summary> /// 添加新用户 /// </summary> /// <param name="list"></param> public void AddUser(List <UserInfo> list) { WcfServiceForSeatManage.SeatManageDateService seatService = new WcfServiceForSeatManage.SeatManageDateService(); for (int i = 0; i < list.Count; i++) { seatService.AddNewUser(list[i]); if ((i % 10 == 0 || i == list.Count - 1) && DataProgress != null) { DataProgress(i); } } if (DataProgress != null) { DataProgress(list.Count); } }