/// <summary> /// 批量添加 /// </summary> /// <param name="list">Comments实体列表</param> /// <returns>执行成功返回true,否则为false</returns> public bool AddBatch(List<CommentsModel> list) { try { using (DataBaseTransaction trans = new DataBaseTransaction(DatabaseFactory.GetWriteDatabase(DatabaseManager.Db_JQEBookingConfig))) { foreach(CommentsModel comments in list) { Add(comments,trans.DbTransaction); } trans.Complete(); } return true; } catch { return false; } }
/// <summary> /// 批量删除 /// </summary> /// <param name="list">Admin主键实体列表</param> /// <returns>执行成功返回true,否则为false</returns> public bool DeleteBatch(List<int> list) { try { using (DataBaseTransaction trans = new DataBaseTransaction(DatabaseFactory.GetWriteDatabase(DatabaseManager.Db_JQEBookingConfig))) { foreach(int aid in list) { Delete(aid,trans.DbTransaction); } trans.Complete(); } return true; } catch { return false; } }
/// <summary> /// 批量更新 /// </summary> /// <param name="list">JQResource实体列表</param> /// <returns>执行成功返回true,否则为false</returns> public bool UpdateBatch(List<JQResourceModel> list) { try { using (DataBaseTransaction trans = new DataBaseTransaction(DatabaseFactory.GetWriteDatabase(DatabaseManager.Db_JQEBookingConfig))) { foreach(JQResourceModel jqresource in list) { Update(jqresource.JQRId,jqresource,trans.DbTransaction); } trans.Complete(); } return true; } catch { return false; } }
/// <summary> /// 批量更新 /// </summary> /// <param name="list">Admin实体列表</param> /// <returns>执行成功返回true,否则为false</returns> public bool UpdateBatch(List<AdminModel> list) { try { using (DataBaseTransaction trans = new DataBaseTransaction(DatabaseFactory.GetWriteDatabase(DatabaseManager.Db_JQEBookingConfig))) { foreach(AdminModel admin in list) { Update(admin.AId,admin,trans.DbTransaction); } trans.Complete(); } return true; } catch { return false; } }
/// <summary> /// 批量更新 /// </summary> /// <param name="list">OrderTable实体列表</param> /// <returns>执行成功返回true,否则为false</returns> public bool UpdateBatch(List<OrderTableModel> list) { try { using (DataBaseTransaction trans = new DataBaseTransaction(DatabaseFactory.GetWriteDatabase(DatabaseManager.Db_JQEBookingConfig))) { foreach(OrderTableModel ordertable in list) { Update(ordertable.OTId,ordertable,trans.DbTransaction); } trans.Complete(); } return true; } catch { return false; } }